-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: add aave strategy #118
Conversation
uint256 beforeBal = balanceOfWant(); | ||
|
||
// claim all rewards to the vault | ||
IAaveV3Incentives(incentivesController).claimAllRewards(rewardAssets, address(vault)); | ||
|
||
uint256 wantHarvested = balanceOfWant() - beforeBal; | ||
uint256 fee = chargePerformanceFee(wantHarvested); | ||
deposit(); | ||
|
||
lastHarvest = block.timestamp; | ||
emit StratHarvest(msg.sender, wantHarvested - fee, balanceOf()); |
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.
No need to calculate the balance, charge perf fee and deposit.
uint256 beforeBal = balanceOfWant(); | ||
|
||
// claim all rewards to the vault | ||
IAaveV3Incentives(incentivesController).claimAllRewards(rewardAssets, address(vault)); |
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.
This API supports directly claiming into the specified address
|
address public constant aavePool = address(0x794a61358D6845594F94dc1DB02A252b5b4814aD); // Aave: Pool V3 | ||
address public constant incentivesController = address(0x929EC64c34a17401F460460D4B9390518E5B473e); // Aave: Incentives V3 | ||
address public constant dataProvider = address(0x69FA688f1Dc47d4B5d8029D5a35FB7a548310654); // Aave: Pool Data Provider V3 |
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.
@0xmer1in could you please help double check these addresses in deployment?
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.
both correct
1. No need to calculate the balance, charge perf fee and deposit. 2. add reward treasury address, directly claiming into this address
chore: upgrade
295447d
to
81535ec
Compare
chore: upgrade fix: compile && format chore: update emergencyExit permission chore: rename back to the origin
No description provided.