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

Redefine Curve AMO Abstract structure. #2379

Closed

Conversation

clement-ux
Copy link
Contributor

@clement-ux clement-ux commented Feb 4, 2025

This PR aims to change how Curve AMO contract are structured.

!This is experimental!

Instead of having multiple contract, re-implementing AMO logic, the logic will be stored in a Abstract contract: "AbstractCurveAMOStrategy".
And all Curve AMO should inherit this abstract contract.
The logic (eg. where to deposit LP or how to get LP) will be done on the main contract instead, by overriding not defined functions like:

  • _addLiquidity
  • _removeLiquidity
  • _removeLiquidityOneCoin
  • _stakeLP
  • _unstakeLP
  • _wrapETH
  • _unwrapETH
  • _claimReward
  • _approveBase
  • _getBalances
  • _solvencyAssert
  • maxSlippage

Copy link

github-actions bot commented Feb 4, 2025

Warnings
⚠️ 👀 This PR needs at least 2 reviewers

Generated by 🚫 dangerJS against a01be43

@sparrowDom
Copy link
Member

we've decided to not go for this because:

  • ConvexEthMetaStrategy has already been audited
  • more inheritance makes it harder to follow the code

overall the abstraction benefits do not outweigh the downsides.

@sparrowDom sparrowDom closed this Feb 6, 2025
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