-
Notifications
You must be signed in to change notification settings - Fork 70
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
WIP: Convex frxETH/WETH strategy - copy of BaseCurveStrategy & ConvexStrategy #1842
Conversation
c523a20
to
6a0a4cb
Compare
// Set the amount on the asset we want to deposit | ||
_amounts[poolCoinIndex] = _amount; | ||
ICurveMetaPool curvePool = ICurveMetaPool(platformAddress); | ||
uint256 depositValue = _amount.divPrecisely( |
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.
BaseCurveStrategy scales the amount by the asset decimals. Should be done here as well I think: https://github.com/OriginProtocol/origin-dollar/pull/1842/files#diff-b64fd0bec03db7ed6bb2701ecb172041e4f1764412109f6def228fab87fed611R48
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.
BaseCurveStrategy has to scale USDT and USDC up to 18 decimals to match DAI and the Curve pool LP token.
For the ETH-based Curve pools, all the assets are 18 decimals so they don't need scaling up.
I commented on the contract that the strategy can only be used if all the assets and LP token have the same decimals.
This might get added back if I can make BaseCurveStrategy
handle Curve pools with either 2 or 3 assets.
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.
thanks that makes sense
6a0a4cb
to
c646b8e
Compare
Closing this in preference to PR #1846 |
There are two implementations of the new Convex frxETH/WETH strategy
BaseCurveStrategy
toBaseTwoAssetCurveStrategy
andConvexStrategy
toConvexTwoAssetStrategy
If you made a contract change, make sure to complete the checklist below before merging it in master.
Refer to our documentation for more details about contract security best practices.
Contract change checklist: