-
Notifications
You must be signed in to change notification settings - Fork 5
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
base: develop
Are you sure you want to change the base?
Conversation
aminlatifi
commented
Jan 21, 2025
- Fixes Fix minor issue on notify reward on uinpools #46
There was a problem hiding this 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'); |
There was a problem hiding this comment.
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'); |
There was a problem hiding this comment.
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) = |
There was a problem hiding this comment.
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?