Skip to content

feat: multirewards ssbeets#10

Open
newmickymousse wants to merge 5 commits intobeethovenfrom
beethoven-multi-reward
Open

feat: multirewards ssbeets#10
newmickymousse wants to merge 5 commits intobeethovenfrom
beethoven-multi-reward

Conversation

@newmickymousse
Copy link
Collaborator

No description provided.

Copy link
Owner

@decaf-addict decaf-addict left a comment

Choose a reason for hiding this comment

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

Over all looks good, will wait for fixes to give the final LG! Thanks for tackling this @newmickymousse !

if (getPendingBeets() > 0) {
uint256 rewardBal = balanceOfReward();
uint256 prevBeetsBal = balanceOfBeets();
masterChef.harvest(masterChefPoolId, address(this));
Copy link
Owner

Choose a reason for hiding this comment

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

question: how is TUSD rewards claimed? Will it need to be claimed synchronously too?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes.. the harvest will send both beets and tusd

Comment on lines -402 to -405
// this allows us to also sell bpt externally
function sellBpt(uint256 _amountBpts) external onlyVaultManagers {
_sellBpt(_amountBpts);
}
Copy link
Owner

Choose a reason for hiding this comment

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

should put this back along with any other external functions deleted and implement the modifier trick. It'll save about ~4% bytecode size. The external functions are pretty important and have saved us in the past

Copy link
Owner

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Adding this and bringing back the external functions

Comment on lines 446 to 447
IERC20[] memory noRewardTokens;
rewardTokens = noRewardTokens;
Copy link
Owner

Choose a reason for hiding this comment

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

does delete not work for rewardTokens? Should be able to reset it to default value like swapSteps

swapSteps = _steps;
// for partnership rewards like TUSD or airdrops
function whitelistRewards(address _rewardToken, SwapSteps memory _steps) public isVaultManager {
IERC20 token = IERC20(_rewardToken);

Choose a reason for hiding this comment

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

Should check that this is not want, so we dont max approve here

Choose a reason for hiding this comment

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

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.

3 participants