Skip to content

Latest commit

 

History

History
281 lines (269 loc) · 7.78 KB

YPP-0083.md

File metadata and controls

281 lines (269 loc) · 7.78 KB

Proposal

Enable Witch v2 on Mainnet for all positions, and disable Witch v1 for all positions.

Background

Witch v2 is a more powerful and configurable liquidation engine than Witch v1. The math has been simplified to remove rounding errors, the limits have been changed to reduce risks and match the Cauldron. Payment with fyTokens is now possible. Partial liquidations are also possible.

Details

In this proposal Witch V2 will be allowed to liquidate all positions. Some series and underlying/collateral pairs were already available to Witch v2 and won't be configured again. Witch v1 will be disabled by setting maximum concurrent collateral under auction to zero for all collaterals.

  1. Governance proposal
    1. Orchestrate Witch v2 with all remaining series and joins.
    2. Set auction parameters for all remaining pairs.

Script that performs said actions: https://github.com/yieldprotocol/environments-v2/blob/main/scripts/governance/replace/witchV2/completeWitchV2.ts

Configuration applied:

/// The Witch v2 will accept payment in these fyToken
export const seriesIds: Array<string> = [FYDAI2212, FYDAI2303]

/// Auction configuration for each asset pair
/// @param baseId assets in scope as underlying for vaults to be auctioned
/// @param ilkId assets in scope as collateral for vaults to be auctioned
/// @param duration time that it takes for the auction to offer maximum collateral
/// @param vaultProportion proportion of a vault that will be auctioned at a time
/// @param collateralProportion proportion of the collateral that will be paid out
/// at the begining of an auction
/// @param max If the aggregated collateral under auction for vaults of this pair
/// exceeds this number, no more auctions of for this pair can be started.
export const v2Limits: AuctionLineAndLimit[] = [
  // ETH
  {
    baseId: DAI,
    ilkId: ETH,
    duration: 600,
    vaultProportion: parseUnits('0.5'),
    collateralProportion: parseUnits('0.75'), // 105 / 140
    max: parseUnits('1000'),
  },
  {
    baseId: USDC,
    ilkId: ETH,
    duration: 600,
    vaultProportion: parseUnits('0.5'),
    collateralProportion: parseUnits('0.75'), // 105 / 140
    max: parseUnits('1000'),
  },
  {
    baseId: FRAX,
    ilkId: ETH,
    duration: 600,
    vaultProportion: parseUnits('0.5'),
    collateralProportion: parseUnits('0.75'), // 105 / 140
    max: parseUnits('1000'),
  },
  // USDC
  {
    baseId: ETH,
    ilkId: USDC,
    duration: 600,
    vaultProportion: parseUnits('0.5'),
    collateralProportion: parseUnits('0.75'), // 105 / 140
    max: parseUnits('1000000', 6),
  },
  {
    baseId: DAI,
    ilkId: USDC,
    duration: 600,
    vaultProportion: parseUnits('1'),
    collateralProportion: parseUnits('0.9545454545'), // 105 / 110
    max: parseUnits('1000000', 6),
  },
  {
    baseId: FRAX,
    ilkId: USDC,
    duration: 600,
    vaultProportion: parseUnits('1'),
    collateralProportion: parseUnits('0.9545454545'), // 105 / 110
    max: parseUnits('1000000', 6),
  },
  // YVUSDC
  {
    baseId: USDC,
    ilkId: YVUSDC,
    duration: 600,
    vaultProportion: parseUnits('1'),
    collateralProportion: parseUnits('0.84'), // 105 / 125
    max: parseUnits('1000000', 6),
  },
  // WBTC
  {
    baseId: ETH,
    ilkId: WBTC,
    duration: 600,
    vaultProportion: parseUnits('0.5'),
    collateralProportion: parseUnits('0.7'), // 105 / 150
    max: parseUnits('100', 8),
  },
  {
    baseId: DAI,
    ilkId: WBTC,
    duration: 600,
    vaultProportion: parseUnits('0.5'),
    collateralProportion: parseUnits('0.7'), // 105 / 150
    max: parseUnits('100', 8),
  },
  {
    baseId: USDC,
    ilkId: WBTC,
    duration: 600,
    vaultProportion: parseUnits('0.5'),
    collateralProportion: parseUnits('0.7'), // 105 / 150
    max: parseUnits('100', 8),
  },
  {
    baseId: FRAX,
    ilkId: WBTC,
    duration: 600,
    vaultProportion: parseUnits('0.5'),
    collateralProportion: parseUnits('0.7'), // 105 / 150
    max: parseUnits('100', 8),
  },
  // WSTETH
  {
    baseId: ETH,
    ilkId: WSTETH,
    duration: 600,
    vaultProportion: parseUnits('0.5'),
    collateralProportion: parseUnits('0.84'), // 105 / 125
    max: parseUnits('1000'),
  },
  {
    baseId: DAI,
    ilkId: WSTETH,
    duration: 600,
    vaultProportion: parseUnits('0.5'),
    collateralProportion: parseUnits('0.75'), // 105 / 140
    max: parseUnits('1000'),
  },
  {
    baseId: USDC,
    ilkId: WSTETH,
    duration: 600,
    vaultProportion: parseUnits('0.5'),
    collateralProportion: parseUnits('0.75'), // 105 / 140
    max: parseUnits('1000'),
  },
  {
    baseId: FRAX,
    ilkId: WSTETH,
    duration: 600,
    vaultProportion: parseUnits('0.5'),
    collateralProportion: parseUnits('0.75'), // 105 / 140
    max: parseUnits('1000'),
  },
  // LINK
  {
    baseId: ETH,
    ilkId: LINK,
    duration: 600,
    vaultProportion: parseUnits('0.5'),
    collateralProportion: parseUnits('0.7'), // 105 / 150
    max: parseUnits('10000'),
  },
  {
    baseId: DAI,
    ilkId: LINK,
    duration: 600,
    vaultProportion: parseUnits('0.5'),
    collateralProportion: parseUnits('0.62'), // 105 / 167
    max: parseUnits('10000'),
  },
  {
    baseId: USDC,
    ilkId: LINK,
    duration: 600,
    vaultProportion: parseUnits('0.5'),
    collateralProportion: parseUnits('0.62'), // 105 / 167
    max: parseUnits('10000'),
  },
  {
    baseId: FRAX,
    ilkId: LINK,
    duration: 600,
    vaultProportion: parseUnits('0.5'),
    collateralProportion: parseUnits('0.62'), // 105 / 167
    max: parseUnits('10000'),
  },
  // ENS
  {
    baseId: ETH,
    ilkId: ENS,
    duration: 600,
    vaultProportion: parseUnits('0.5'),
    collateralProportion: parseUnits('0.7'), // 105 / 150
    max: parseUnits('10000'),
  },
  {
    baseId: DAI,
    ilkId: ENS,
    duration: 600,
    vaultProportion: parseUnits('0.5'),
    collateralProportion: parseUnits('0.62'), // 105 / 167
    max: parseUnits('10000'),
  },
  {
    baseId: USDC,
    ilkId: ENS,
    duration: 600,
    vaultProportion: parseUnits('0.5'),
    collateralProportion: parseUnits('0.62'), // 105 / 167
    max: parseUnits('10000'),
  },
  {
    baseId: FRAX,
    ilkId: ENS,
    duration: 600,
    vaultProportion: parseUnits('0.5'),
    collateralProportion: parseUnits('0.62'), // 105 / 167
    max: parseUnits('10000'),
  },
  // UNI
  {
    baseId: ETH,
    ilkId: UNI,
    duration: 600,
    vaultProportion: parseUnits('0.5'),
    collateralProportion: parseUnits('0.7'), // 105 / 150
    max: parseUnits('10000'),
  },
  {
    baseId: DAI,
    ilkId: UNI,
    duration: 600,
    vaultProportion: parseUnits('0.5'),
    collateralProportion: parseUnits('0.62'), // 105 / 167
    max: parseUnits('10000'),
  },
  {
    baseId: USDC,
    ilkId: UNI,
    duration: 600,
    vaultProportion: parseUnits('0.5'),
    collateralProportion: parseUnits('0.62'), // 105 / 167
    max: parseUnits('10000'),
  },
  {
    baseId: FRAX,
    ilkId: UNI,
    duration: 600,
    vaultProportion: parseUnits('0.5'),
    collateralProportion: parseUnits('0.62'), // 105 / 167
    max: parseUnits('10000'),
  },
]

/// @notice Limits to be used in an auction
/// @param base identifier (bytes6 tag)
/// @param Maximum concurrently auctionable for this asset, modified by decimals
/// @param Minimum vault debt, modified by decimals
/// @param Decimals to append to auction ceiling and minimum vault debt.
export const v1Limits: Array<[string, number, number, number]> = [
  [ETH, 0, 1500000, 12], // DAI/ETH is 72% LTV
  [DAI, 0, 5000, 18], // USDC/DAI is 76% LTV
  [USDC, 0, 5000, 6], // DAI/USDC is 76% LTV
  [WBTC, 0, 1200, 4], // ETH/WBTC is 67% LTV
  [WSTETH, 0, 1500000, 12], // ETH/WSTETH is 80% LTV
  [LINK, 0, 300, 18], // ETH/LINK is 67% LTV
  [ENS, 0, 250, 18], // ETH/ENS is 67% LTV
  [YVUSDC, 0, 5000, 6], // USDC/YVUSDC is 80% LTV
  [UNI, 0, 400, 18], // ETH/UNI is 67% LTV
  [FRAX, 0, 400, 18], // DAI/FRAX is 91% LTV
]

Testing

Testing will be done in production