Skip to content

Latest commit

 

History

History
129 lines (115 loc) · 4.7 KB

YPP-0055.md

File metadata and controls

129 lines (115 loc) · 4.7 KB

Proposal

Deploy & configure contracts needed by Contango. Step 3

Background

Contango exchange uses fixed rate markets to synthesise expirable futures. In order to allow for a smoother interaction, Yield will deploy a set of contracts specially tailored for Contango. This is the third proposal (out of 3) that'll allow for the full integration with Contango.

Details

Here are the steps:

  1. Deploy ContangoWitch (no need for governance approval)
  2. Governance proposal
    1. Configure ContangoWitch
      1. Grant permissions to ContangoWitch
      2. Configure assets and limits on ContangoWitch
    2. Give Contango permissions to create vaults on ContangoLadle

Script that performed said actions: https://github.com/yieldprotocol/environments-v2/blob/9ce65d72eece5de5fb002432175455185eb0545d/scripts/governance/contango/arbitrum/deployContango-2.sh

Configuration applied:

export interface AuctionLineAndLimit {
  baseId: string
  ilkId: string
  duration: number
  vaultProportion: BigNumber
  collateralProportion: BigNumber
  max: BigNumber
}
export const auctionLineAndLimits: AuctionLineAndLimit[] = [
  // ETH
  {
    baseId: ETH,
    ilkId: FYUSDC2209,
    duration: 600,
    vaultProportion: parseUnits('0.5'),
    collateralProportion: parseUnits('0.75'), // 105 / 140
    max: parseUnits('500'),
  },
  {
    baseId: ETH,
    ilkId: FYDAI2209,
    duration: 600,
    vaultProportion: parseUnits('0.5'),
    collateralProportion: parseUnits('0.75'), // 105 / 140
    max: parseUnits('1000000'),
  },
  // USDC
  {
    baseId: USDC,
    ilkId: FYETH2209,
    duration: 600,
    vaultProportion: parseUnits('0.5'),
    collateralProportion: parseUnits('0.75'), // 105 / 140
    max: parseUnits('500'),
  },
  {
    baseId: USDC,
    ilkId: FYDAI2209,
    duration: 600,
    vaultProportion: parseUnits('1'),
    collateralProportion: parseUnits('0.9545454545'), // 105 / 110
    max: parseUnits('1000000'),
  },
  // DAI
  {
    baseId: DAI,
    ilkId: FYETH2209,
    duration: 600,
    vaultProportion: parseUnits('0.5'),
    collateralProportion: parseUnits('0.75'), // 105 / 140
    max: parseUnits('500'),
  },
  {
    baseId: DAI,
    ilkId: FYUSDC2209,
    duration: 600,
    vaultProportion: parseUnits('1'),
    collateralProportion: parseUnits('0.9545454545'), // 105 / 110
    max: parseUnits('1000000'),
  },
]

The contracts have been deployed to Arbitrum mainnet and the proposal sent to the multisig.

Testing

The proposal approval & execution were tested on tenderly: https://dashboard.tenderly.co/Yield/v2-arbitrum/fork/be5b082f-1fb9-4821-9ae0-e51f05688eac

Proposal log

➜  environments-v2 git:(deploy-contango-cauldron) ✗ sh scripts/governance/contango/arbitrum/deployContango-2.sh
++ dirname scripts/governance/contango/arbitrum/deployContango-2.sh
+ HERE=scripts/governance/contango/arbitrum
+ export CONF=/Users/egillhreinsson/dev/environments-v2/scripts/governance/contango/arbitrum/contango.arb_mainnet.config
+ CONF=/Users/egillhreinsson/dev/environments-v2/scripts/governance/contango/arbitrum/contango.arb_mainnet.config
+ RUN='npx hardhat run --network arb_mainnet'
+ npx hardhat run --network arb_mainnet scripts/governance/contango/arbitrum/orchestrateContango-2.ts
witch.grantRoles(timelock)
cauldron.grantRoles(witch)
cloak.plan(witch): 0x689599e4051408656daa12d2a8c63ccebd4e5fe2f45a36b691f35eb492800562
cloak.plan(witch, join(01)): 0x6680e451af95bf0e74f16bdba0898128de1202cfb8111de9c312e830d096c544
cloak.plan(witch, join(02)): 0xbcbf87c795c2bcaf3f27772cebcb9e7cb534e483cc5f667e3d4cc4ee673f8774
cloak.plan(witch, join(00)): 0xbb98049a392711b75b3d2b6d884405dc0be2daead632867d00304b25fb8f320b
cloak.plan(witch, burn(0107)): 0x112e5921525c9700945dd791a370d7bb287ed2841c37d8edec1077ac98bc2f56
cloak.plan(witch, burn(0207)): 0xf16bef48dbf228d26df47bea41dfd7dc79ec663d3a3506e87d88026af77e59ac
cloak.plan(witch, burn(0007)): 0xbc43a661e64564ecaf83f97613897045613425efa51900094e5bc67e10dd1254
Adding baseId: 00 - ilkId: 0207 to the Witch
Adding baseId: 00 - ilkId: 0107 to the Witch
Adding baseId: 02 - ilkId: 0007 to the Witch
Adding baseId: 02 - ilkId: 0107 to the Witch
Adding baseId: 01 - ilkId: 0007 to the Witch
Adding baseId: 01 - ilkId: 0207 to the Witch
cloak.plan(witch, exit(0207)): 0x7504274d6457b5b3832029bbbb1b21c79405a048f60a5d9d907023291140364e
cloak.plan(witch, exit(0107)): 0xa65134d929448fc82c63434acb626b61b44bf28754a07b370e2a2b65ccb31d8c
cloak.plan(witch, exit(0007)): 0xd01dbf9b897601e8f54ed95fa54fb32f034d7e047c1a772ef6df4f2d33677cff
contangoLadle.grantRole(contango)
cloak.plan(contangoLadle): 0xefa2a3762f61a34aca8a95b63ff092ae3443ea9542d47e5c1d01109642c4beb3
Proposal: 0xfbf32fbbd20c14cb755c1a178dc539882ee5627154efc5b066c6dff3b77a0944
Proposing
Developer: 0x02f73B54ccfBA5c91bf432087D60e4b3a781E497