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

feat: added deferred ramp A to y pool & static yearn like token wrapper #84

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

Conversation

MioGreen
Copy link

@MioGreen MioGreen commented Nov 9, 2020

Curve + CompliFi Integration Proposal

y pool template has been extended with the following functions:

  • changed: SwapTemplateY contract - added external function ramp_A_deferred(_future_A: uint256, _future_time: uint256, _initial_time: uint256) that can launch deferred ramping of amplification at _initial_time in addition to ramp_A params, where ramping of amplification starts immediately.

  • added: yStaticWrapper token contract has been added, which re-denominates derivatives so as to achieve a 1:1 reference price vs collateral. The contract implements ERC20 and yERC20 interfaces. Any token can be wrapped by deposit(_amount: uint256) function and converted back by withdraw(_amount: uint256) function. The re-denomination rate is set during the creation of the wrapper token, and fetched by executing yERC20's getPricePerFullShare() -> uint256. The yStaticWrapper token contract is fully supported yERC20 interface and can be used directly in y pool.

CompliFi's Curve pool creation flow:

  • Deferred y pools are created for each primary derivative vs collateral and complement derivative vs collateral pair.

  • Derivative tokens and collateral tokens have to be wrapped to yStaticWrapper tokens. For collateral tokens, the conversion rate is equal to 1. Primary and complement tokens’ rate to be determined based on valuation of specific derivatives.

  • ramp_A_deferred should be executed shortly after creation of the pool.

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.

None yet

1 participant