Skip to content

Latest commit

 

History

History
101 lines (86 loc) · 5.29 KB

YPP-0033.md

File metadata and controls

101 lines (86 loc) · 5.29 KB

Proposal

Enable Notional fCash as a collateral for DAI and USDC loans, for the June and September maturities.

Background

Notional Finance allows fixed rate borrowing and lending, as does the Yield Protocol. There is an opportunity for arbitrage and leverage by integrating both platforms. As of now, lending rates exceed 5% in DAI and USDC for maturities that overlap those in the Yield Protocol. Borrowing rates in the Yield Protocol have often been well below 5%.

Details

Notional fCash is already enabled as a collateral, and with this proposal we are deploying new Joins and integrating new maturities.

The fCash maturities that will be accepted as collateral will be those for which a similar Yield series exists. FCash will be accepted as collateral to borrow only its underlying, with a collateralization ratio of 110%.

Steps:

  1. New fCash Joins
  2. Integration of new fCash maturities

Constants

export const FYDAI2206 = ethers.utils.formatBytes32String('0106').slice(0, 14)
export const FYDAI2209 = ethers.utils.formatBytes32String('0107').slice(0, 14)
export const FYUSDC2206 = ethers.utils.formatBytes32String('0206').slice(0, 14)
export const FYUSDC2209 = ethers.utils.formatBytes32String('0207').slice(0, 14)

export const FDAI2209 = ethers.utils.formatBytes32String('16').slice(0, 14)
export const FUSDC2209 = ethers.utils.formatBytes32String('17').slice(0, 14)

export const FCASH_JUN22 = 1656288000 // 213 * (86400 * 90)
export const FCASH_SEP22 = 1664064000 // 214 * (86400 * 90)
export const FCASH_DAI = '2'
export const FCASH_USDC = '3'

Configuration

export const fCashAddress = '0x1344A36A1B56144C3Bc62E7757377D288fDE0369'

/// @dev The Notional Oracle is fed with Yield Protocol asset pairs to register.
/// Since we are valuing the fCash at face value, we don't need the Notional fCash ids. 
/// Note: notionalId (FDAI2203) is the id of an fCash tenor in the Yield Protocol,
/// while fCashId (FDAI2203ID) is the id of that same tenor in Notional Finance
/// @param fcash: address of the fCash contract
/// @param notionalId: asset id of an fCash tenor in the Yield Protocol
/// @param underlyingId: asset id of a borrowable asset in the Yield Protocol
/// @param underlying: contract address matching underlyingId
export const notionalSources: Array<[string, string, string, string]> = [
  [fCashAddress, FDAI2206, DAI, assets.get(DAI) as string],
  [fCashAddress, FUSDC2206, USDC, assets.get(USDC) as string],
  [fCashAddress, FDAI2209, DAI, assets.get(DAI) as string],
  [fCashAddress, FUSDC2209, USDC, assets.get(USDC) as string],
]

/// @dev Assets for which we will deploy a Join
/// @param notionalId: asset id of an fCash tenor in the Yield Protocol
/// @param fcash: address of the fCash contract
/// @param underlying: address of the fCash underlying
/// @param fCashMaturity: maturity in Notional Finance
/// @param fCashCurrency: id of the underlying in Notional Finance
export const assetsToAdd: Array<[string, string, string, number, string]> = [
  [FDAI2206, fCashAddress, assets.get(DAI) as string, FCASH_JUN22, FCASH_DAI],
  [FUSDC2206, fCashAddress, assets.get(USDC) as string, FCASH_JUN22, FCASH_USDC],
  [FDAI2209, fCashAddress, assets.get(DAI) as string, FCASH_SEP22, FCASH_DAI],
  [FUSDC2209, fCashAddress, assets.get(USDC) as string, FCASH_SEP22, FCASH_USDC],
]

/// @dev Collateralization ratio, debt ceiling, and debt dust
/// @param baseId: asset id of a borrowable asset
/// @param ilkId: asset id of a collateral asset
/// @param ratio: collateralization ratio for the base/ilk pair, with 1000000 == 100%
/// @param line: maximum debt across the protocol for the pair, with added dec
/// @param dust: minimum debt in any given vault for the pair, with added dec
/// @param dec: number of zeros to append to line and dust
export const notionalDebtLimits: Array<[string, string, number, number, number, number]> = [
  [DAI, FDAI2206, 1100000, 5000000, 5000, 18],
  [USDC, FUSDC2206, 1100000, 5000000, 5000, 6],
  [DAI, FDAI2209, 1100000, 5000000, 5000, 18],
  [USDC, FUSDC2209, 1100000, 5000000, 5000, 6],
]

/// @dev Parameters for liquidations
/// Note: fCash-collateralized positions can't get liquidated
/// @param ilkId: asset id of a collateral asset
/// @param duration: time for an auction to reach the minimum price
/// @param initialOffer: proportion of collateral to be offered at the start of an auction
/// @param auctionLine: maximum collateral of ilkId that can be simultaneously auctioned
/// @param auctionDust: minimum collateral of ilkId that can be left in a non-empty vault
/// @param ilkDec: number of zeros to append to auctionLine and auctionDust
export const auctionLimits: Array<[string, number, number, number, number, number]> = []

/// @dev Newly accepted collaterals
/// @param seriesId: series in the yield Protocol
/// @param [ilkIds]: array of asset ids to be newly accepted as collateral
export const seriesIlks: Array<[string, string[]]> = [
  [FYDAI2206, [FDAI2206]],
  [FYUSDC2206, [FUSDC2206]],
  [FYDAI2209, [FDAI2209]],
  [FYUSDC2209, [FUSDC2209]],
]

Testing

TBA