Skip to content

feat: multirewards ssbeets - #10

Open
newmickymousse wants to merge 5 commits into
beethovenfrom
beethoven-multi-reward
Open

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

Conversation

@newmickymousse

Copy link
Copy Markdown
Collaborator

No description provided.

@decaf-addict decaf-addict left a comment

Copy link
Copy Markdown
Owner

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 !

Comment thread contracts/Strategy.sol
if (getPendingBeets() > 0) {
uint256 rewardBal = balanceOfReward();
uint256 prevBeetsBal = balanceOfBeets();
masterChef.harvest(masterChefPoolId, address(this));

Copy link
Copy Markdown
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
Copy Markdown
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 thread contracts/Strategy.sol
Comment on lines -402 to -405
// this allows us to also sell bpt externally
function sellBpt(uint256 _amountBpts) external onlyVaultManagers {
_sellBpt(_amountBpts);
}

Copy link
Copy Markdown
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
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
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 thread contracts/Strategy.sol Outdated
Comment on lines +446 to +447
IERC20[] memory noRewardTokens;
rewardTokens = noRewardTokens;

Copy link
Copy Markdown
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

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

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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