Skip to content
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

curve ERC4626 #11

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

curve ERC4626 #11

wants to merge 1 commit into from

Conversation

Joeysantoro
Copy link
Contributor

@Joeysantoro Joeysantoro commented Mar 31, 2022

#9

@Joeysantoro Joeysantoro self-assigned this Mar 31, 2022
contract CurveERC4626 is ERC4626, RewardsClaimer {
using SafeTransferLib for ERC20;

/// @notice The Convex Rewards contract (for claiming rewards)
Copy link

@eswak eswak Mar 31, 2022

Choose a reason for hiding this comment

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

*the Curve gauge

@param _asset The ERC20 compliant token the Vault should accept.
@param _name The name for the vault token.
@param _symbol The symbol for the vault token.
@param _gauge The Convex Rewards contract (for claiming rewards).
Copy link

@eswak eswak Mar 31, 2022

Choose a reason for hiding this comment

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

*the Curve gauge (for staking tokens & claiming rewards)

@param _name The name for the vault token.
@param _symbol The symbol for the vault token.
@param _gauge The Convex Rewards contract (for claiming rewards).
@param _rewardsDestination the address to send CRV and CVX.
Copy link

Choose a reason for hiding this comment

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

not necessarily CRV and CVX, it can be BAL for Balancer gauges too. And CVX don't work with a gauge system, only Curve distributes CRV this way

@eswak
Copy link

eswak commented Mar 31, 2022

You could probably rename it from CurveERC4626 to GaugeERC4626 because the name can be misleading, we could imagine it deposits in a Curve pool or something. Also it works for all protocols that use gauges (Balancer, Angle, ...)

Code looks good (just fix the comments). After I see some unit tests I'll be comfident to merge, the code is very similar to what we use in prod already for staking in gauges :)

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.

2 participants