Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: create d3m checklist #41

Merged
merged 11 commits into from
Sep 20, 2024
156 changes: 156 additions & 0 deletions spell/d3m-checklist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
# 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](https://github.com/makerdao/dss-direct-deposit/tree/master/src/plans)
- 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](https://github.com/makerdao/dss-direct-deposit/tree/master/src/pools)
- Constructor params:
- [ ] `ilk_` matches bytes32 representation of ilk name in Exec Sheet
SidestreamStrongStrawberry marked this conversation as resolved.
Show resolved Hide resolved
- [ ] `hub_` matches `DIRECT_HUB` from chainlog
- [ ] IF dai exist, it matches `MCD_DAI` from chainlog
SidestreamStrongStrawberry marked this conversation as resolved.
Show resolved Hide resolved
- [ ] IF `daiJoin` exist, it matches `MCD_JOIN_DAI` from chainlog
- [ ] IF `usdsJoin` exist, it matches `USDS_JOIN` from chainlog
SidestreamStrongStrawberry marked this conversation as resolved.
Show resolved Hide resolved
- [ ] IF other params exist, they match value or address in 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](https://github.com/makerdao/dss-direct-deposit/blob/master/src/D3MOracle.sol)
- Constructor params:
- [ ] `vat_` matches `MCD_VAT`
- [ ] `ilk_` matches bytes32 representation of ilk name in 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
- [ ] Ensure it's a known multisig contract
SidestreamStrongStrawberry marked this conversation as resolved.
Show resolved Hide resolved
- [ ] The address is present in the Exec Sheet
- IF any other contract is required as part of the new D3M module
- [ ] Verified on etherscan
- [ ] The address is present in the Exec Sheet
- Ensure the following values are initialized
- `D3MPlan`
- [ ] `DIRECT_MOM` is relied
- [ ] IF `operator` exist, it is set to address in Exec sheet
SidestreamStrongStrawberry marked this conversation as resolved.
Show resolved Hide resolved
- [ ] IF other `State variable` values specified in Exec sheet, they are set correctly
SidestreamStrongStrawberry marked this conversation as resolved.
Show resolved Hide resolved
- `D3MPool`
- [ ] `hub` is set to `DIRECT_HUB` from chainlog
- [ ] `ilk` name matches
SidestreamStrongStrawberry marked this conversation as resolved.
Show resolved Hide resolved
- [ ] `vat` is set to `MCD_VAT` from chainlog
- [ ] IF `king` exist, it is set to `MCD_PAUSE_PROXY` from chainlog
SidestreamStrongStrawberry marked this conversation as resolved.
Show resolved Hide resolved
- [ ] IF other `State variable` values specified in Exec sheet, they are set correctly
SidestreamStrongStrawberry marked this conversation as resolved.
Show resolved Hide resolved
- `D3MOracle`
- [ ] `hub` is set to `DIRECT_HUB` from chainlog
- `DIRECT_HUB`
- `ilk` is added correctly
- [ ] `plan` is set to `D3MPlan` address for current D3M
- [ ] `pool` is set to `D3MPool` address for current D3M
- [ ] `tau` is set to value in Exec sheet
SidestreamStrongStrawberry marked this conversation as resolved.
Show resolved Hide resolved
- [ ] `culled` and `tic` values are not updated
- `MCD_VAT`
- [ ] `ilk` is initialized using [`vat.init(ilk)`](https://github.com/makerdao/dss/blob/fa4f6630afb0624d04a003e920b0d71a00331d98/src/vat.sol#L100-L103)
- [ ] `Line` is updated to `vat.Line() + gap`
SidestreamStrongStrawberry marked this conversation as resolved.
Show resolved Hide resolved
- `MCD_JUG`
- [ ] `ilk` is initialized using [`jug.init(ilk)`](https://github.com/makerdao/dss/blob/fa4f6630afb0624d04a003e920b0d71a00331d98/src/jug.sol#L101-L106)
- `MCD_SPOT`
- [ ] `pip` is set to current `D3MOracle` address using [`spotter.file(ilk, 'pip', address(D3MOracle))`](https://github.com/makerdao/dss/blob/fa4f6630afb0624d04a003e920b0d71a00331d98/src/spot.sol#L81-L85)
- [ ] `mat` is set to `RAY (10 ** 27)` using [`spotter.file(ilk, 'mat', 10 **27)`](https://github.com/makerdao/dss/blob/fa4f6630afb0624d04a003e920b0d71a00331d98/src/spot.sol#L91-L95)
- [ ] [`spotter.poke(ilk)`](https://github.com/makerdao/dss/blob/fa4f6630afb0624d04a003e920b0d71a00331d98/src/spot.sol#L98-L103) is called after set values above to update `ilk.spot` in `vat`
- `MCD_IAM_AUTO_LINE`
- `ilk` is set using [`setIlk`](https://github.com/makerdao/dss-auto-line/blob/bff7e6cc43dbd7d9a054dd359ef18a1b4d06b6f5/src/DssAutoLine.sol#L81-L86)
- [ ] `ilk` matches `ilk` name
- [ ] `line` matches `maxLine` value in Exec sheet
- [ ] `gap` matches `gap` value in Exec sheet
- [ ] `ttl` matches `ttl` value in Exec sheet
- `ILK_REGISTRY`
- `ilk` is added using [`ilkRegistry.put`](https://github.com/makerdao/ilk-registry/blob/1d65fb6e17c28e9e94ac88f0d8ccad04d8945f3c/src/IlkRegistry.sol#L389-L427)
- [ ] `_ilk` matches `ilk` name
- [ ] `_join` matches `DIRECT_HUB` address from chainlog
- [ ] `_gem` matches current D3M `D3MPool.redeemable()` address
- [ ] `_dec` matches current D3M `D3MPool.redeemable()` tokens decimal
- [ ] `_class` matches `4` (`ilk registry class for D3Ms`)
- [ ] `_pip` matches current D3M `D3MOracle` address
- [ ] `_xlip` matches `address(0)`
- [ ] `_name` matches current D3M `D3MPool.redeemable()` tokens name
- [ ] `_symbol` matches current D3M `D3MPool.redeemable()` tokens symbol
- `CHAINLOG`
- `D3MPlan` is added to chainlog
- [ ] Correct address is added
- [ ] Name follows pattern `ILK_PREFIX_PLAN` (`ILK_PREFIX` matches [`ScriptTools.ilkToChainlogFormat(ilk)`](https://github.com/makerdao/dss-test/blob/36ff4adbcb35760614e0d2df864026991c23d028/src/ScriptTools.sol#L226-L239) return value)
- `D3MPool` is added to chainlog
- [ ] Correct address is added
- [ ] Name follows pattern `ILK_PREFIX_POOL` (`ILK_PREFIX` matches [`ScriptTools.ilkToChainlogFormat(ilk)`](https://github.com/makerdao/dss-test/blob/36ff4adbcb35760614e0d2df864026991c23d028/src/ScriptTools.sol#L226-L239) return value)
- `D3MOracle` is added to chainlog
- [ ] Correct address is added
- [ ] Name follows pattern `ILK_PREFIX_ORACLE` (`ILK_PREFIX` matches [`ScriptTools.ilkToChainlogFormat(ilk)`](https://github.com/makerdao/dss-test/blob/36ff4adbcb35760614e0d2df864026991c23d028/src/ScriptTools.sol#L226-L239) return value)
- [ ] Bump `Chainlog` version
- Ensure the following functionality is covered with tests
- `D3MPlan`
- [ ] IF `operator` exist, it matches the address in Exec sheet
SidestreamStrongStrawberry marked this conversation as resolved.
Show resolved Hide resolved
- [ ] IF other `State variable` values specified in Exec sheet, they are set correctly
SidestreamStrongStrawberry marked this conversation as resolved.
Show resolved Hide resolved
- 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 chainlog
- [ ] `ilk` matches bytes32 representation of ilk name in Exec Sheet
- [ ] `vat` matches `MCD_VAT` from chainlog
- [ ] Contract is activated (i.e. `require(D3MPool.active())`)
- [ ] `redeemable` matches Liquidity pool token address or vault address
- [ ] IF other `State variable` values specified in Exec sheet, they are set correctly
SidestreamStrongStrawberry marked this conversation as resolved.
Show resolved Hide resolved
- [ ] `D3MMom` is relied (i.e. `plan.wards(address(mom))`)
- [ ] IF `dai` exists, address matches `MCD_DAI` from chainlog
- [ ] IF `daiJoin` exists, address matches `MCD_JOIN_DAI` from chainlog
- [ ] IF `usds` exists, address matches `USDS` from chainlog
- [ ] IF `usdsJoin` exists, address matches `USDS_JOIN` from chainlog
SidestreamStrongStrawberry marked this conversation as resolved.
Show resolved Hide resolved
- [ ] IF Liquidity pool token exists, it matches the address in Exec sheet
- [ ] IF `vault` exists, it matches the address in Exec sheet
- [ ] IF `king` exists, address matches `MCD_PAUSE_PROXY` from chainlog
- `D3MHub`
- [ ] `ilk.pool` address matches the address in Exec sheet
- [ ] `ilk.plan` address matches the address in Exec sheet
- [ ] `ilk.tau` value matches the value in Exec sheet
SidestreamStrongStrawberry marked this conversation as resolved.
Show resolved Hide resolved
- [ ] `ilk.culled` value is 0
- [ ] `vow` address matches `MCD_VOW` from chainlog
- [ ] `end` address matches `MCD_END` from chainlog
SidestreamStrongStrawberry marked this conversation as resolved.
Show resolved Hide resolved
- E2E test
- [ ] `hub.exec(ilk)` updates debt correctly
- `D3MOracle`
- [ ] `hub` address matches `DIRECT_MOM` from chainlog
SidestreamStrongStrawberry marked this conversation as resolved.
Show resolved Hide resolved
- `D3MMom`
- [ ] `authority` matches `MCD_ADM` from chainlog
- E2E test
- [ ] `mom.disable(D3MPlan)` deactivate the plan contract
- [ ] Executing `hub.exec(ilk)` after disabling plan, update both `ink`, `art` to smaller than `WAD`
SidestreamStrongStrawberry marked this conversation as resolved.
Show resolved Hide resolved
- `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 chainlog
- [ ] `gem` matches current D3M `D3MPool.redeemable()` address
- [ ] `dec` matches current D3M `D3MPool.redeemable()` tokens decimal
- [ ] `class` matches `4` (`ilk registry class for D3Ms`)
- [ ] `pip` matches current D3M `D3MOracle` address
- [ ] `xlip` matches `address(0)`
- [ ] `name` matches current D3M `D3MPool.redeemable()` tokens name
- [ ] `symbol` matches current D3M `D3MPool.redeemable()` tokens symbol
- `MCD_VAT`
- [ ] `DIRECT_HUB` is relied (i.e. `vat.wards(address(hub))`)
SidestreamStrongStrawberry marked this conversation as resolved.
Show resolved Hide resolved
1 change: 1 addition & 0 deletions spell/spell-reviewer-mainnet-checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@
* IF PSM migration, onboarding or offboarding is present:
* [ ] Insert and follow the relevant checklists below:
* [PSM Checklists](./psm-checklists.md)
* [ ] IF D3M onboarding is present, insert and follow [D3M Checklist](./d3m-checklist.md)
* IF collateral offboarding is present in the spell
* 1st stage collateral offboarding
* [ ] Collateral type (`ilk`) is removed from AutoLine (`MCD_IAM_AUTO_LINE`) IF currently enabled
Expand Down
Loading