Skip to content

Latest commit

 

History

History
151 lines (150 loc) · 9.5 KB

d3m-checklist.md

File metadata and controls

151 lines (150 loc) · 9.5 KB

D3M Checklist

  • IF new D3M is being onboarded
    • Ensure ilk follows the ilk format DIRECT-XXX-YYY (where XXX is the unique name of the module, such as SPARK, SPARK-AAVE and YYY is the token such as DAI, USDS)
    • Ensure the following contracts are deployed
      • D3MPlan
        • Optimizer is enabled
        • Optimize runs is set to 200
        • Deployed contract matches the code in the repo directory
        • Constructor params:
          • IF params exist, they match relevant values or addresses found in the Exec Sheet
        • wards state variable
          • MCD_PAUSE_PROXY is relied
          • Deployer is denied
          • No other address has been relied
      • D3MPool
        • Optimizer is enabled
        • Optimize runs is set to 200
        • Deployed contract matches the code in the repo directory
        • Constructor params:
          • ilk_ matches bytes32 representation of ilk name in the Exec Sheet
          • hub_ matches DIRECT_HUB from the chainlog
          • IF dai exists, it matches MCD_DAI from the chainlog
          • IF daiJoin exists, it matches MCD_JOIN_DAI from the chainlog
          • IF usdsJoin exists, it matches USDS_JOIN from the chainlog
          • IF other params exist, they match values or addresses in the Exec sheet
        • wards state variable
          • MCD_PAUSE_PROXY is relied
          • Deployer is denied
          • No other address has been relied
      • D3MOracle
        • Optimizer is enabled
        • Optimize runs is set to 200
        • Deployed contract matches the code in the repo
        • Constructor params:
          • vat_ matches MCD_VAT
          • ilk_ matches bytes32 representation of ilk name in the Exec Sheet
        • wards state variable
          • MCD_PAUSE_PROXY is relied
          • Deployer is denied
          • No other address has been relied
      • IF D3MPlan has operator state variable
        • operator is a known multisig contract
        • Address is present in the Exec Sheet
      • IF any other contract is required as part of the new D3M module
        • Deployed contract is verified on etherscan
        • Address is present in the Exec Sheet
    • Ensure the following values are initialized
      • D3MPlan
        • DIRECT_MOM is relied
        • IF operator exists, it is set to the address in the Exec sheet
        • IF other state variable values are specified in the Exec sheet, they are set correctly
      • D3MPool
        • hub is set to DIRECT_HUB from the chainlog
        • IF king exists, it is set to MCD_PAUSE_PROXY from the chainlog
        • IF other state variable values are specified in the Exec sheet, they are set correctly
      • D3MOracle
        • hub is set to DIRECT_HUB from the chainlog
      • DIRECT_HUB
        • ilk is added correctly
          • plan is set to D3MPlan address for the current D3M
          • pool is set to D3MPool address for the current D3M
          • tau is set to the value in the Exec sheet
          • culled and tic values are not updated
      • MCD_VAT
      • MCD_JUG
      • MCD_SPOT
      • MCD_IAM_AUTO_LINE
        • ilk is set using setIlk
          • ilk matches ilk name
          • line matches maxLine value in the Exec sheet
          • gap matches gap value in the Exec sheet
          • ttl matches ttl value in the Exec sheet
      • ILK_REGISTRY
        • ilk is added using ilkRegistry.put
          • _ilk matches ilk name
          • _join matches DIRECT_HUB address from the chainlog
          • _gem matches the current D3M D3MPool.redeemable() address
          • _dec matches the current D3M D3MPool.redeemable() tokens decimal
          • _class matches 4 (ilk registry class for D3Ms)
          • _pip matches the current D3M D3MOracle address
          • _xlip matches address(0)
          • _name matches the current D3M D3MPool.redeemable() tokens name
          • _symbol matches the current D3M D3MPool.redeemable() tokens symbol
      • CHAINLOG
    • Ensure the following functionality is covered with tests
      • D3MPlan
        • IF operator exists, it matches the address in the Exec sheet
        • IF other state variable values are specified in the Exec sheet, they are set correctly
        • E2E test
          • Ensure targetAssets can be updated either by MCD_PAUSE_PROXY or by the operator (if present in D3MPlan) through setting targetRate or targetAsset directly.
          • getTargetAssets returns correct amount
      • D3MPool
        • hub matches DIRECT_HUB from the chainlog
        • ilk matches bytes32 representation of ilk name in the Exec Sheet
        • vat matches MCD_VAT from the chainlog
        • Contract is activated (i.e. require(D3MPool.active()))
        • redeemable matches Liquidity pool token address or vault address
        • IF other state variable values are specified in the Exec sheet, they are set correctly
        • D3MMom is relied (i.e. plan.wards(address(mom)))
        • IF dai exists, it matches MCD_DAI from the chainlog
        • IF daiJoin exists, it matches MCD_JOIN_DAI from the chainlog
        • IF usds exists, it matches USDS from the chainlog
        • IF usdsJoin exists, it matches USDS_JOIN from the chainlog
        • IF Liquidity pool token exists, it matches the address in the Exec sheet
        • IF vault exists, it matches the address in the Exec sheet
        • IF king exists, it matches MCD_PAUSE_PROXY from the chainlog
      • D3MHub
        • ilk.pool matches the address in the Exec sheet
        • ilk.plan matches the address in the Exec sheet
        • ilk.tau matches the value in the Exec sheet
        • ilk.culled is 0
        • vow matches MCD_VOW from the chainlog
        • end matches MCD_END from the chainlog
        • E2E test
          • hub.exec(ilk) updates debt correctly
      • D3MOracle
        • hub matches DIRECT_HUB from the chainlog
      • D3MMom
        • authority matches MCD_ADM from the chainlog
        • E2E test
          • mom.disable(D3MPlan) deactivate the plan contract
          • Executing hub.exec(ilk) after disabling plan, update both ink, art to a value < 1 * WAD
      • MCD_SPOT:
        • spotter(D3M_ILK).mat is set to 100% (1 * RAY) (:information_source: covered in config.sol)
        • spotter(D3M_ILK).pip is set to D3MOracle address
      • ILK_REGISTRY
        • New ilk is added to the registry
        • join matches DIRECT_HUB address from the chainlog
        • gem matches the current D3M D3MPool.redeemable() address
        • dec matches the current D3M D3MPool.redeemable() tokens decimal
        • class matches 4 (ilk registry class for D3Ms)
        • pip matches the current D3M D3MOracle address
        • xlip matches address(0)
        • name matches the current D3M D3MPool.redeemable() tokens name
        • symbol matches the current D3M D3MPool.redeemable() tokens symbol