-
Notifications
You must be signed in to change notification settings - Fork 4
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
Modify Aura rewards estimation function to changes introduced #5
base: main
Are you sure you want to change the base?
Conversation
I believe the new code is simpler and doesn't have cliffs anymore |
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.
Small nits
contracts/StrategyAuraStaking.sol
Outdated
@@ -293,6 +293,9 @@ contract StrategyAuraStaking is BaseStrategy { | |||
view | |||
returns (uint256 amount) | |||
{ | |||
uint256 mintAmount = _balAmount | |||
.mul(BOOSTER.getRewardMultipliers(address(baseRewardPool))) | |||
.div(BOOSTER.REWARD_MULTIPLIER_DENOMINATOR()); |
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.
Store it as a constant (10000)
contracts/StrategyAuraStaking.sol
Outdated
uint256 mintAmount = _balAmount | ||
.mul(BOOSTER.getRewardMultipliers(address(baseRewardPool))) | ||
.div(BOOSTER.REWARD_MULTIPLIER_DENOMINATOR()); |
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.
I would prefer to move this out of getMintableAuraRewards
and call the function with the adjusted bal value
uint256 balAmountAdjusted = _balAmount.mul(BOOSTER.getRewardMultipliers(address(baseRewardPool))).div(REWARD_MULTIPLIER_DENOMINATOR;
getMintableAuraRewards(balAmountAdjusted);
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.
Good call, pushed
@GalloDaSballo, the only thing that changed within the booster is that the amount to be passed to the minter is modified by the multiplier, the minting logic remained unchanged as it is handled within the AURA token. The way I handled it here (and WatchPug) suggested, combines the added logic to the booster with the existing minting logic into one function. I will extract the first step of the process, as @shuklaayush suggests, from the AURA rewards estimation function for it to be more aligned with the Aura infra (this portion is handled within the booster as you pointed out). |
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.
LG. We probably don't need the foundry config file though
I always end up adding it locally when flattening so I figured we might as well add it for good. Happy to remove it though. |
Modify Aura rewards estimation function based Aura contract changes and as per WatchPug's recommendations.