- IF new D3M is being onboarded
- Ensure
ilk
follows the ilk formatDIRECT-XXX-YYY
(whereXXX
is the unique name of the module, such asSPARK
,SPARK-AAVE
andYYY
is the token such asDAI
,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_
matchesbytes32
representation of ilk name in the Exec Sheet -
hub_
matchesDIRECT_HUB
from the chainlog - IF
dai
exists, it matchesMCD_DAI
from the chainlog - IF
daiJoin
exists, it matchesMCD_JOIN_DAI
from the chainlog - IF
usdsJoin
exists, it matchesUSDS_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_
matchesMCD_VAT
-
ilk_
matchesbytes32
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
hasoperator
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 toDIRECT_HUB
from the chainlog - IF
king
exists, it is set toMCD_PAUSE_PROXY
from the chainlog - IF other state variable values are specified in the Exec sheet, they are set correctly
-
D3MOracle
-
hub
is set toDIRECT_HUB
from the chainlog
-
DIRECT_HUB
ilk
is added correctly-
plan
is set toD3MPlan
address for the current D3M -
pool
is set toD3MPool
address for the current D3M -
tau
is set to the value in the Exec sheet -
culled
andtic
values are not updated
-
MCD_VAT
-
ilk
is initialized usingvat.init(ilk)
-
MCD_JUG
-
ilk
is initialized usingjug.init(ilk)
-
MCD_SPOT
-
pip
is set to the currentD3MOracle
address usingspotter.file(ilk, 'pip', address(D3MOracle))
-
mat
is set toRAY (10 ** 27)
usingspotter.file(ilk, 'mat', 10 **27)
-
spotter.poke(ilk)
is called after set values above to updateilk.spot
invat
-
MCD_IAM_AUTO_LINE
ilk
is set usingsetIlk
-
ilk
matchesilk
name -
line
matchesmaxLine
value in the Exec sheet -
gap
matchesgap
value in the Exec sheet -
ttl
matchesttl
value in the Exec sheet
-
ILK_REGISTRY
ilk
is added usingilkRegistry.put
-
_ilk
matchesilk
name -
_join
matchesDIRECT_HUB
address from the chainlog -
_gem
matches the current D3MD3MPool.redeemable()
address -
_dec
matches the current D3MD3MPool.redeemable()
tokens decimal -
_class
matches4
(ilk registry class for D3Ms
) -
_pip
matches the current D3MD3MOracle
address -
_xlip
matchesaddress(0)
-
_name
matches the current D3MD3MPool.redeemable()
tokens name -
_symbol
matches the current D3MD3MPool.redeemable()
tokens symbol
-
CHAINLOG
D3MPlan
is added to the chainlog- Correct address is added
- Name follows pattern
ILK_PREFIX_PLAN
(ILK_PREFIX
matchesScriptTools.ilkToChainlogFormat(ilk)
return value)
D3MPool
is added to the chainlog- Correct address is added
- Name follows pattern
ILK_PREFIX_POOL
(ILK_PREFIX
matchesScriptTools.ilkToChainlogFormat(ilk)
return value)
D3MOracle
is added to the chainlog- Correct address is added
- Name follows pattern
ILK_PREFIX_ORACLE
(ILK_PREFIX
matchesScriptTools.ilkToChainlogFormat(ilk)
return value)
-
Chainlog
version is bumped
- 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 byMCD_PAUSE_PROXY
or by theoperator
(if present inD3MPlan
) through settingtargetRate
ortargetAsset
directly. -
getTargetAssets
returns correct amount
- Ensure
- IF
D3MPool
-
hub
matchesDIRECT_HUB
from the chainlog -
ilk
matches bytes32 representation of ilk name in the Exec Sheet -
vat
matchesMCD_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 matchesMCD_DAI
from the chainlog - IF
daiJoin
exists, it matchesMCD_JOIN_DAI
from the chainlog - IF
usds
exists, it matchesUSDS
from the chainlog - IF
usdsJoin
exists, it matchesUSDS_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 matchesMCD_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
matchesMCD_VOW
from the chainlog -
end
matchesMCD_END
from the chainlog - E2E test
-
hub.exec(ilk)
updates debt correctly
-
-
D3MOracle
-
hub
matchesDIRECT_HUB
from the chainlog
-
D3MMom
-
authority
matchesMCD_ADM
from the chainlog - E2E test
-
mom.disable(D3MPlan)
deactivate the plan contract - Executing
hub.exec(ilk)
after disabling plan, update bothink
,art
to a value< 1 * WAD
-
-
MCD_SPOT
:-
spotter(D3M_ILK).mat
is set to 100% (1 * RAY
) (:information_source: covered inconfig.sol
) -
spotter(D3M_ILK).pip
is set toD3MOracle
address
-
ILK_REGISTRY
- New ilk is added to the registry
-
join
matchesDIRECT_HUB
address from the chainlog -
gem
matches the current D3MD3MPool.redeemable()
address -
dec
matches the current D3MD3MPool.redeemable()
tokens decimal -
class
matches4
(ilk registry class for D3Ms
) -
pip
matches the current D3MD3MOracle
address -
xlip
matchesaddress(0)
-
name
matches the current D3MD3MPool.redeemable()
tokens name -
symbol
matches the current D3MD3MPool.redeemable()
tokens symbol
- Ensure