Skip to content

Latest commit

 

History

History
131 lines (118 loc) · 5.46 KB

YPP-0043.md

File metadata and controls

131 lines (118 loc) · 5.46 KB

Proposal

Activate the DAI, USDC, ETH and FRAX December series on mainnet using yieldspace-tv, and roll the respective strategies from June to December

Background

On June 24th 2022 all June series matured, and the YSDAI6MMS, YSUSDC6MMS, YSETH6MMS and YSFRAX6MMs strategies stopped accruing fees. New yieldspace-tv pools are going to be used for the December series, with eTokens as a yield-bearing token to provide extra returns to LPs.

Details

Here are the steps:

  1. Deploy Roller to use flash loans if the Joins don't have enough assets to redeem all fyToken in the rolled pools.
  2. Deploy fyToken contracts for FYDAI2212, FYUSDC2212, FYETH2212 and FYFRAX2212.
  3. Deploy respective pool contracts. FRAX won't use an underlying Euler token.
  4. Governance proposal
    1. Orchestrate pools
    2. Orchestrate roller
    3. Add new series
    4. Add ilks to the new series
    5. Initialize new pools
    6. Roll the strategies to the next pool

We would be deploying the fyTokens & pools using the add script link, with add config link:

// Time stretch to be set in the PoolFactory prior to pool deployment
export const timeStretch: Map<string, BigNumber> = new Map([
  [FYETH2212, ONE64.div(secondsInOneYear.mul(25))],
  [FYDAI2212, ONE64.div(secondsInOneYear.mul(45))],
  [FYUSDC2212, ONE64.div(secondsInOneYear.mul(55))],
  [FYFRAX2212, ONE64.div(secondsInOneYear.mul(20))],
])

// Sell base to the pool fee, as fp4
export const g1: number = 9000

// seriesId, underlyingId, chiOracleAddress, joinAddress, maturity, name, symbol
export const fyTokenData: Array<[string, string, string, string, number, string, string]> = [
  [FYETH2212, ETH, protocol.get(COMPOUND) as string, joins.get(ETH) as string, EODEC22, 'FYETH2212', 'FYETH2212'],
  [FYDAI2212, DAI, protocol.get(COMPOUND) as string, joins.get(DAI) as string, EODEC22, 'FYDAI2212', 'FYDAI2212'],
  [FYUSDC2212, USDC, protocol.get(COMPOUND) as string, joins.get(USDC) as string, EODEC22, 'FYUSDC2212', 'FYUSDC2212'],
  [
    FYFRAX2212,
    FRAX,
    protocol.get(ACCUMULATOR) as string,
    joins.get(FRAX) as string,
    EODEC22,
    'FYFRAX2212',
    'FYFRAX2212',
  ],
]

// Parameters to deploy pools with, a pool being identified by the related seriesId
// seriesId, baseAddress, fyTokenAddress, ts (time stretch), g1 (Sell base to the pool fee)
export const yvPoolData: Array<[string, string, string, BigNumber, number]> = [
  //  [FYUSDC2212, assets.get(YVUSDC) as string, newFYTokens.get(FYUSDC2212) as string, timeStretch, g1],
  //  [FYDAI2212, assets.get(YVDAI) as string, newFYTokens.get(FYDAI2212) as string, timeStretch, g1],
]

// Parameters to deploy pools with, a pool being identified by the related seriesId
// seriesId, baseAddress, fyTokenAddress, ts (time stretch), g1 (Sell base to the pool fee)
export const nonTVPoolData: Array<[string, string, string, BigNumber, number]> = [
  [
    FYFRAX2212,
    assets.get(FRAX) as string,
    newFYTokens.get(FYFRAX2212) as string,
    timeStretch.get(FYFRAX2212) as BigNumber,
    g1,
  ],
]

// Parameters to deploy pools with, a pool being identified by the related seriesId
// seriesId, baseAddress, fyTokenAddress, ts (time stretch), g1 (Sell base to the pool fee)
export const ePoolData: Array<[string, string, string, string, BigNumber, number]> = [
  [
    FYETH2212,
    eulerAddress,
    assets.get(EWETH) as string,
    newFYTokens.get(FYETH2212) as string,
    timeStretch.get(FYETH2212) as BigNumber,
    g1,
  ],
  [
    FYDAI2212,
    eulerAddress,
    assets.get(EDAI) as string,
    newFYTokens.get(FYDAI2212) as string,
    timeStretch.get(FYDAI2212) as BigNumber,
    g1,
  ],
  [
    FYUSDC2212,
    eulerAddress,
    assets.get(EUSDC) as string,
    newFYTokens.get(FYUSDC2212) as string,
    timeStretch.get(FYUSDC2212) as BigNumber,
    g1,
  ],
]

// Amounts to initialize pools with, a pool being identified by the related seriesId
// seriesId, initAmount
export const poolsInit: Array<[string, string, BigNumber, BigNumber]> = [
  [FYETH2212, ETH, WAD.div(10), BigNumber.from('0')],
  [FYDAI2212, DAI, WAD.mul(100), BigNumber.from('0')],
  [FYUSDC2212, USDC, ONEUSDC.mul(100), BigNumber.from('0')],
  [FYFRAX2212, FRAX, WAD.mul(100), BigNumber.from('0')],
]

// Ilks to accept for each series
// seriesId, accepted ilks
export const seriesIlks: Array<[string, string[]]> = [
  [FYETH2212, [ETH, DAI, USDC, WBTC, WSTETH, LINK, ENS, UNI, FRAX]],
  [FYDAI2212, [ETH, DAI, USDC, WBTC, WSTETH, LINK, ENS, UNI, FRAX]],
  [FYUSDC2212, [ETH, DAI, USDC, WBTC, WSTETH, LINK, ENS, UNI, FRAX, YVUSDC]],
  [FYFRAX2212, [ETH, DAI, USDC, WBTC, WSTETH, LINK, ENS, UNI, FRAX]],
]

/// Parameters to roll each strategy
/// @param strategyId
/// @param nextSeriesId
/// @param buffer Amount of base sent to the Roller to make up for market losses when using a flash loan for rolling
/// @param lender ERC3156 flash lender used for rolling
/// @param fix If true, transfer one base wei to the pool to allow the Strategy to start enhanced TV pools
export const rollData: Array<[string, string, BigNumber, string, boolean]> = [
  [YSETH6MJD, FYETH2212, ZERO, ZERO_ADDRESS, true],
  [YSDAI6MJD, FYDAI2212, WAD.mul(10000), flashMintModule, true],
  [YSUSDC6MJD, FYUSDC2212, ZERO, ZERO_ADDRESS, true],
  [YSFRAX6MJD, FYFRAX2212, ZERO, ZERO_ADDRESS, false],
]

Testing

The change has been deployed on a tenderly mainnet fork and passed UX testing