Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/notify reward audit fix #48

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

aminlatifi
Copy link
Member

Copy link
Contributor

@divine-comedian divine-comedian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed a couple typos and just need clarification on the new requirement check

require(success, 'UnipoolTokenDistributor: CALL_FAILED');
(uint256 allocatedTokens,) = abi.decode(data, (uint256, uint256));

require(allocatedTokens >= _reward, 'UnipoolTokenDistributor: NOT_ENOUGH_TOKEND_ISTRO_BALANCE');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo in revert message

require(success, 'UnipoolTokenDistributor: CALL_FAILED');
(uint256 allocatedTokens,) = abi.decode(data, (uint256, uint256));

require(allocatedTokens >= _reward, 'UnipoolTokenDistributor: NOT_ENOUGH_TOKEND_ISTRO_BALANCE');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another typo here

}

(bool success, bytes memory data) =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this function is now adding an additional check if the unipool has enough balance that is equal or greater than the amount of rewards it will distribute?

the internal variable _reward does it decrease as rewards are distributed or is it a total number of rewards it has given across its entire lifespan?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix minor issue on notify reward on uinpools
2 participants