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

Mainnet spell 2024-10-17 #433

Merged
merged 44 commits into from
Oct 18, 2024
Merged

Mainnet spell 2024-10-17 #433

merged 44 commits into from
Oct 18, 2024

Conversation

SidestreamColdMelon
Copy link
Contributor

@SidestreamColdMelon SidestreamColdMelon commented Oct 12, 2024

Description

Mainnet executive spell implemented according to the relevant Exec Sheet and Exec Doc.

Contribution Checklist

  • Code approved
  • Tests approved
  • CI Tests pass

Checklist

  • Every contract variable/method declared as public/external private/internal
  • Consider if this PR needs the officeHours modifier override
  • Verify expiration (30 days unless otherwise specified)
  • Verify hash in the description matches here
  • Validate all addresses used are in changelog or known
  • Notify any external teams affected by the spell so they have the opportunity to review
  • Deploy spell ETH_GAS_LIMIT="XXX" ETH_GAS_PRICE="YYY" make deploy
  • Verify mainnet contract on etherscan
  • Change test to use mainnet spell address and deploy timestamp
  • Run make archive-spell or make date="YYYY-MM-DD" archive-spell to make an archive directory and copy DssSpell.sol, DssSpell.t.sol, DssSpell.t.base.sol, and DssSpellCollateralOnboarding.sol
  • squash and merge this PR

Copy link
Contributor

@amusingaxl amusingaxl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some additional comments

src/DssSpell.t.sol Outdated Show resolved Hide resolved
src/DssSpell.t.sol Show resolved Hide resolved
src/DssSpell.t.base.sol Outdated Show resolved Hide resolved
src/DssSpell.t.base.sol Outdated Show resolved Hide resolved
src/DssSpell.t.sol Outdated Show resolved Hide resolved
src/test/config.sol Show resolved Hide resolved
src/test/config.sol Show resolved Hide resolved
src/test/config.sol Show resolved Hide resolved
src/DssSpell.sol Outdated Show resolved Hide resolved
src/DssSpell.sol Outdated Show resolved Hide resolved
@SidestreamStrongStrawberry
Copy link
Collaborator

Good to deploy

Mainnet Executive Spell Review Checklist

Development Stage

  • Preparation
    • Exec Sheet for the specified date is found in the "Executive Vote Implementation Process" google sheet
      Insert URL to the specific sheet here
      https://docs.google.com/spreadsheets/d/1w_z5WpqxzwreCcaveB2Ye1PP5B8QAHDglzyxKHG3CHw/edit?gid=338754189#gid=338754189
    • Using Exec Sheet URL from the above, read spell instructions from the Exec Sheet and list them below
      List all instructions announced in the Exec Sheet
      • Setup new MkrOsm
        • Whitelist MkrOsm to read from current PIP_MKR using DssExecLib.addReaderToWhitelist with the following parameters:
        • Set parameter address _oracle: PIP_MKR address from chainlog (0xdbbe5e9b1daa91430cf0772fcebe53f6c6f137df)
        • Set parameter address _reader: 0x4F94e33D0D74CfF5Ca0D3a66F1A650628551C56b
      • Set MkrOsm as "PIP_MKR" in the chainlog using the following parameters:
        • Set parameter bytes32 _key: "PIP_MKR"
        • Set parameter address _val: 0x4F94e33D0D74CfF5Ca0D3a66F1A650628551C56b
      • Setup new VoteDelegateFactory
        • Rename "VOTE_DELEGATE_PROXY_FACTORY" to "VOTE_DELEGATE_FACTORY_LEGACY" in chainlog:
      • Call DssExecLib.setChangelogAddress with the following parameters:
        • Set parameter bytes32 _key: "VOTE_DELEGATE_FACTORY_LEGACY"
        • Set parameter address _val: VOTE_DELEGATE_PROXY_FACTORY address (0xd897f108670903d1d6070fcf818f9db3615af272) from the chainlog
      • Call CHAINLOG.removeAddress with the following parameters:
        • Set parameter bytes32 _key: "VOTE_DELEGATE_PROXY_FACTORY"
      • Set "VOTE_DELEGATE_FACTORY" in the chainlog to 0xC3D809E87A2C9da4F6d98fECea9135d834d6F5A0
      • Setup Lockstake Engine
        • SBE Parameter Changes
          • Decrease splitter "burn" rate by 30% from 100% to 70% with the following parameters:
            • Decrease splitter "burn" with address _base: MCD_SPLIT from chainlog
            • Decrease splitter "burn" with bytes32 _what: "burn"
            • Decrease splitter "burn" with uint256 _amt: 70%
          • Increase vow.hump by 5 million DAI, from 55 million DAI to 60 million DAI
          • Increase splitter.hop by 4,014 seconds, from 11,635 seconds to 15,649 seconds.
        • Set Flapper farm by calling FlapperInit.setFarm with the following parameters:
          • Set Flapper farm with address farm_ : 0x92282235a39bE957fF1f37619fD22A9aE5507CB1
          • Set Flapper farm with address splitter: MCD_SPLIT from chainlog
          • Set Flapper farm with address usdsJoin: USDS_JOIN from chainlog
          • Set Flapper farm with uint256 hop: 15,649
          • Set Flapper farm with bytes32 prevChainlogKey: bytes32(0)
          • Set Flapper farm with chainlogKey: "REWARDS_LSMKR_USDS"
        • "Under the hood" actions for setting flapper:
          • LsMkrUsdsFarm will be set as "farm" in MCD_SPLIT
          • MCD_SPLIT will be set as "rewardsDistribution" in LsMkrUsdsFarm
          • Provided "hop" will be set as "rewardsDuration" in LsMkrUsdsFarm
          • New chainlog key REWARDS_LSMKR_USDS will be added
      • Init Lockstake Engine by calling LockstakeInit.initLockstake with the following parameters:
        • Init Lockstake Engine with address lsmkr: 0xb4e0e45e142101dC3Ed768bac219fC35EDBED295
        • Init Lockstake Engine with address engine: 0x2b16C07D5fD5cC701a0a871eae2aad6DA5fc8f12
        • Init Lockstake Engine with address clipper: 0xA85621D35cAf9Cf5C146D2376Ce553D7B78A6239
        • Init Lockstake Engine with address clipperCalc: 0xf13cF3b39823CcfaE6C2354dA56416C80768474e
        • Init Lockstake Engine with bytes32 ilk: "LSE-MKR-A"
        • Init Lockstake Engine with address voteDelegateFactory: 0xC3D809E87A2C9da4F6d98fECea9135d834d6F5A0
        • Init Lockstake Engine with address usdsJoin: USDS_JOIN from chainlog
        • Init Lockstake Engine with address usds: USDS from chainlog
        • Init Lockstake Engine with address mkr: MCD_GOV from chainlog
        • Init Lockstake Engine with address mkrSky: MKR_SKY from chainlog
        • Init Lockstake Engine with address sky: SKY from chainlog
        • Init Lockstake Engine with address[] farms: 0x92282235a39bE957fF1f37619fD22A9aE5507CB1
        • Init Lockstake Engine with uint256 fee: 5%
        • Init Lockstake Engine with uint256 maxLine: 20 million DAI
        • Init Lockstake Engine with uint256 gap: 5 million
        • Init Lockstake Engine with uint256 ttl: 16 hours
        • Init Lockstake Engine with uint256 dust: 30,000 DAI
        • Init Lockstake Engine with uint256 duty: 12%
        • Init Lockstake Engine with uint256 mat: 200%
        • Init Lockstake Engine with uint256 buf: 1.20
        • Init Lockstake Engine with uint256 tail: 6,000 seconds
        • Init Lockstake Engine with uint256 cusp: 0.40
        • Init Lockstake Engine with uint256 chip: 0.1%
        • Init Lockstake Engine with uint256 tip: 300 DAI
        • Init Lockstake Engine with uint256 stopped: 0
        • Init Lockstake Engine with uint256 chop: 8%
        • Init Lockstake Engine with uint256 hole: 3 million DAI
        • Init Lockstake Engine with uint256 tau: 0
        • Init Lockstake Engine with uint256 cut: 0.99
        • Init Lockstake Engine with uint256 step: 60 seconds
        • Init Lockstake Engine with bool lineMom: true
        • Init Lockstake Engine with uint256 tolerance: 0.5
        • Init Lockstake Engine with string name: "LockstakeMkr"
        • Init Lockstake Engine with string symbol: "lsMKR"
        • "Under the hood" actions for Init Lockstake Engine:
          • New collateral type "LSE-MKR-A" will be added to "vat", "jug", "spotter", "dog" contracts
          • New collateral type "LSE-MKR-A" will be added to LINE_MOM
          • New collateral type "LSE-MKR-A" will be added to auto-line using provided maxLine, gap and ttl
          • New collateral type "LSE-MKR-A" will be added to ILK_REGISTRY with provided values ("name", "symbol") and the new ilk class 7
          • The new MKR OSM will allow MCD_SPOT, CLIPPER_MOM, LOCKSTAKE_CLIP, MCD_END to access its price.
          • PIP_MKR will be added to OSM_MOM
          • LockstakeClipper will be configured using provided values ("buf", "tail", "cusp", "chip", "tip", "stopped", "clip", "tolerance")
          • StairstepExponentialDecrease calc contract will be configured using provided values ("cut", "step")
          • The LsMkrUsdsFarm will be added to the LockstakeEngine as a first farm
          • LockstakeEngine will be authorized to access "vat"
          • LockstakeClipper will be authorized to access "vat" and LockstakeEngine
          • CLIPPER_MOM, MCD_DOG and MCD_END will be authorized to access LockstakeClipper
          • New chainlog keys LOCKSTAKE_MKR, LOCKSTAKE_ENGINE, LOCKSTAKE_CLIP and LOCKSTAKE_CLIP_CALC will be added
          • OSM_MOM will be authorized to access the new MKR OSM
      • Fund Early Bird Rewards Multisig
        • Mint 27,222,832.80 SKY to 0x14D98650d46BF7679BBD05D4f615A1547C87Bf68
      • Lower Deprecated RWA Debt Ceilings
        • Remove RWA007-A from Debt Ceiling Instant Access Module
        • Set RWA007-A Debt Ceiling to 0
        • Initiate RWA007-A soft liquidation by calling tell()
        • Write-off the debt of RWA007-A and set its oracle price to 0 by calling cull()
        • Reduce RWA014-A Debt Ceiling by 1.5 billion Dai from 1.5 billion Dai to 0
        • Initiate RWA014-A soft liquidation by calling tell()
        • Write-off the debt of RWA014-A and set its oracle price to 0 by calling cull()
      • Pinwheel DAO Resolution
        • Approve DAO Resolution at QmYJUvw5xbAJmJknG2xUKDLe424JSTWQQhbJCnucRRjUv7
      • AAVE Revenue Share Payment
        • AAVE Revenue Share - 234089 DAI - 0x464C71f6c2F760DdA6093dCB91C24c39e5d6e18c
      • Spark Spell
        • Execute Spark Proxy Spell at 0xcc3B9e79261A7064A0f734Cc749A8e3762e0a187
  • Base checks
    • Current solc version 0.8.16
    • Office hours is true IF spell introduces a major change that can affect external parties (e.g.: keepers are affected in case of collateral offboarding) OTHERWISE explicitly set to false
    • Office hours value matches the Exec Sheet
    • 30 days spell expiry set in the constructor (block.timestamp + 30 days)
  • Spell description
    • Description follows the format TARGET_DATE MakerDAO Executive Spell | Hash: EXEC_DOC_HASH
    • TARGET_DATE in the description matches the target date
    • Accompanying comment above spell description follows the format // Hash: cast keccak -- "$(wget 'EXEC_DOC_URL' -q -O - 2>/dev/null)"
  • Comments inside the spell
    • Every Section text from the Exec Sheet is copied to the spell code as a comment surrounded by the set of dashes (E.g. // ----- Section text -----)
    • Every Instruction text from the Exec Sheet is copied to the spell code as // Instruction text
    • Every Instruction text have newline above it
      ⚠️ This is not always followed, but it is a good compromise for readability
    • IF an instruction can not be taken, it should have explanation under the instruction prefixed with // Note: (e.g.: // Note: Payments are skipped on goerli)
    • IF action in the spell doesn't have relevant instruction (e.g.: chainlog version bump), the necessity of it is explained in the comment above prefixed with // Note:
    • Every proof url from the Exec Sheet, such as Reasoning URL and Authority URL is present in the spell code under relevant section or instruction (depending on which row the url is present)
    • Every proof url from the Exec Sheet, such as Reasoning URL and Authority URL have prefix derived from the url itself
      • // Executive Vote: if URL starts with https://vote.makerdao.com/executive/
      • // Poll: if URL starts with https://vote.makerdao.com/polling/
      • // Forum: if URL starts with https://forum.makerdao.com/t/
      • // MIP: if URL starts with https://mips.makerdao.com/mips/details/
  • Dependency checks
    • Update Foundry by running foundryup
    • Reinstall libraries by running rm -rf ./lib && git submodule update --init --recursive
      Insert checked out submodule paths here
      
      Submodule path 'lib/dss-exec-lib': checked out '69b658f35d8618272cd139dfc18c5713caf6b96b'
      Submodule path 'lib/dss-exec-lib/lib/dss-interfaces': checked out '9bfd7afadd1f8c217ef05850b2555691786286cb'
      Submodule path 'lib/dss-exec-lib/lib/forge-std': checked out '0aa99eb8456693c015350c5e6c4f442ebe912f77'
      Submodule path 'lib/dss-exec-lib/lib/forge-std/lib/ds-test': checked out 'cd98eff28324bfac652e63a239a60632a761790b'
      Submodule path 'lib/dss-test': checked out '36ff4adbcb35760614e0d2df864026991c23d028'
      Submodule path 'lib/dss-test/lib/dss-interfaces': checked out '9bfd7afadd1f8c217ef05850b2555691786286cb'
      Submodule path 'lib/dss-test/lib/forge-std': checked out '155d547c449afa8715f538d69454b83944117811'
      Submodule path 'lib/dss-test/lib/forge-std/lib/ds-test': checked out 'e282159d5170298eb2455a6c05280ab5a73a4ef0'
    • IF submodule upgrades are present, make sure dss-exec-lib is synced as well
    • git submodule hash of dss-exec-lib (run git submodule status) matches the latest release version or newer
    • dss-interfaces library used inside lib/dss-exec-lib matches submodule used inside lib/dss-test
  • IF interfaces are present in the spell
    • Interfaces imported from dss-interfaces
      • No unused dss-interfaces
      • Only single import layout is used (e.g. import "dss-interfaces/dss/VatAbstract.sol";)
    • Static Interfaces
      • No unused static interfaces
      • Declared static interface not present in the dss-interfaces, OTHERWISE should be imported from there
        ⚠️ RwaLiquidationOracleAbstract is present in dss-interfaces, but it contains unused methods. Therefore it's acceptable to redeclare them
      • Interface matches deployed contract using cast interface <contract_address> command
      • Interface naming style should match with Like suffix (e.g. VatLike)
      • Each static interface declare only functions actually used in the spell code
  • IF variable declarations are present in the spell
    • IF precision units are present
      • Precision units used in the spell match their defined values:
        • WAD = 10 ** 18
        • RAY = 10 ** 27
        • RAD = 10 ** 45
      • Precision units match with Numerical Ranges
      • Each variable visibility is declared as internal
      • Each variable state mutability is declared as constant
    • IF math units are present
      • Match their defined values:
        • HUNDRED = 10 ** 2
        • THOUSAND = 10 ** 3
        • MILLION = 10 ** 6
        • BILLION = 10 ** 9
      • Match with config
      • Each variable visibility is declared as internal
      • Each variable state mutability is declared as constant
    • IF rates are present
      • Rates match generated locally via make rates pct=<pct> (e.g. pct=0.75, for 0.75%)
      • Rates match IPFS document
      • Rate variable name conforms to X_PT_Y_Z_PCT_RATE (e.g. ZERO_PT_SEVEN_FIVE_PCT_RATE for 0.75%)
      • Rate variable visibility declared as internal
      • Rate variable state mutability declared as constant
    • IF timestamps are present
      • Comment above timestamp states full date including UTC timezone
      • Timestamp converts back to the correct date
      • Timestamp converts back to the UTC timezone
      • Variable naming matches MMM_DD_YYYY (e.g. JAN_01_2023 for 2023-01-01)
      • Time of day makes logical sense in the context of timestamp usage (i.e. 23:59:59 UTC for the final day of something, 00:00:00 UTC for the first day of something)
      • Each variable visibility is declared as internal
      • Each variable state mutability is declared as constant
  • IF new contract is present in the spell (not yet on chainlog or new to chainlog)
    • MkrOsm deployed contract
      • Source code is verified on etherscan
      • Compilation optimizations match deployment settings defined in the source code repo
        ⚠️ Optimization setting isn't defined in repo, but matches dapp tool default setting and previous OSM deployments like PIP_GNO
      • Every maker-related constructor argument matches chainlog (e.g. vat, dai, dog, ...)
      • IF new contract have concept of wards or access control
        • Ensure PAUSE_PROXY address was relied (wards(PAUSE_PROXY) is 1)
        • Ensure that contract deployer address was denied (wards(deployer) is 0)
        • Ensure that there are no other Rely events except for PAUSE_PROXY (using a block explorer like etherscan)
      • Source code matches corresponding github source code (e.g. diffcheck via vscode code --diff etherscan.sol github.sol)
      • Deployer address is included into addresses_deployers.sol
    • VoteDelegateFactory deployed contract
      • Source code is verified on etherscan
      • Compilation optimizations match deployment settings defined in the source code repo
        • matches value here
      • GNU AGPLv3 license
      • Every maker-related constructor argument matches chainlog (e.g. vat, dai, dog, ...)
        ⚠️ polling address isn't in the chainlog, but found in the previously deployed version of the contract VOTE_DELEGATE_PROXY_FACTORY
      • IF new contract have concept of wards or access control
        • Ensure PAUSE_PROXY address was relied (wards(PAUSE_PROXY) is 1)
        • Ensure that contract deployer address was denied (wards(deployer) is 0)
        • Ensure that there are no other Rely events except for PAUSE_PROXY (using a block explorer like etherscan)
      • Source code matches corresponding github source code (e.g. diffcheck via vscode code --diff etherscan.sol github.sol)
      • Deployer address is included into addresses_deployers.sol
    • LockstakeMkr deployed contract
      • Source code is verified on etherscan
      • Compilation optimizations match deployment settings defined in the source code repo
        • matches value here
      • GNU AGPLv3 license
      • Every maker-related constructor argument matches chainlog (e.g. vat, dai, dog, ...)
      • IF new contract have concept of wards or access control
        • Ensure PAUSE_PROXY address was relied (wards(PAUSE_PROXY) is 1)
        • Ensure that contract deployer address was denied (wards(deployer) is 0)
        • Ensure that there are no other Rely events except for PAUSE_PROXY (using a block explorer like etherscan)
      • Source code matches corresponding github source code (e.g. diffcheck via vscode code --diff etherscan.sol github.sol)
      • Deployer address is included into addresses_deployers.sol
    • LockstakeEngine deployed contract
      • Source code is verified on etherscan
      • Compilation optimizations match deployment settings defined in the source code repo
        • matches value here
      • GNU AGPLv3 license
      • Every maker-related constructor argument matches chainlog (e.g. vat, dai, dog, ...)
      • IF new contract have concept of wards or access control
        • Ensure PAUSE_PROXY address was relied (wards(PAUSE_PROXY) is 1)
        • Ensure that contract deployer address was denied (wards(deployer) is 0)
        • Ensure that there are no other Rely events except for PAUSE_PROXY (using a block explorer like etherscan)
      • Source code matches corresponding github source code (e.g. diffcheck via vscode code --diff etherscan.sol github.sol)
      • Deployer address is included into addresses_deployers.sol
    • LockstakeClipper deployed contract
      • Source code is verified on etherscan
      • Compilation optimizations match deployment settings defined in the source code repo
        • matches value here
      • GNU AGPLv3 license
      • Every maker-related constructor argument matches chainlog (e.g. vat, dai, dog, ...)
        • vat_ matches MCD_VAT
        • spotter_ matches MCD_SPOT
        • dog_ matches MCD_DOG
        • engine_ matches LockstakeEngine address above
      • IF new contract have concept of wards or access control
        • Ensure PAUSE_PROXY address was relied (wards(PAUSE_PROXY) is 1)
        • Ensure that contract deployer address was denied (wards(deployer) is 0)
        • Ensure that there are no other Rely events except for PAUSE_PROXY (using a block explorer like etherscan)
      • Source code matches corresponding github source code (e.g. diffcheck via vscode code --diff etherscan.sol github.sol)
      • Deployer address is included into addresses_deployers.sol
    • LsMkrUsdsFarm deployed contract
      • Source code is verified on etherscan
      • Compilation optimizations match deployment settings defined in the source code repo
        • matches value here
      • GNU AGPLv3 license
      • Every maker-related constructor argument matches chainlog (e.g. vat, dai, dog, ...)
      • IF new contract have concept of wards or access control
        • Ensure PAUSE_PROXY address was relied (wards(PAUSE_PROXY) is 1)
        • Ensure that contract deployer address was denied (wards(deployer) is 0)
        • Ensure that there are no other Rely events except for PAUSE_PROXY (using a block explorer like etherscan)
      • Source code matches corresponding github source code (e.g. diffcheck via vscode code --diff etherscan.sol github.sol)
      • Deployer address is included into addresses_deployers.sol
    • CalcLike deployed contract
      • Source code is verified on etherscan
      • Compilation optimizations match deployment settings defined in the source code repo
        ⚠️ No optimisation settings available for the contract as it's deployed by a factory, but it matches previous deployments such as MCD_CLIP_CALC_GNO_A
      • GNU AGPLv3 license
      • Every maker-related constructor argument matches chainlog (e.g. vat, dai, dog, ...)
      • IF new contract have concept of wards or access control
        • Ensure PAUSE_PROXY address was relied (wards(PAUSE_PROXY) is 1)
        • Ensure that contract deployer address was denied (wards(deployer) is 0)
        • Ensure that there are no other Rely events except for PAUSE_PROXY (using a block explorer like etherscan)
      • Source code matches corresponding github source code (e.g. diffcheck via vscode code --diff etherscan.sol github.sol)
        • source code matches here
      • Deployer address is included into addresses_deployers.sol
        ℹ️ Contract was deployed by CALC_FAB(address can be found in chainlog)
  • IF core system parameter changes are present in the instructions
    ℹ️ Some core system parameters have been updated in dependencies by directly calling contracts. But this is acceptable as the script was audited and it was done in a similar way in the archive patterns.
  • IF debt ceiling changes are present in the instructions
  • IF additional dependencies (i.e. ./src/dependencies/ directory) are present:
    • dss-flappers
      • IF the dependencies contracts/libraries have been audited
        • Each contract/library exactly matches (i.e. diff check) the source code of the latest audited version
      • OTHERWISE obtain the permalink to the relevant repository from a trusted party (i.e. Gov Facilitators)
        • Each contract/library exactly matches (i.e. diff check) the source code from the permalink
    • lockstake
      • IF the dependencies contracts/libraries have been audited
        • Each contract/library exactly matches (i.e. diff check) the source code of the latest audited version
      • OTHERWISE obtain the permalink to the relevant repository from a trusted party (i.e. Gov Facilitators)
        • Each contract/library exactly matches (i.e. diff check) the source code from the permalink
  • IF onboarding is present
    • Insert and follow the relevant checklists below:

      Collateral Onboarding Checklist

      ℹ️ The checklist doesn't fully match as collateral class 7 is newly added and this is not considered in the collateral onboarding checklist
      • Deployed Contracts
        • PIP (Oracle)
          • deployed via deployer (OSM)
            • contract is verified on etherscan
              • ensure solc version matches source
              • ensure optimization matches source configs
              • ensure license AGPLv3 is specified
              • ensure source matches github code (i.e. diffcheck via vscode code --diff etherscan.sol github.sol)
            • constructor args are correct
              • src (medianizer)
            • check wards
              • MCD_PAUSE_PROXY is relied
              • deployer is denied
              • no other address has been relied
          • deployed via Factory (LPs)
        • Join (Join Adapter)
          ℹ️ Lockstake contracts are designed to not use join contract and instead hold MKR tokens on the engine or chief
          • deployed via JoinFab
            • Fab matches chainlog
            • newGemJoin (Standard ERC-20 Join Adapter)
            • newGemJoin5 (Custom Adapter for Tokens with lower precision than 18)
            • AuthGemJoin (Custom Adapter for Tokens that needs authed join access)
            • parameters are correct
              • owner matches MCD Pause Proxy
              • ilk is the bytes32 representation of "TOKEN-A"
                • cast --to-ascii <bytes32> matches ASCII Ilk
                • cast --to-bytes32 $(cast --from-ascii "TOKEN-A") matches bytes32
              • gem matches token contract
        • Clip
          • deployed via ClipFab
            ⚠️ Deployed by a EOA, but expected since it's not a typical Clip contract. This is not a problem since LockstakeClipper was audited.
            • Fab matches chainlog
            • newClip parameters are correct
              • owner matches MCD Pause Proxy
                ⚠️ New version of this contract uses wards concept, but not a problem since MCD_PAUSE_PROXY is still relied
              • vat matches chainlog
              • spotter matches chainlog
              • dog matches chainlog
              • ilk is the bytes32 representation of "TOKEN-A"
                • cast --to-ascii <bytes32> matches ASCII Ilk
                • cast --to-bytes32 $(cast --from-ascii "TOKEN-A") matches bytes32
        • Calc
          • deployed via CalcFab
            • Fab matches chainlog
            • newStairstepExponentialDecrease
            • newLinearDecrease
            • newExponentialDecrease
            • parameters are correct
              • owner matches MCD Pause Proxy
                ⚠️ Contract has ward concept and MCD_PAUSE_PROXY is relied
        • Risk Parameters
          ℹ️ The value is set by dss.vat.file(cfg.ilk, "line", cfg.gap), underlying checks of (using RAD decimals) are performed manually
        • Autoline (setIlkAutoLineParameters)
          • ilk
          • line
          • gap
          • ttl
        • Onboarding Actions
          • ensure DssExecLib.addNewCollateral is used
            ⚠️ All the sub-actions were done in lockstake dependency
            except
            • authorize(_vat, _join);: engine was authorized as there is not join contract
          • ensure CollateralOpts is used
            ⚠️ LockstakeInstance and LockstakeConfig was used to cover lockstake collateral specific values, only relevant fields will be checked here
            • ilk follows the ilk format TOKEN-A
            • gem matches token address
            • join matches token join address
            • clip matches token clip address
            • calc matches token calc address
            • pip matches token pip address
              ℹ️ PIP_MKR in chainlog address was updated before calling LockstakeInit.initLockstake and PIP_MKR was used as pip address in the function
            • isLiquidatable set to true if liquidations are on
            • isOSM set to true IF pip is OSM
              ℹ️ Adding correct reader to whitelist, relying on osmMom were done in lockstake dependency
            • whitelistOSM set to true IF median is src in OSM
              ℹ️ Allowing OSM freeze were done in lockstake dependency
            • ilkDebtCeiling (vat.ilk.line) in DAI (e.g. 1 * MILLION)
              • IF autoline is enabled, vat.ilk.line should be set to DC-IAM gap value
            • minVaultAmount (vat.ilk.dust) in DAI (e.g. 15_000)
              • ensure clip.tip is adjusted proportionally to vat.ilk.dust (e.g. lower the dust lower the tip)
                ⚠️ All the values were provided in the excel sheet and applied as it is so the proportional adjustment isn't required
            • maxLiquidationAmount (dog.ilk.hole) in DAI (e.g. 5 * MILLION)
              ℹ️ The value formatting is different as dog.ilk.hole is RAD decimal and set directly by calling contract in lockstake dependency
              • ensure dog.ilk.hole >= ilk.dust invariant holds
            • liquidationPenalty (dog.ilk.chop) in basis points (e.g. 13% = 13_00)
              ℹ️ The value formatting is different as dog.ilk.chop is WAD decimal and set directly by calling contract in lockstake dependency
            • ilkStabilityFee (jug.ilk.duty) set via script or IPFS rates table (e.g. 1000000000031693947650284507)
            • startingPriceFactor (clip.buf) in basis points (e.g. 110% = 110_00)
              ℹ️ The value formatting is different as clip.buf is RAY decimal and set directly by calling contract in lockstake dependency
            • breakerTolerance (clipperMom.clip.tolerance) in basis points (e.g. 50% = 50_00)
              ℹ️ The value formatting is different as clipperMom.clip.tolerance is RAY decimal and set directly by calling contract in lockstake dependency
            • auctionDuration (clip.tail) in seconds (e.g. 220 minutes)
            • permittedDrop (clip.cusp) in basis points (e.g. 45% = 45_00)
              ℹ️ The value formatting is different as clip.cusp is RAY decimal and set directly by calling contract in lockstake dependency
            • liquidationRatio (spotter.ilk.mat) in basis points (e.g. 170% = 170_00)
              ℹ️ The value formatting is different as spotter.ilk.mat is RAY decimal and set directly by calling contract in lockstake dependency
            • kprFlatReward (clip.tip) in DAI (e.g. 250)
              ℹ️ The value formatting is different as clip.tip is RAD decimal and set directly by calling contract in lockstake dependency
            • kprPctReward (clip.chip) in basis points (e.g. 0.1% = 10)
              ℹ️ The value formatting is different as clip.chip is WAD decimal and set directly by calling contract in lockstake dependency
          • set Calc parameters
            • LinearDecrease
              • calc.tau in seconds (e.g. 250 days = 21_600_000)
            • StairstepExponentialDecrease
              • calc.step in seconds (e.g. 120 seconds)
              • calc.cut in basis points (e.g. 99% = 99_00)
          • set Ilk Autoline Parameters (IF Autoline is enabled)
            • ilk follows the ilk format TOKEN-A
            • linein DAI (e.g. 10 * MILLION)
            • gap in DAI (e.g. 1 * MILLION)
            • ttl in seconds (e.g. 8 hours)
        • New Chainlog Entries
          • TOKEN
          • PIP_TOKEN
          • MCD_JOIN_TOKEN_A
          • MCD_CLIP_TOKEN_A
            ⚠️ Chainlog key is LOCKSTAKE_CLIP, since it's quite different from a regular clipper contract. Different formatting of a chainlog key have no security impact and since it's part of the audited code we can leave it as is
          • MCD_CLIP_CALC_TOKEN_A
            ⚠️ Chainlog key is LOCKSTAKE_CLIP_CALC. Different formatting of a chainlog key have no security impact and since it's part of the audited code we can leave it as is
        • Chainlog Bump
          • Patch x.x.1
        • Test Coverage (Follow Previous Test Patterns)
          • testCollateralIntegrations
            ⚠️ Integration is tested via testLockstakeIlkIntegration
          • testNewChainlogValues
            ⚠️ New chainlog values are tested via testChainlogIntegrity and testChainlogValues
          • testNewIlkRegistryValues
          • ensure new chainlog entries are included in addresses_<mainnet, goerli>.sol
          • ensure deployer addresses are included into addresses_deployers.sol (to keep up to date)
          • config.sol
      • RWA Onboarding
      • Teleport Onboarding
  • IF PSM migration, onboarding or offboarding is present:
  • IF D3M onboarding is present, insert and follow D3M Checklist
  • IF collateral offboarding is present in the spell~~
    • 1st stage collateral offboarding
      ℹ️ RWA007-A and RWA014-A
      • Collateral type (ilk) is removed from AutoLine (MCD_IAM_AUTO_LINE) IF currently enabled
      • Collateral debt ceiling (vat.ilk.line) is set to 0
      • Global debt ceiling (vat.Line) decreased by the total amount of offboarded ilks
    • 2nd stage collateral offboarding
      • All actions from the 1st stage offboarding are previously taken (EITHER in the current or past spells – check the archive)
      • Collateral liquidation penalty (chop) is set to 0 IF requested by governance
      • Flat keeper incentive (tip) is set to 0 IF requested by governance
      • Relative keeper incentive (chip) is set to 0 IF requested by governance
      • Max liquidation amount (hole) is adjusted via DssExecLib.setIlkMaxLiquidationAmount(ilk, amount) IF requested by governance
      • Relevant clipper contract (MCD_CLIP_) is active (i.e. stopped is 0)
      • Liquidations are triggered via (depending on governance instruction):
        • EITHER liquidation ratio (spotter.ilk.mat) being set very high in the spell (using DssExecLib.setValue(DssExecLib.spotter(), ilk, "mat", ratio))
        • OR via enabling linear interpolation (DssExecLib.linearInterpolation(name, target, ilk, what, startTime, start, end, duration))
          • Ensure name format matches "XXX-X Offboarding"
          • Ensure target matches DssExecLib.spotter() address
          • Ensure ilk format matches collateral type (ilk) name ("XXX-X")
          • Ensure what matches string "mat"
          • Ensure startTime matches block.timestamp
          • Ensure start uses variable CURRENT_XXX_A_MAT
          • Ensure start matches current spotter.ilk.mat value
          • Ensure end uses variable TARGET_XXX_A_MAT
          • Ensure end value matches the instruction
          • Ensure end allows liquidation of all remaining vaults (end is bigger than collateral_type_collateralization_ratio * risk_multiplier_factor)
          • Ensure duration matches the instruction
      • Spotter price is updated via DssExecLib.updateCollateralPrice(ilk) IF collateral have no running oracle (i.e. relevant PIP_ contract have outdated zzz value)
      • Spotter price is updated after all other actions
      • Offboarding is tested at least via _checkIlkClipper helper
  • IF RWA updates are present
    • IF doc is updated
      • _updateDoc helper is copied one-to-one from the archive and defined above actions
      • _updateDoc(ilk, doc) is called in the spell
    • IF debt ceiling is updated
      • IF AutoLine update is requested by the Exec Sheet
      • IF regular debt ceiling (vat.ilk.line) update is requested by the Exec Sheet
      • Liquidation oracle price is bumped via RwaLiquidationOracleLike(MIP21_LIQUIDATION_ORACLE).bump(ilk, val) pattern
        • Comment above bump explains val computation via // Note: the formula is: "debt_ceiling * [ (1 + rwa_stability_fee ) ^ (minimum_deal_duration_in_years) ] * liquidation_ratio"
        • Comment above bump provides locally executable formula (e.g. // bc -l <<< 'scale=18; 50000000 * e(l(1.07) * (3342/365)) * 1.00' | cast --to-wei)
          • The formula matches the example provided above
          • debt_ceiling in the executable formula matches new debt ceiling set in the spell or the maximum possible debt ceiling in case of the enabled AutoLine
          • rwa_stability_fee in the executable formula matches stability fee of the specified RWA found on chain
          • minimum_deal_duration_in_years in the executable formula matches number found in the Exec Sheet of the spell containing relevant RWA onboarding
          • liquidation_ratio in the executable formula matches liquidation ratio of the specified RWA found on chain
          • Executing formula locally provides integer number that matches the val in the spell
        • val makes sense in context of the rate mechanism
      • IF multiple RWA ilks are being combined into one, val calculation is done once per ilk and added to make the total, with separate executable formulas provided in comments. The existing val value can be retrieved by calling read() on PIP_RWAXX and converting the result into decimal
      • Oracle price is updated via DssExecLib.updateCollateralPrice(ilk)
      • IF soft liquidation explicitly requested to be triggered (via .tell(ilk)) AND debt ceiling is 0 (OR is being set to 0 in the current spell)
        • RwaLiquidationOracle.tell(ilk) call is present
        • IF RWAXX_A_INPUT_CONDUIT is an instance of TinlakeMgr (it is a Centrifuge integration), additional TinlakeMgr.tell() call is present (in order to prevent further TIN redemptions in the Centrifuge pool)
  • IF payments are present in the spell
    ℹ️ Sky was minted by calling SkyLike(SKY).mint(recipient, amount) and tested via testPayments
    • IF MKR transfers are present
      • Recipient address in the instruction is in the checksummed format
      • Recipient address matches Exec Sheet
      • Recipient address variable name matches one found in addresses_wallets.sol
      • Transfer amount matches Exec Sheet
      • Transfer amount is specified with (at least) 2 decimals using ether keyword
      • IF ether keyword is used, comment is present on the same line // Note: ether is a keyword helper, only MKR is transferred here
      • The transfers are tested via testMKRPayments test
      • Sum of all MKR transfers tested in testMKRPayments matches number in the Exec Sheet
    • IF DAI surplus buffer transfers are present
      • Recipient address in the instruction is in the checksummed format
      • Recipient address matches Exec Sheet
      • Recipient address variable name matches one found in addresses_wallets.sol
      • Transfer amount matches Exec Sheet
      • The transfers are tested via testDAIPayments test
        ⚠️ This was tested via testPayments
      • Sum of all DAI transfers tested in testDAIPayments matches number in the Exec Sheet
    • IF MKR or DAI streams (DssVest) are created
      • VestAbstract interface is imported from dss-interfaces/dss/VestAbstract.sol
      • restrict is used for each stream, UNLESS otherwise explicitly stated in the Exec Sheet
      • usr (Vest recipient address) matches Exec Sheet
      • usr address in the instruction is in the checksummed format
      • usr address variable name match one found in addresses_wallets.sol
      • tot (Total stream amount) matches Exec Sheet
      • IF ether keyword is used, comment is present on the same line // Note: ether is a keyword helper, only MKR is transferred here
      • IF vest amount is expressed in 'per year' or similar in the Exec Sheet, account for leap days
      • bgn (Vest start timestamp) matches Exec Sheet
      • tau is expressed as bgn - fin (i.e. MONTH_DD_YYYY - MONTH_DD_YYYY)
      • fin (Vest end timestamp) matches Exec Sheet
      • eta (Vest cliff duration) matches the following logic
        • IF eta is explicitly specified in the Exec Sheet, then the values match
        • IF eta and clf (Cliff end timestamp) are not specified in the Exec Sheet, then eta is 0
        • IF clf is specified, but clf <= bgn, then eta is 0
        • IF clf is specified and clf > bgn, eta is expressed as clf - bgn (i.e. MONTH_DD_YYYY - MONTH_DD_YYYY)
      • IF mgr (Vest manager address) is specified in the Exec Sheet, matches the value, OTHERWISE matches address(0)
      • Ensure that max vesting rate (cap) is enough for the new streams
        • The maximum vesting rate (tot divided by tau) <= the maximum vest streaming rate (cap)
        • The maximum vesting rate (tot divided by tau) > the maximum vest streaming rate (cap)
        • Calculate new cap value equal to 10% greater than the new maximum vesting rate, then round new cap up with 2 significant figure precision (i.e. 2446 becomes 2500)
      • IF max vesting rate (cap) is changed in the spell
        • Governance facilitators were notified
        • Exec Sheet contain explicit instruction
        • Exec Sheet contain explicit instruction
      • IF MKR stream (DssVestTransferrable) is present`
        • Vest contract's MKR allowance increased by the cumulative total (the sum of all tot values)
        • Ensure allowance increase follows archive patterns
      • Tested via testVestDAI or testVestMKR
    • IF MKR or DAI vest termination (Yank) is present
      • Yanked stream ID matches Exec Sheet
      • MCD_VEST_MKR_TREASURY chainlog address is used for MKR stream yank
      • MCD_VEST_DAI chainlog address is used for DAI stream yank
      • Tested via testYankDAI or testYankMKR
  • IF SubDAO-related content is present
    • IF SubDAO provides SubProxy spell address
      • SubDAO spell address matches Exec Sheet
      • Executed via ProxyLike(SUBDAO_PROXY).exec(SUBDAO_SPELL, abi.encodeWithSignature("execute()"));
      • Execution is NOT delegate call
      • IF SubDAO spell deployer is a smart contract (e.g. multisig or factory), ensure the deployer address is in addresses_deployers.sol as an entry
      • Ensure that SubDAO spell have enough gas and does not revert with "out of gas" error inside simulation. Note: low level call gas estimation is not done by our scripts
        ⚠️ This will be tested via tenderly testnet
    • IF SubDAO provides instructions to be executed by the main spell (i.e. that will operate within Pause Proxy DelegateCall context)
      • No SubDAO contract being interacted with is authed on a core contract like vat, etc. (Check comprehensively where the risk is high)
      • SubDAO contract licensing and optimizations generally do not matter (except where they pose a security risk)
      • SubDAO contracts and all libraries / dependencies have verified source code (Blocking)
      • Upgradable SubDAO contracts
        • Upgradable contracts have the PAUSE_PROXY as their admin (i.e. the party that can upgrade)
        • Any upgradable SubDAO contracts with an admin that is not PAUSE_PROXY are not authed on any core contracts (Blocking)
      • All SubDAO content addresses (i.e. provided contract addresses or EOAs) present in the Maker Core spell are present in the Exec Sheet and are correct. SubDAO addresses being authed or given any permissions MUST be in the Exec Sheet. SubDAO addresses being called must be confirmed by the SubDAO spell team.
      • IF addresses not PR'ed in by the SubDAO team (use git blame for example), SubDAO content addresses all have inline comment for provenance or source being OKed by SubDAO
      • SubDAO actions match Exec Sheet (only where inline with main spell code) and do not affect core contracts
      • Core contract knock-on actions (such as offboarding or setting DC to 0) are present in the exec and match the code
      • External calls for SubDAO content are NOT delegate call
      • Code does not have untoward behavior within the scope of Maker Core Contracts (e.g. up to the SubDAO proxy)
  • IF external contracts calls are present (Not SubDAOs, e.g. Starknet)
    • Target Contract doesn't block spell execution
    • External call is NOT delegatecall
    • Target Contract doesn't have permissions on the Vat
    • Target Contract doesn't do anything untoward (e.g. interacting with unsafe contracts)
    • Contracts deployed via CREATE2 (e.g. if it looks like a vanity address) do not have selfdestruct in their code
    • MCD Pause Proxy doesn't give any approvals
    • All possible actions of the Target Contract are documented
    • Target contract is not upgradable
    • Target Contract is included in the ChainLog
    • Test Coverage is comprehensive
  • IF spell interacts with ChainLog
    • ChainLog version is incremented based on update type
      • Major -> New Vat (++.0.0)
      • Minor -> Core Module (DSS) Update (e.g. Flapper) (0.++.0)
      • Patch -> Collateral addition or addition/modification (0.0.++)
    • New addresses are added to the addresses_mainnet.sol
    • Changes are tested via testChainlogIntegrity and testChainlogValues
  • Ensure every spell variable is declared as public/internal
  • Ensure immutable visibility is only used when fetching addresses from the ChainLog via DssExecLib.getChangelogAddress(key) and constant is used instead for static addresses
    • Fetch addresses as type address and wrap with Like suffix interfaces inline (when making calls), UNLESS archive patterns permit otherwise (Such as MKR)
    • Use the DssExecLib Core Address Helpers where possible (e.g. DssExecLib.vat())
    • Where addresses are fetched from the ChainLog, the variable name must match the value of the ChainLog key for that address (e.g. MCD_VAT rather than vat), except where the archive pattern differs from this pattern (e.g. MKR)
  • Tests
    • Ensure that the DssExecLib.address file is not being modified by the spell PR
    • Check all CI tests are passing as at the latest commit
      Insert most recent commit hash where CI was passing
      95c68b5
    • Ensure every test function is declared as public
      • IF the test needs to run, it MUST NOT have the skipped modifier; OTHERWISE, it MUST have the skipped modifier
    • Ensure each spell action has sufficient test coverage
      List actions for which coverage was checked here
      • Setup new MkrOsm
        • tested via testMedianReaders, testChainlogIntegrity, and testChainlogValues
      • Setup new VoteDelegateFactory
        • tested via testRemoveChainlogValues, testChainlogIntegrity, and testChainlogValues
      • Setup Lockstake Engine
        • tested via testSplitter, testGeneral, testNewAuthorizations, testLockstakeIlkIntegration, testOsmReaders, testNewOsmMomAddition, testChainlogIntegrity, and testChainlogValues
      • Fund Early Bird Rewards Multisig
        • tested via testPayments
      • Lower Deprecated RWA Debt Ceilings
        • tested via testGeneral and testRwaTellAndCull
      • Pinwheel DAO Resolution
        • tested via testDaoResolutions
      • AAVE Revenue Share Payment
        • tested via testPayments
      • Spark Spell
        • tested via testSparkSpellIsExecuted
    • Ensure that any other env variable does not affect execution of the tests (for example, by inspecting the output of printenv | grep "FOUNDRY_\|DAPP_")
    • Check all tests are passing locally using make test
      • Ensure every test listed in the coverage item above is present in the logs and with the [PASS] prefix.
_Insert your local test logs here_
/scripts/test-dssspell-forge.sh no-match="" match="" block=""
Using DssExecLib at: 0x8De6DDbCd5053d32292AAA0D2105A32d108484a6
[⠊] Compiling...
[⠘] Compiling 4 files with Solc 0.8.16
[⠃] Solc 0.8.16 finished in 14.32s
Compiler run successful!

Ran 2 tests for src/test/starknet.t.sol:StarknetTests
[PASS] testStarknet() (gas: 6497815)
[PASS] testStarknetSpell() (gas: 2287)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 64.45s (59.36s CPU time)

Warning: the following cheatcode(s) are deprecated and will be removed in future versions:
  revertTo(uint256): replaced by `revertToState`
  snapshot(): replaced by `snapshotState`
Ran 40 tests for src/DssSpell.t.sol:DssSpellTest
[SKIP] testBytecodeMatches() (gas: 0)
[PASS] testCastCost() (gas: 6375050)
[PASS] testCastOnTime() (gas: 6372079)
[PASS] testChainlogIntegrity() (gas: 11434750)
[PASS] testChainlogValues() (gas: 13836007)
[SKIP] testCollateralIntegrations() (gas: 0)
[PASS] testContractSize() (gas: 10864)
[PASS] testDaoResolutions() (gas: 11413)
[PASS] testDeployCost() (gas: 4473236)
[SKIP] testEsmAuth() (gas: 0)
[PASS] testGeneral() (gas: 31797899)
[SKIP] testIlkClipper() (gas: 0)
[SKIP] testL2ArbitrumSpell() (gas: 0)
[SKIP] testL2OptimismSpell() (gas: 0)
[SKIP] testLerpSurplusBuffer() (gas: 0)
[PASS] testLitePSMs() (gas: 7191722)
[PASS] testLockstakeIlkIntegration() (gas: 15129629)
[PASS] testMedianReaders() (gas: 6380505)
[PASS] testNewAuthorizations() (gas: 6552167)
[SKIP] testNewCronJobs() (gas: 0)
[PASS] testNewOsmMomAddition() (gas: 6418875)
[PASS] testNextCastTime() (gas: 405635)
[SKIP] testOffboardings() (gas: 0)
[PASS] testOfficeHours() (gas: 479554)
[SKIP] testOracleList() (gas: 0)
[PASS] testOsmReaders() (gas: 6396102)
[PASS] testPSMs() (gas: 7532554)
[PASS] testPayments() (gas: 6492209)
[PASS] testRemoveChainlogValues() (gas: 6378617)
[PASS] testRevertIfNotScheduled() (gas: 16830)
[PASS] testRwaTellAndCull() (gas: 6459681)
[PASS] testSparkSpellIsExecuted() (gas: 6376733)
[PASS] testSplitter() (gas: 6878708)
[PASS] testSystemTokens() (gas: 7201038)
[PASS] testUseEta() (gas: 341990)
[SKIP] testVestDAI() (gas: 0)
[SKIP] testVestMKR() (gas: 0)
[SKIP] testVestSKY() (gas: 0)
[SKIP] testYankDAI() (gas: 0)
[SKIP] testYankMKR() (gas: 0)
Suite result: ok. 25 passed; 0 failed; 15 skipped; finished in 376.75s (957.26s CPU time)

Ran 2 test suites in 377.33s (441.20s CPU time): 27 tests passed, 0 failed, 15 skipped (42 total tests)

Pre-Deployment Stage

Copy link
Contributor

@amusingaxl amusingaxl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TL;DR: good to deploy :shipit:

Mainnet Executive Spell Review Checklist

Development Stage

  • Preparation

    • Exec Sheet for the specified date is found in the "Executive Vote Implementation Process" google sheet
      https://docs.google.com/spreadsheets/d/1w_z5WpqxzwreCcaveB2Ye1PP5B8QAHDglzyxKHG3CHw/edit?gid=338754189#gid=338754189
    • Using Exec Sheet URL from the above, read spell instructions from the Exec Sheet and list them below
      • Setup new MkrOsm
        • Whitelist MkrOsm to read from current PIP_MKR using DssExecLib.addReaderToWhitelist with the following parameters:
          • Set parameter address _oracle: PIP_MKR address from chainlog (0xdbbe5e9b1daa91430cf0772fcebe53f6c6f137df)
          • Set parameter address _reader: 0x4F94e33D0D74CfF5Ca0D3a66F1A650628551C56b
        • Set MkrOsm as "PIP_MKR" in the chainlog using the following parameters:
          • Set parameter bytes32 _key: "PIP_MKR"
          • Set parameter address _val: 0x4F94e33D0D74CfF5Ca0D3a66F1A650628551C56b
      • Setup new VoteDelegateFactory
        • Rename "VOTE_DELEGATE_PROXY_FACTORY" to "VOTE_DELEGATE_FACTORY_LEGACY" in chainlog:
          • Call DssExecLib.setChangelogAddress with the following parameters:
            • Set parameter bytes32 _key: "VOTE_DELEGATE_FACTORY_LEGACY"
            • Set parameter address _val: VOTE_DELEGATE_PROXY_FACTORY address (0xd897f108670903d1d6070fcf818f9db3615af272) from the chainlog
        • Call CHAINLOG.removeAddress with the following parameters:
          • Set parameter bytes32 _key: "VOTE_DELEGATE_PROXY_FACTORY"
        • Set "VOTE_DELEGATE_FACTORY" in the chainlog to 0xC3D809E87A2C9da4F6d98fECea9135d834d6F5A0
      • Setup Lockstake Engine
        • SBE Parameter Changes
          • Decrease splitter "burn" rate by 30% from 100% to 70% with the following parameters:
          • Decrease splitter "burn" with address _base: MCD_SPLIT from chainlog
          • Decrease splitter "burn" with bytes32 _what: "burn"
          • Decrease splitter "burn" with uint256 _amt: 70%
          • Increase vow.hump by 5 million DAI, from 55 million DAI to 60 million DAI
          • Increase splitter.hop by 4,014 seconds, from 11,635 seconds to 15,649 seconds.
        • Set Flapper farm by calling FlapperInit.setFarm with the following parameters:
          • Set Flapper farm with address farm_ : 0x92282235a39bE957fF1f37619fD22A9aE5507CB1
          • Set Flapper farm with address splitter: MCD_SPLIT from chainlog
          • Set Flapper farm with address usdsJoin: USDS_JOIN from chainlog
          • Set Flapper farm with uint256 hop: 15,649
          • Set Flapper farm with bytes32 prevChainlogKey: bytes32(0)
          • Set Flapper farm with chainlogKey: "REWARDS_LSMKR_USDS"
          • "Under the hood" actions for setting flapper:
            • LsMkrUsdsFarm will be set as "farm" in MCD_SPLIT
            • MCD_SPLIT will be set as "rewardsDistribution" in LsMkrUsdsFarm
            • Provided "hop" will be set as "rewardsDuration" in LsMkrUsdsFarm
            • New chainlog key REWARDS_LSMKR_USDS will be added
        • Init Lockstake Engine by calling LockstakeInit.initLockstake with the following parameters:
          • Init Lockstake Engine with address lsmkr: 0xb4e0e45e142101dC3Ed768bac219fC35EDBED295
          • Init Lockstake Engine with address engine: 0x2b16C07D5fD5cC701a0a871eae2aad6DA5fc8f12
          • Init Lockstake Engine with address clipper: 0xA85621D35cAf9Cf5C146D2376Ce553D7B78A6239
          • Init Lockstake Engine with address clipperCalc: 0xf13cF3b39823CcfaE6C2354dA56416C80768474e
          • Init Lockstake Engine with bytes32 ilk: "LSE-MKR-A"
          • Init Lockstake Engine with address voteDelegateFactory: 0xC3D809E87A2C9da4F6d98fECea9135d834d6F5A0
          • Init Lockstake Engine with address usdsJoin: USDS_JOIN from chainlog
          • Init Lockstake Engine with address usds: USDS from chainlog
          • Init Lockstake Engine with address mkr: MCD_GOV from chainlog
          • Init Lockstake Engine with address mkrSky: MKR_SKY from chainlog
          • Init Lockstake Engine with address sky: SKY from chainlog
          • Init Lockstake Engine with address[] farms: 0x92282235a39bE957fF1f37619fD22A9aE5507CB1
          • Init Lockstake Engine with uint256 fee: 5%
          • Init Lockstake Engine with uint256 maxLine: 20 million DAI
          • Init Lockstake Engine with uint256 gap: 5 million
          • Init Lockstake Engine with uint256 ttl: 16 hours
          • Init Lockstake Engine with uint256 dust: 30,000 DAI
          • Init Lockstake Engine with uint256 duty: 12%
          • Init Lockstake Engine with uint256 mat: 200%
          • Init Lockstake Engine with uint256 buf: 1.20
          • Init Lockstake Engine with uint256 tail: 6,000 seconds
          • Init Lockstake Engine with uint256 cusp: 0.40
          • Init Lockstake Engine with uint256 chip: 0.1%
          • Init Lockstake Engine with uint256 tip: 300 DAI
          • Init Lockstake Engine with uint256 stopped: 0
          • Init Lockstake Engine with uint256 chop: 8%
          • Init Lockstake Engine with uint256 hole: 3 million DAI
          • Init Lockstake Engine with uint256 tau: 0
          • Init Lockstake Engine with uint256 cut: 0.99
          • Init Lockstake Engine with uint256 step: 60 seconds
          • Init Lockstake Engine with bool lineMom: true
          • Init Lockstake Engine with uint256 tolerance: 0.5
          • Init Lockstake Engine with string name: "LockstakeMkr"
          • Init Lockstake Engine with string symbol: "lsMKR"
          • "Under the hood" actions for Init Lockstake Engine:
            • New collateral type "LSE-MKR-A" will be added to "vat", "jug", "spotter", "dog" contracts
            • New collateral type "LSE-MKR-A" will be added to LINE_MOM
            • New collateral type "LSE-MKR-A" will be added to auto-line using provided maxLine, gap and ttl
            • New collateral type "LSE-MKR-A" will be added to ILK_REGISTRY with provided values ("name", "symbol") and the new ilk class 7
            • New MKR OSM will allow MCD_SPOT, CLIPPER_MOM, MCD_END and LockstakeClipper to access its price
            • PIP_MKR will be added to OSM_MOM
            • LockstakeClipper will be configured using provided values ("buf", "tail", "cusp", "chip", "tip", "stopped", "clip", "tolerance")
            • StairstepExponentialDecrease calc contract will be configured using provided values ("cut", "step")
            • The LsMkrUsdsFarm will be added to the LockstakeEngine as a first farm
            • LockstakeEngine will be authorized to access "vat"
            • LockstakeClipper will be authorized to access "vat" and LockstakeEngine
            • CLIPPER_MOM, MCD_DOG and MCD_END will be authorized to access LockstakeClipper
            • New chainlog keys LOCKSTAKE_MKR, LOCKSTAKE_ENGINE, LOCKSTAKE_CLIP and LOCKSTAKE_CLIP_CALC will be added
            • OSM_MOM will be authorized to access the new MKR OSM
      • Fund Early Bird Rewards Multisig
        • Mint 27,222,832.80 SKY to 0x14D98650d46BF7679BBD05D4f615A1547C87Bf68
      • Lower Deprecated RWA Debt Ceilings
        • Remove RWA007-A from Debt Ceiling Instant Access Module
        • Set RWA007-A Debt Ceiling to 0
        • Initiate RWA007-A soft liquidation by calling tell()
        • Write-off the debt of RWA007-A and set its oracle price to 0 by calling cull()
        • Reduce RWA014-A Debt Ceiling by 1.5 billion Dai from 1.5 billion Dai to 0
        • Initiate RWA014-A soft liquidation by calling tell()
        • Write-off the debt of RWA014-A and set its oracle price to 0 by calling cull()
      • Pinwheel DAO Resolution
        • Approve DAO Resolution at QmYJUvw5xbAJmJknG2xUKDLe424JSTWQQhbJCnucRRjUv7
      • AAVE Revenue Share Payment
        • AAVE Revenue Share - 234089 DAI - 0x464C71f6c2F760DdA6093dCB91C24c39e5d6e18c
      • Spark Spell
        • Execute Spark Proxy Spell at 0xcc3B9e79261A7064A0f734Cc749A8e3762e0a187
  • Base checks

    • Current solc version 0.8.16
    • Office hours is true IF spell introduces a major change that can affect external parties (e.g.: keepers are affected in case of collateral offboarding) OTHERWISE explicitly set to false
    • Office hours value matches the Exec Sheet
    • 30 days spell expiry set in the constructor (block.timestamp + 30 days)
  • Spell description

    • Description follows the format TARGET_DATE MakerDAO Executive Spell | Hash: EXEC_DOC_HASH
    • TARGET_DATE in the description matches the target date
    • Accompanying comment above spell description follows the format // Hash: cast keccak -- "$(wget 'EXEC_DOC_URL' -q -O - 2>/dev/null)"
  • Comments inside the spell

    • Every Section text from the Exec Sheet is copied to the spell code as a comment surrounded by the set of dashes (E.g. // ----- Section text -----)
    • Every Instruction text from the Exec Sheet is copied to the spell code as // Instruction text
    • Every Instruction text have newline above it
    • IF an instruction can not be taken, it should have explanation under the instruction prefixed with // Note: (e.g.: // Note: Payments are skipped on goerli)
    • IF action in the spell doesn't have relevant instruction (e.g.: chainlog version bump), the necessity of it is explained in the comment above prefixed with // Note:
    • Every proof url from the Exec Sheet, such as Reasoning URL and Authority URL is present in the spell code under relevant section or instruction (depending on which row the url is present)
    • Every proof url from the Exec Sheet, such as Reasoning URL and Authority URL have prefix derived from the url itself
      • // Executive Vote: if URL starts with https://vote.makerdao.com/executive/
      • // Poll: if URL starts with https://vote.makerdao.com/polling/
      • // Forum: if URL starts with https://forum.makerdao.com/t/
      • // MIP: if URL starts with https://mips.makerdao.com/mips/details/
  • Dependency checks

    • Update Foundry by running foundryup
    • Reinstall libraries by running rm -rf ./lib && git submodule update --init --recursive
      Submodule path 'lib/dss-exec-lib': checked out '69b658f35d8618272cd139dfc18c5713caf6b96b'
      Submodule path 'lib/dss-exec-lib/lib/dss-interfaces': checked out '9bfd7afadd1f8c217ef05850b2555691786286cb'
      Submodule path 'lib/dss-exec-lib/lib/forge-std': checked out '0aa99eb8456693c015350c5e6c4f442ebe912f77'
      Submodule path 'lib/dss-exec-lib/lib/forge-std/lib/ds-test': checked out 'cd98eff28324bfac652e63a239a60632a761790b'
      Submodule path 'lib/dss-test': checked out '36ff4adbcb35760614e0d2df864026991c23d028'
      Submodule path 'lib/dss-test/lib/dss-interfaces': checked out '9bfd7afadd1f8c217ef05850b2555691786286cb'
      Submodule path 'lib/dss-test/lib/forge-std': checked out '155d547c449afa8715f538d69454b83944117811'
      Submodule path 'lib/dss-test/lib/forge-std/lib/ds-test': checked out 'e282159d5170298eb2455a6c05280ab5a73a4ef0'
      
    • IF submodule upgrades are present, make sure dss-exec-lib is synced as well
    • git submodule hash of dss-exec-lib (run git submodule status) matches the latest release version or newer
    • dss-interfaces library used inside lib/dss-exec-lib matches submodule used inside lib/dss-test
  • IF interfaces are present in the spell

    • Interfaces imported from dss-interfaces
      • No unused dss-interfaces
      • Only single import layout is used (e.g. import "dss-interfaces/dss/VatAbstract.sol";)
    • Static Interfaces
      • No unused static interfaces
      • Declared static interface not present in the dss-interfaces, OTHERWISE should be imported from there
      • Interface matches deployed contract using cast interface <contract_address> command
      • Interface naming style should match with Like suffix (e.g. VatLike)
      • Each static interface declare only functions actually used in the spell code
  • IF variable declarations are present in the spell

    • IF precision units are present
      • Precision units used in the spell match their defined values:
        • WAD = 10 ** 18
        • RAY = 10 ** 27
        • RAD = 10 ** 45
      • Precision units match with Numerical Ranges
      • Each variable visibility is declared as internal
      • Each variable state mutability is declared as constant
    • IF math units are present
      • Match their defined values:
        • HUNDRED = 10 ** 2
        • THOUSAND = 10 ** 3
        • MILLION = 10 ** 6
        • BILLION = 10 ** 9
      • Match with config
      • Each variable visibility is declared as internal
      • Each variable state mutability is declared as constant
    • IF rates are present
      • Rates match generated locally via make rates pct=<pct> (e.g. pct=0.75, for 0.75%)
      • Rates match IPFS document
      • Rate variable name conforms to X_PT_Y_Z_PCT_RATE (e.g. ZERO_PT_SEVEN_FIVE_PCT_RATE for 0.75%)
      • Rate variable visibility declared as internal
      • Rate variable state mutability declared as constant
    • IF timestamps are present
      • Comment above timestamp states full date including UTC timezone
      • Timestamp converts back to the correct date
      • Timestamp converts back to the UTC timezone
      • Variable naming matches MMM_DD_YYYY (e.g. JAN_01_2023 for 2023-01-01)
      • Time of day makes logical sense in the context of timestamp usage (i.e. 23:59:59 UTC for the final day of something, 00:00:00 UTC for the first day of something)
      • Each variable visibility is declared as internal
      • Each variable state mutability is declared as constant
  • IF new contract is present in the spell (not yet on chainlog or new to chainlog)

    • NEW_PIP_MKR = 0x4F94e33D0D74CfF5Ca0D3a66F1A650628551C56b
      • Source code is verified on etherscan
      • Compilation optimizations match deployment settings defined in the source code repo
      • GNU AGPLv3 license
      • Every maker-related constructor argument matches chainlog (e.g. vat, dai, dog, ...)
      • IF new contract have concept of wards or access control
        • Ensure PAUSE_PROXY address was relied (wards(PAUSE_PROXY) is 1)
        • Ensure that contract deployer address was denied (wards(deployer) is 0)
        • Ensure that there are no other Rely events except for PAUSE_PROXY (using a block explorer like etherscan)
      • Source code matches corresponding github source code (e.g. diffcheck via vscode code --diff etherscan.sol github.sol)
      • Deployer address is included into addresses_deployers.sol
    • VOTE_DELEGATE_FACTORY = 0xC3D809E87A2C9da4F6d98fECea9135d834d6F5A0
      • Source code is verified on etherscan
      • Compilation optimizations match deployment settings defined in the source code repo
      • GNU AGPLv3 license
      • Every maker-related constructor argument matches chainlog (e.g. vat, dai, dog, ...)
        • _chief: 0x0a3f6849f78076aefaDf113F5BED87720274dDC0
        • _polling: 0xD3A9FE267852281a1e6307a1C37CDfD76d39b133
      • IF new contract have concept of wards or access control
        • Ensure PAUSE_PROXY address was relied (wards(PAUSE_PROXY) is 1)
        • Ensure that contract deployer address was denied (wards(deployer) is 0)
        • Ensure that there are no other Rely events except for PAUSE_PROXY (using a block explorer like etherscan)
      • Source code matches corresponding github source code (e.g. diffcheck via vscode code --diff etherscan.sol github.sol)
      • Bytecode matches corresponding GitHub source code:
        > forge verify-bytecode 0xC3D809E87A2C9da4F6d98fECea9135d834d6F5A0 VoteDelegateFactory
        < Verifying bytecode for contract VoteDelegateFactory at address 0xC3D809E87A2C9da4F6d98fECea9135d834d6F5A0
        < Creation code matched with status full
        < Runtime code matched with status full
        
      • Deployer address is included into addresses_deployers.sol
    • REWARDS_LSMKR_USDS = 0x92282235a39bE957fF1f37619fD22A9aE5507CB1
      • Source code is verified on etherscan
      • Compilation optimizations match deployment settings defined in the source code repo
      • GNU AGPLv3 license
      • Every maker-related constructor argument matches chainlog (e.g. vat, dai, dog, ...)
        • _owner: 0xBE8E3e3618f7474F8cB1d074A26afFef007E98FB (MCD_PAUSE_PROXY)
        • _rewardsDistribution: 0x0000000000000000000000000000000000000000 (to be initialized later)
        • _rewardsToken: 0xdC035D45d973E3EC169d2276DDab16f1e407384F (USDS)
        • _stakingToken: 0xb4e0e45e142101dC3Ed768bac219fC35EDBED295 (LockstakeMkr)
      • IF new contract have concept of wards or access control
        • Ensure PAUSE_PROXY address was relied (wards(PAUSE_PROXY) is 1)
        • Ensure that contract deployer address was denied (wards(deployer) is 0)
        • Ensure that there are no other Rely events except for PAUSE_PROXY (using a block explorer like etherscan)
      • Source code matches corresponding github source code (e.g. diffcheck via vscode code --diff etherscan.sol github.sol)
      • Bytecode matches corresponding GitHub source code:
        > forge verify-bytecode 0x92282235a39bE957fF1f37619fD22A9aE5507CB1 StakingRewards
        < Verifying bytecode for contract StakingRewards at address 0x92282235a39bE957fF1f37619fD22A9aE5507CB1
        < Creation code matched with status full
        < Runtime code matched with status full
        
      • Deployer address is included into addresses_deployers.sol
    • LOCKSTAKE_MKR = 0xb4e0e45e142101dC3Ed768bac219fC35EDBED295
      • Source code is verified on etherscan
      • Compilation optimizations match deployment settings defined in the source code repo
      • GNU AGPLv3 license
      • Every maker-related constructor argument matches chainlog (e.g. vat, dai, dog, ...)
      • IF new contract have concept of wards or access control
        • Ensure PAUSE_PROXY address was relied (wards(PAUSE_PROXY) is 1)
        • Ensure that contract deployer address was denied (wards(deployer) is 0)
        • Ensure that there are no other Rely events except for PAUSE_PROXY (using a block explorer like etherscan)
      • Source code matches corresponding github source code (e.g. diffcheck via vscode code --diff etherscan.sol github.sol)
      • Bytecode matches corresponding GitHub source code:
        > forge verify-bytecode 0xb4e0e45e142101dC3Ed768bac219fC35EDBED295 LockstakeMkr
        < Verifying bytecode for contract LockstakeMkr at address 0xb4e0e45e142101dC3Ed768bac219fC35EDBED295
        < Creation code matched with status full
        < Runtime code matched with status full
        
      • Deployer address is included into addresses_deployers.sol
    • LOCKSTAKE_ENGINE = 0x2b16C07D5fD5cC701a0a871eae2aad6DA5fc8f12
      • Source code is verified on etherscan
      • Compilation optimizations match deployment settings defined in the source code repo
      • GNU AGPLv3 license
      • Every maker-related constructor argument matches chainlog (e.g. vat, dai, dog, ...)
        • voteDelegateFactory_: 0xC3D809E87A2C9da4F6d98fECea9135d834d6F5A0 (VOTE_DELEGATE_FACTORY)
        • usdsJoin_: 0x3C0f895007CA717Aa01c8693e59DF1e8C3777FEB (USDS_JOIN)
        • ilk_: 0x4c53452d4d4b522d410000000000000000000000000000000000000000000000 (LSE-MKR-A)
        • mkrSky_: 0xBDcFCA946b6CDd965f99a839e4435Bcdc1bc470B (MKR_SKY)
        • lsmkr_: 0xb4e0e45e142101dC3Ed768bac219fC35EDBED295 (lsMkr)
      • IF new contract have concept of wards or access control
        • Ensure PAUSE_PROXY address was relied (wards(PAUSE_PROXY) is 1)
        • Ensure that contract deployer address was denied (wards(deployer) is 0)
        • Ensure that there are no other Rely events except for PAUSE_PROXY (using a block explorer like etherscan)
      • Source code matches corresponding github source code (e.g. diffcheck via vscode code --diff etherscan.sol github.sol)
      • Bytecode matches corresponding GitHub source code:
        > forge verify-bytecode 0x2b16C07D5fD5cC701a0a871eae2aad6DA5fc8f12 LockstakeEngine
        < Verifying bytecode for contract LockstakeEngine at address 0x2b16C07D5fD5cC701a0a871eae2aad6DA5fc8f12
        < Creation code matched with status full
        < Runtime code matched with status full
        
      • Deployer address is included into addresses_deployers.sol
    • LOCKSTAKE_CLIP = 0xA85621D35cAf9Cf5C146D2376Ce553D7B78A6239
      • Source code is verified on etherscan
      • Compilation optimizations match deployment settings defined in the source code repo
      • GNU AGPLv3 license
      • Every maker-related constructor argument matches chainlog (e.g. vat, dai, dog, ...)
        • vat_: 0x35D1b3F3D7966A1DFe207aa4514C12a259A0492B (MCD_VAT)
        • spotter_: 0x65C79fcB50Ca1594B025960e539eD7A9a6D434A3 (MCD_SPOT)
        • dog_: 0x135954d155898D42C90D2a57824C690e0c7BEf1B (MCD_DOG)
        • engine_: 0x2b16C07D5fD5cC701a0a871eae2aad6DA5fc8f12 (LockstakeEngine)
      • IF new contract have concept of wards or access control
        • Ensure PAUSE_PROXY address was relied (wards(PAUSE_PROXY) is 1)
        • Ensure that contract deployer address was denied (wards(deployer) is 0)
        • Ensure that there are no other Rely events except for PAUSE_PROXY (using a block explorer like etherscan)
      • Source code matches corresponding github source code (e.g. diffcheck via vscode code --diff etherscan.sol github.sol)
      • Bytecode matches corresponding GitHub source code:
        > forge verify-bytecode 0xA85621D35cAf9Cf5C146D2376Ce553D7B78A6239 LockstakeClipper
        < Verifying bytecode for contract LockstakeClipper at address 0xA85621D35cAf9Cf5C146D2376Ce553D7B78A6239
        < Creation code matched with status full
        < Runtime code matched with status full
        
      • Deployer address is included into addresses_deployers.sol
    • LOCKSTAKE_CLIP_CALC = 0xf13cF3b39823CcfaE6C2354dA56416C80768474e
      • Source code is verified on etherscan
      • Compilation optimizations match deployment settings defined in the source code repo
      • GNU AGPLv3 license
      • Every maker-related constructor argument matches chainlog (e.g. vat, dai, dog, ...)
      • IF new contract have concept of wards or access control
        • Ensure PAUSE_PROXY address was relied (wards(PAUSE_PROXY) is 1)
        • Ensure that contract deployer address was denied (wards(deployer) is 0)
        • Ensure that there are no other Rely events except for PAUSE_PROXY (using a block explorer like etherscan)
      • Source code matches corresponding github source code (e.g. diffcheck via vscode code --diff etherscan.sol github.sol)
      • Bytecode matches on-chain MCD_CLIP_CALC_MATIC_A
      • Deployer address is included into addresses_deployers.sol
      • Deployed through CALC_FAB on-chain factory
  • IF core system parameter changes are present in the instructions

  • IF debt ceiling changes are present in the instructions

  • IF additional dependencies (i.e. ./src/dependencies/ directory) are present:

  • IF onboarding is present

    • Insert and follow the relevant checklists below:
      • Collateral Onboarding
        • Deployed Contracts
          • PIP (Oracle)
            • deployed via deployer (OSM)
              • contract is verified on etherscan
              • ensure solc version matches source
              • ensure optimization matches source configs
              • ensure license AGPLv3 is specified
              • ensure source matches github code (i.e. diffcheck via vscode code --diff etherscan.sol github.sol)
              • constructor args are correct
              • src (medianizer)
              • check wards
              • MCD_PAUSE_PROXY is relied
              • deployer is denied
              • no other address has been relied
            • deployed via Factory (LPs)
          • Join (Join Adapter)
            • deployed via JoinFab
              • Fab matches chainlog
              • newGemJoin (Standard ERC-20 Join Adapter)
              • newGemJoin5 (Custom Adapter for Tokens with lower precision than 18)
              • AuthGemJoin (Custom Adapter for Tokens that needs authed join access)
              • parameters are correct
              • owner matches MCD Pause Proxy
              • ilk is the bytes32 representation of "TOKEN-A"
                • cast --to-ascii <bytes32> matches ASCII Ilk
                • cast --to-bytes32 $(cast --from-ascii "TOKEN-A") matches bytes32
              • gem matches token contract
          • Clip
            • deployed via ClipFab
              • Fab matches chainlog
              • newClip parameters are correct
              • owner matches MCD Pause Proxy
              • vat matches chainlog
              • spotter matches chainlog
              • dog matches chainlog
              • ilk is the bytes32 representation of "TOKEN-A"
                • cast --to-ascii <bytes32> matches ASCII Ilk
                • cast --to-bytes32 $(cast --from-ascii "TOKEN-A") matches bytes32
            • ⚠️ Deployment validated above
          • Calc
          • deployed via CalcFab
            • Fab matches chainlog
            • newStairstepExponentialDecrease
            • newLinearDecrease
            • newExponentialDecrease
            • parameters are correct
            • owner matches MCD Pause Proxy
          • Risk Parameters
          • Autoline (setIlkAutoLineParameters)
            • ilk
            • line
            • gap
            • ttl
          • Onboarding Actions
            • ensure DssExecLib.addNewCollateral is used
              ⚠️ done within LockstakeInit.init() using low-level methods
            • ensure CollateralOpts is used
              • ilk follows the ilk format TOKEN-A
              • gem matches token address
              • join matches token join address
              • clip matches token clip address
              • calc matches token calc address
              • pip matches token pip address
              • isLiquidatable set to true if liquidations are on
              • isOSM set to true IF pip is OSM
              • whitelistOSM set to true IF median is src in OSM
              • ilkDebtCeiling (vat.ilk.line) in DAI (e.g. 1 * MILLION)
              • IF autoline is enabled, vat.ilk.line should be set to DC-IAM gap value
              • minVaultAmount (vat.ilk.dust) in DAI (e.g. 15_000)
              • ensure clip.tip is adjusted proportionally to vat.ilk.dust (e.g. lower the dust lower the tip)
              • maxLiquidationAmount (dog.ilk.hole) in DAI (e.g. 5 * MILLION)
              • ensure dog.ilk.hole >= ilk.dust invariant holds
              • liquidationPenalty (dog.ilk.chop) in basis points (e.g. 13% = 13_00)
              • ilkStabilityFee (jug.ilk.duty) set via script or IPFS rates table (e.g. 1000000000031693947650284507)
              • startingPriceFactor (clip.buf) in basis points (e.g. 110% = 110_00)
              • breakerTolerance (clipperMom.clip.tolerance) in basis points (e.g. 50% = 50_00)
              • auctionDuration (clip.tail) in seconds (e.g. 220 minutes)
              • permittedDrop (clip.cusp) in basis points (e.g. 45% = 45_00)
              • liquidationRatio (spotter.ilk.mat) in basis points (e.g. 170% = 170_00)
              • kprFlatReward (clip.tip) in DAI (e.g. 250)
              • kprPctReward (clip.chip) in basis points (e.g. 0.1% = 10)
            • set Calc parameters
              • LinearDecrease
              • calc.tau in seconds (e.g. 250 days = 21_600_000)
              • StairstepExponentialDecrease
              • calc.step in seconds (e.g. 120 seconds)
              • calc.cut in basis points (e.g. 99% = 99_00)
            • set Ilk Autoline Parameters (IF Autoline is enabled)
              • ilk follows the ilk format TOKEN-A
              • linein DAI (e.g. 10 * MILLION)
              • gap in DAI (e.g. 1 * MILLION)
              • ttl in seconds (e.g. 8 hours)
          • New Chainlog Entries
            • LOCKSTAKE_MKR
            • LOCKSTAKE_ENGINE
            • LOCKSTAKE_CLIP
            • LOCKSTAKE_CLIP_CALC
          • Chainlog Bump
            • Patch x.x.1
          • Test Coverage (Follow Previous Test Patterns)
            • testCollateralIntegrations
            • testNewChainlogValues
            • testNewIlkRegistryValues
            • ensure new chainlog entries are included in addresses_<mainnet, goerli>.sol
            • ensure deployer addresses are included into addresses_deployers.sol (to keep up to date)
            • config.sol
      • RWA Onboarding
      • Teleport Onboarding
  • IF PSM migration, onboarding or offboarding is present:

  • IF D3M onboarding is present, insert and follow D3M Checklist

  • IF collateral offboarding is present in the spell

    • 1st stage collateral offboarding
      • RWA007-A:
        • Collateral type (ilk) is removed from AutoLine (MCD_IAM_AUTO_LINE) IF currently enabled
        • Collateral debt ceiling (vat.ilk.line) is set to 0
        • Global debt ceiling (vat.Line) decreased by the total amount of offboarded ilks
      • RWA014-A:
        • Collateral type (ilk) is removed from AutoLine (MCD_IAM_AUTO_LINE) IF currently enabled
        • Collateral debt ceiling (vat.ilk.line) is set to 0
        • Global debt ceiling (vat.Line) decreased by the total amount of offboarded ilks
    • 2nd stage collateral offboarding
      • All actions from the 1st stage offboarding are previously taken (EITHER in the current or past spells – check the archive)
      • Collateral liquidation penalty (chop) is set to 0 IF requested by governance
      • Flat keeper incentive (tip) is set to 0 IF requested by governance
      • Relative keeper incentive (chip) is set to 0 IF requested by governance
      • Max liquidation amount (hole) is adjusted via DssExecLib.setIlkMaxLiquidationAmount(ilk, amount) IF requested by governance
      • Relevant clipper contract (MCD_CLIP_) is active (i.e. stopped is 0)
      • Liquidations are triggered via (depending on governance instruction):
        • EITHER liquidation ratio (spotter.ilk.mat) being set very high in the spell (using DssExecLib.setValue(DssExecLib.spotter(), ilk, "mat", ratio))
        • OR via enabling linear interpolation (DssExecLib.linearInterpolation(name, target, ilk, what, startTime, start, end, duration))
          • Ensure name format matches "XXX-X Offboarding"
          • Ensure target matches DssExecLib.spotter() address
          • Ensure ilk format matches collateral type (ilk) name ("XXX-X")
          • Ensure what matches string "mat"
          • Ensure startTime matches block.timestamp
          • Ensure start uses variable CURRENT_XXX_A_MAT
          • Ensure start matches current spotter.ilk.mat value
          • Ensure end uses variable TARGET_XXX_A_MAT
          • Ensure end value matches the instruction
          • Ensure end allows liquidation of all remaining vaults (end is bigger than collateral_type_collateralization_ratio * risk_multiplier_factor)
          • Ensure duration matches the instruction
      • Spotter price is updated via DssExecLib.updateCollateralPrice(ilk) IF collateral have no running oracle (i.e. relevant PIP_ contract have outdated zzz value)
        • RWA007-A
        • RWA014-A
      • Spotter price is updated after all other actions
        • RWA007-A
        • RWA014-A
      • Offboarding is tested at least via _checkIlkClipper helper
  • IF RWA updates are present

    • IF doc is updated
      • _updateDoc helper is copied one-to-one from the archive and defined above actions
      • _updateDoc(ilk, doc) is called in the spell
    • IF debt ceiling is updated
      • IF AutoLine update is requested by the Exec Sheet
      • IF regular debt ceiling (vat.ilk.line) update is requested by the Exec Sheet
      • Liquidation oracle price is bumped via RwaLiquidationOracleLike(MIP21_LIQUIDATION_ORACLE).bump(ilk, val) pattern
        • Comment above bump explains val computation via // Note: the formula is: "debt_ceiling * [ (1 + rwa_stability_fee ) ^ (minimum_deal_duration_in_years) ] * liquidation_ratio"
        • Comment above bump provides locally executable formula (e.g. // bc -l <<< 'scale=18; 50000000 * e(l(1.07) * (3342/365)) * 1.00' | cast --to-wei)
          • The formula matches the example provided above
          • debt_ceiling in the executable formula matches new debt ceiling set in the spell or the maximum possible debt ceiling in case of the enabled AutoLine
          • rwa_stability_fee in the executable formula matches stability fee of the specified RWA found on chain
          • minimum_deal_duration_in_years in the executable formula matches number found in the Exec Sheet of the spell containing relevant RWA onboarding
          • liquidation_ratio in the executable formula matches liquidation ratio of the specified RWA found on chain
          • Executing formula locally provides integer number that matches the val in the spell
        • val makes sense in context of the rate mechanism
      • IF multiple RWA ilks are being combined into one, val calculation is done once per ilk and added to make the total, with separate executable formulas provided in comments. The existing val value can be retrieved by calling read() on PIP_RWAXX and converting the result into decimal
      • Oracle price is updated via DssExecLib.updateCollateralPrice(ilk)
      • IF soft liquidation explicitly requested to be triggered (via .tell(ilk)) AND debt ceiling is 0 (OR is being set to 0 in the current spell)
        • RwaLiquidationOracle.tell(ilk) call is present
          • RWA007-A
          • RWA014-A
        • IF RWAXX_A_INPUT_CONDUIT is an instance of TinlakeMgr (it is a Centrifuge integration), additional TinlakeMgr.tell() call is present (in order to prevent further TIN redemptions in the Centrifuge pool)
  • IF payments are present in the spell

    • IF MKR transfers are present
      • Recipient address in the instruction is in the checksummed format
      • Recipient address matches Exec Sheet
      • Recipient address variable name matches one found in addresses_wallets.sol
      • Transfer amount matches Exec Sheet
      • Transfer amount is specified with (at least) 2 decimals using ether keyword
      • IF ether keyword is used, comment is present on the same line // Note: ether is a keyword helper, only MKR is transferred here
      • The transfers are tested via testMKRPayments test
      • Sum of all MKR transfers tested in testMKRPayments matches number in the Exec Sheet
    • IF DAI surplus buffer transfers are present
      • Recipient address in the instruction is in the checksummed format
      • Recipient address matches Exec Sheet
      • Recipient address variable name matches one found in addresses_wallets.sol
      • Transfer amount matches Exec Sheet
      • The transfers are tested via testDAIPayments test
        ⚠️ testDAIPayments was refactored into a general testPayments test case, aiming to test payments from all native tokens in the Sky Protocol (Dai, MKR, USDS and SKY)
      • Sum of all DAI transfers tested in testDAIPayments matches number in the Exec Sheet
    • IF MKR or DAI streams (DssVest) are created
      • VestAbstract interface is imported from dss-interfaces/dss/VestAbstract.sol
      • restrict is used for each stream, UNLESS otherwise explicitly stated in the Exec Sheet
      • usr (Vest recipient address) matches Exec Sheet
      • usr address in the instruction is in the checksummed format
      • usr address variable name match one found in addresses_wallets.sol
      • tot (Total stream amount) matches Exec Sheet
      • IF ether keyword is used, comment is present on the same line // Note: ether is a keyword helper, only MKR is transferred here
      • IF vest amount is expressed in 'per year' or similar in the Exec Sheet, account for leap days
      • bgn (Vest start timestamp) matches Exec Sheet
      • tau is expressed as bgn - fin (i.e. MONTH_DD_YYYY - MONTH_DD_YYYY)
      • fin (Vest end timestamp) matches Exec Sheet
      • eta (Vest cliff duration) matches the following logic
        • IF eta is explicitly specified in the Exec Sheet, then the values match
        • IF eta and clf (Cliff end timestamp) are not specified in the Exec Sheet, then eta is 0
        • IF clf is specified, but clf <= bgn, then eta is 0
        • IF clf is specified and clf > bgn, eta is expressed as clf - bgn (i.e. MONTH_DD_YYYY - MONTH_DD_YYYY)
      • IF mgr (Vest manager address) is specified in the Exec Sheet, matches the value, OTHERWISE matches address(0)
      • Ensure that max vesting rate (cap) is enough for the new streams
        • The maximum vesting rate (tot divided by tau) <= the maximum vest streaming rate (cap)
        • The maximum vesting rate (tot divided by tau) > the maximum vest streaming rate (cap)
        • Calculate new cap value equal to 10% greater than the new maximum vesting rate, then round new cap up with 2 significant figure precision (i.e. 2446 becomes 2500)
      • IF max vesting rate (cap) is changed in the spell
        • Governance facilitators were notified
        • Exec Sheet contain explicit instruction
        • Exec Sheet contain explicit instruction
      • IF MKR stream (DssVestTransferrable) is present
        • Vest contract's MKR allowance increased by the cumulative total (the sum of all tot values)
        • Ensure allowance increase follows archive patterns
      • Tested via testVestDAI or testVestMKR
    • IF MKR or DAI vest termination (Yank) is present
      • Yanked stream ID matches Exec Sheet
      • MCD_VEST_MKR_TREASURY chainlog address is used for MKR stream yank
      • MCD_VEST_DAI chainlog address is used for DAI stream yank
      • Tested via testYankDAI or testYankMKR
  • IF SubDAO-related content is present

    • IF SubDAO provides SubProxy spell address
      • SubDAO spell address matches Exec Sheet
      • Executed via ProxyLike(SUBDAO_PROXY).exec(SUBDAO_SPELL, abi.encodeWithSignature("execute()"));
      • Execution is NOT delegate call
      • IF SubDAO spell deployer is a smart contract (e.g. multisig or factory), ensure the deployer address is in addresses_deployers.sol as an entry
        ⚠️ Deployer 0x22Ab30978E37f933d4E4fEcC85C0f404C46a8314 is not in addresses_deployers.sol, however I consider this as non-blocking.
      • Ensure that SubDAO spell have enough gas and does not revert with "out of gas" error inside simulation. Note: low level call gas estimation is not done by our scripts
    • IF SubDAO provides instructions to be executed by the main spell (i.e. that will operate within Pause Proxy DelegateCall context)
      • No SubDAO contract being interacted with is authed on a core contract like vat, etc. (Check comprehensively where the risk is high)
      • SubDAO contract licensing and optimizations generally do not matter (except where they pose a security risk)
      • SubDAO contracts and all libraries / dependencies have verified source code (Blocking)
      • Upgradable SubDAO contracts
        • Upgradable contracts have the PAUSE_PROXY as their admin (i.e. the party that can upgrade)
        • Any upgradable SubDAO contracts with an admin that is not PAUSE_PROXY are not authed on any core contracts (Blocking)
      • All SubDAO content addresses (i.e. provided contract addresses or EOAs) present in the Maker Core spell are present in the Exec Sheet and are correct. SubDAO addresses being authed or given any permissions MUST be in the Exec Sheet. SubDAO addresses being called must be confirmed by the SubDAO spell team.
      • IF addresses not PR'ed in by the SubDAO team (use git blame for example), SubDAO content addresses all have inline comment for provenance or source being OKed by SubDAO
      • SubDAO actions match Exec Sheet (only where inline with main spell code) and do not affect core contracts
      • Core contract knock-on actions (such as offboarding or setting DC to 0) are present in the exec and match the code
      • External calls for SubDAO content are NOT delegate call
      • Code does not have untoward behavior within the scope of Maker Core Contracts (e.g. up to the SubDAO proxy)
  • IF external contracts calls are present (Not SubDAOs, e.g. Starknet)

    • Target Contract doesn't block spell execution
    • External call is NOT delegatecall
    • Target Contract doesn't have permissions on the Vat
    • Target Contract doesn't do anything untoward (e.g. interacting with unsafe contracts)
    • Contracts deployed via CREATE2 (e.g. if it looks like a vanity address) do not have selfdestruct in their code
    • MCD Pause Proxy doesn't give any approvals
    • All possible actions of the Target Contract are documented
    • Target contract is not upgradable
    • Target Contract is included in the ChainLog
    • Test Coverage is comprehensive
  • IF spell interacts with ChainLog

    • ChainLog version is incremented based on update type
      • Major -> New Vat (++.0.0)
      • Minor -> Core Module (DSS) Update (e.g. Flapper) (0.++.0)
      • Patch -> Collateral addition or addition/modification (0.0.++)
    • New addresses are added to the addresses_mainnet.sol
    • Changes are tested via testChainlogIntegrity and testChainlogValues
  • Ensure every spell variable is declared as public/internal

  • Ensure immutable visibility is only used when fetching addresses from the ChainLog via DssExecLib.getChangelogAddress(key) and constant is used instead for static addresses

    • Fetch addresses as type address and wrap with Like suffix interfaces inline (when making calls), UNLESS archive patterns permit otherwise (Such as MKR)
    • Use the DssExecLib Core Address Helpers where possible (e.g. DssExecLib.vat())
    • Where addresses are fetched from the ChainLog, the variable name must match the value of the ChainLog key for that address (e.g. MCD_VAT rather than vat), except where the archive pattern differs from this pattern (e.g. MKR)
  • Tests

    • Ensure that the DssExecLib.address file is not being modified by the spell PR
    • Check all CI tests are passing as at the latest commit
      95c68b5bad2faa03900bd8c973436bf6584fc880
      
    • Ensure every test function is declared as public
      • IF the test needs to run, it MUST NOT have the skipped modifier; OTHERWISE, it MUST have the skipped modifier
    • Ensure each spell action has sufficient test coverage
      • Setup new MkrOsm
        • Whitelist MkrOsm to read from current PIP_MKR using DssExecLib.addReaderToWhitelist with the following parameters:
          testOsmReaders, testMedianReaders
        • Set MkrOsm as "PIP_MKR" in the chainlog using the following parameters:
          testChainlogIntegrity, testChainlogValues
      • Setup new VoteDelegateFactory
        • Rename "VOTE_DELEGATE_PROXY_FACTORY" to "VOTE_DELEGATE_FACTORY_LEGACY" in chainlog:
          • Call CHAINLOG.removeAddress with the following parameters:
            testChainlogIntegrity, testRemoveChainlogValues
        • Set "VOTE_DELEGATE_FACTORY" in the chainlog to 0xC3D809E87A2C9da4F6d98fECea9135d834d6F5A0
          testChainlogIntegrity, testChainlogValues
      • Setup Lockstake Engine
        • SBE Parameter Changes
          testGeneral
        • Set Flapper farm by calling FlapperInit.setFarm with the following parameters:
          testGeneral
        • Init Lockstake Engine by calling LockstakeInit.initLockstake with the following parameters:
          testLockstakeIlkIntegration
      • Fund Early Bird Rewards Multisig
        • Mint 27,222,832.80 SKY to 0x14D98650d46BF7679BBD05D4f615A1547C87Bf68
          testPayments
      • Lower Deprecated RWA Debt Ceilings
        • Remove RWA007-A from Debt Ceiling Instant Access Module
          testGeneral
        • Set RWA007-A Debt Ceiling to 0
          testGeneral
        • Initiate RWA007-A soft liquidation by calling tell()
          testRwaTellAndCull
        • Write-off the debt of RWA007-A and set its oracle price to 0 by calling cull()
          testRwaTellAndCull
        • Reduce RWA014-A Debt Ceiling by 1.5 billion Dai from 1.5 billion Dai to 0
          testGeneral
        • Initiate RWA014-A soft liquidation by calling tell()
          testRwaTellAndCull
        • Write-off the debt of RWA014-A and set its oracle price to 0 by calling cull()
          testRwaTellAndCull
      • Pinwheel DAO Resolution
        • Approve DAO Resolution at QmYJUvw5xbAJmJknG2xUKDLe424JSTWQQhbJCnucRRjUv7
          testDaoResolutions
      • AAVE Revenue Share Payment
        • AAVE Revenue Share - 234089 DAI - 0x464C71f6c2F760DdA6093dCB91C24c39e5d6e18c
          testPayments
      • Spark Spell
        • Execute Spark Proxy Spell at 0xcc3B9e79261A7064A0f734Cc749A8e3762e0a187
          testSparkSpellIsExecuted
    • Ensure that any other env variable does not affect execution of the tests (for example, by inspecting the output of printenv | grep "FOUNDRY_\|DAPP_")
    • Check all tests are passing locally using make test
      • Ensure every test listed in the coverage item above is present in the logs and with the [PASS] prefix.
Using DssExecLib at: 0x8De6DDbCd5053d32292AAA0D2105A32d108484a6
[] Compiling...
[] Compiling 5 files with Solc 0.8.16
[] Solc 0.8.16 finished in 14.88s
Compiler run successful!

Ran 2 tests for src/test/starknet.t.sol:StarknetTests
[PASS] testStarknet() (gas: 6497815)
[PASS] testStarknetSpell() (gas: 2287)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 62.60s (56.69s CPU time)

Warning: the following cheatcode(s) are deprecated and will be removed in future versions:
snapshot(): replaced by `snapshotState`
revertTo(uint256): replaced by `revertToState`
Ran 40 tests for src/DssSpell.t.sol:DssSpellTest
[SKIP] testBytecodeMatches() (gas: 0)
[PASS] testCastCost() (gas: 6375050)
[PASS] testCastOnTime() (gas: 6372079)
[PASS] testChainlogIntegrity() (gas: 11434750)
[PASS] testChainlogValues() (gas: 13836007)
[SKIP] testCollateralIntegrations() (gas: 0)
[PASS] testContractSize() (gas: 10864)
[PASS] testDaoResolutions() (gas: 11413)
[PASS] testDeployCost() (gas: 4473236)
[SKIP] testEsmAuth() (gas: 0)
[PASS] testGeneral() (gas: 31797899)
[SKIP] testIlkClipper() (gas: 0)
[SKIP] testL2ArbitrumSpell() (gas: 0)
[SKIP] testL2OptimismSpell() (gas: 0)
[SKIP] testLerpSurplusBuffer() (gas: 0)
[PASS] testLitePSMs() (gas: 7191722)
[PASS] testLockstakeIlkIntegration() (gas: 15129629)
[PASS] testMedianReaders() (gas: 6380505)
[PASS] testNewAuthorizations() (gas: 6552167)
[SKIP] testNewCronJobs() (gas: 0)
[PASS] testNewOsmMomAddition() (gas: 6418875)
[PASS] testNextCastTime() (gas: 405635)
[SKIP] testOffboardings() (gas: 0)
[PASS] testOfficeHours() (gas: 479554)
[SKIP] testOracleList() (gas: 0)
[PASS] testOsmReaders() (gas: 6396102)
[PASS] testPSMs() (gas: 7532554)
[PASS] testPayments() (gas: 6492324)
[PASS] testRemoveChainlogValues() (gas: 6378617)
[PASS] testRevertIfNotScheduled() (gas: 16830)
[PASS] testRwaTellAndCull() (gas: 6459681)
[PASS] testSparkSpellIsExecuted() (gas: 6376733)
[PASS] testSplitter() (gas: 6878708)
[PASS] testSystemTokens() (gas: 7201276)
[PASS] testUseEta() (gas: 341990)
[SKIP] testVestDAI() (gas: 0)
[SKIP] testVestMKR() (gas: 0)
[SKIP] testVestSKY() (gas: 0)
[SKIP] testYankDAI() (gas: 0)
[SKIP] testYankMKR() (gas: 0)
Suite result: ok. 25 passed; 0 failed; 15 skipped; finished in 420.52s (1410.65s CPU time)

Ran 2 test suites in 421.10s (483.11s CPU time): 27 tests passed, 0 failed, 15 skipped (42 total tests)

Pre-Deployment Stage

  • Wait till the Exec Doc is merged
  • Exec Doc checks
    • Exec Doc for the specified date is found in the makerdao/community GitHub repo
    • Exec Doc file name follows the format Executive vote - Month DD, YYYY.md
    • Extract permanent URL to the raw markdown file and paste it below
      ⚠️ Updated the URL below after posting the review.
      https://github.com/makerdao/community/blob/bcb5c78e658a6d886859272e8119c05708afc50e/governance/votes/Executive%20vote%20-%20October%2017,%202024.md
      https://github.com/makerdao/community/blob/7c7d7d16734407fdde827801ab4bbd6878560375/governance/votes/Executive%20vote%20-%20October%2017,%202024.md
    • Ensure the URL uses commit hash that introduced last change to the Exec Doc, NOT merge commit
      • IF there is no local copy of makerdao/community GitHub repo), run:
        git clone https://github.com/makerdao/community
        
      • OTHERWISE, ensure it is pointing to the latest commit on master:
        git switch master && git pull origin master
        
      • Get the latest commit hash for the exec doc:
        git log --pretty=oneline -1 -- "<LOCAL_PATH_TO_EXEC_DOC>"
        
        7c7d7d16734407fdde827801ab4bbd6878560375
    • Using Exec Doc URL from the above and the TARGET_DATE, generate Exec Doc Hash via make exec-hash date=$TARGET_DATE $URL
      Community repo commit: 7c7d7d16734407fdde827801ab4bbd6878560375
      Raw GitHub URL: https://raw.githubusercontent.com/makerdao/community/7c7d7d16734407fdde827801ab4bbd6878560375/governance/votes/Executive%20vote%20-%20October%2017,%202024.md
      Exec copy hash: 0xa1e0345f807a0333170271e69caca6d384b3a715ccad597b8ad9502963eabd6f
      
    • Using Exec Doc URL from the above, generate Exec Doc Hash via cast keccak -- "$(curl "$URL" -o - 2>/dev/null)"
      0xa1e0345f807a0333170271e69caca6d384b3a715ccad597b8ad9502963eabd6f
    • Make sure that hash above doesn't match keccak hash of the empty string (0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470)
    • Using Exec Doc URL from the above, read spell instructions from the Exec Doc and list them below
      • The Seal Engine will be initialized. This requires a number of sub-actions:
        • Activate a new MKROSM.
        • Activate a new VoteDelegateFactory contract.
        • Initialize the Seal Engine farm in the Flapper.
        • Update Smart Burn Engine parameters.
        • Initialize the Seal Engine and borrowing facility.
      • The Multisig responsible for distributing Early Bird Rewards will be funded with newly minted SKY tokens.
      • Debt Ceilings for the now defunct RWA vaults operated by Monetalis will be set to 0.
      • A Pinwheel DAO Resolution with the hash QmYJUvw5xbAJmJknG2xUKDLe424JSTWQQhbJCnucRRjUv7 will be approved.
      • The Aave-SparkLend Revenue Share payment for Q3 2024 will be distributed.
      • A Spark proxy spell at 0xcc3B9e79261A7064A0f734Cc749A8e3762e0a187 will be executed.
    • Office hours value in the Exec Doc matches the spell
    • Sum of all payments in the Exec Doc matches the tests
    • Exec Doc URL in the spell comment matches your Raw Exec Doc URL above
    • Exec Doc URL in the spell comment refers to the https://github.com/makerdao/community repository
    • Every action present in the spell code is present in the Exec Doc
    • Every action in the Exec Doc is present in the spell code
  • IF new commits are present in the spell
    • Copy relevant checklist items from the above and redo them
    • Ensure newly added code is covered by tests
    • Check if chainlog needs to be updated
    • Copy over and redo "Tests" section from the above
  • IF all checks pass, make sure to include explicit "Good to deploy" comment

@SidestreamColdMelon
Copy link
Contributor Author

@amusingaxl
Copy link
Contributor

TL;DR: good to handover 👋🏻

Deployed Stage

  • Source code settings
    • Deployed spell is verified on etherscan
    • Optimization enabled: false UNLESS the contract size is too big AND all mitigation strategies (i.e.: removing revert strings) have failed
      ✅ Optimizations are enabled due to contract size
    • Default evmVersion
      ⚠️ Etherscan UI shows london, but this is non-blocking.
    • GNU AGPLv3 license
  • Source code validity
    • Deployed spell code matches source on github. (can be checked via make diff-deployed-spell or manually)
    • No new changes are made after previously given "good to deploy"
  • Deployed spell Etherscan checks
    • Automated checks via make check-deployed-spell
      • Verified
      • Valid license
      • Version matches
      • Optimizations are disabled
        ⚠️ optimizations are required to be enabled for this spell
      • dss-exec-lib library address used (under 'Libraries Used') matches the hardcoded local DssExecLib.address file
      • deployed_spell_created matches deployment timestamp
      • deployed_spell_block matches deployment block number
    • Manual checks
      • Ensure make deploy-info tx=<tx> matches config
        • deployed_spell_created timestamp
        • deployed_spell_block block number
      • Check again that the PR did not modify the DssExecLib.address file (e.g. look under the 'Files Changed' PR tab, etc.)
      • Ensure Etherscan Libraries Used matches DssExecLib Latest Release
      • (For your tests to be accurate) git submodule hash matches dss-exec-lib latest release's tag commit and inspect diffs if doesn't match to ensure expected behaviour (Currently Non-Critical pending the next DssExecLib release, double check that the ExecLib used by the contract matches the latest release)
  • Tenderly Testnet checks
    • A testnet with the name matching spell description is found at maker dashboard
    • The testnet name is unique (previous testnets does not have the same name)
    • Cast transaction is set to the correct "receiver" (matches deployed spell address)
    • All actions are executed in the transaction trace
    • No reverts are present that block execution
    • No out-of-gas errors are present
  • Archive checks
    • make diff-archive-spell for current date or make diff-archive-spell date="YYYY-MM-DD"
    • Ensure date corresponds to target Exec Doc date
  • Tests
    • Ensure that the DssExecLib.address file is not being modified by the spell PR
    • Check all CI tests are passing as at the latest commit
      9cc33691f077fe6136d8a0f84b0528be4bd9d0cf
      
    • Ensure that any other env variable does not affect execution of the tests (for example, by inspecting the output of printenv | grep "FOUNDRY_\|DAPP_")
    • Check all tests are passing locally using make test
./scripts/test-dssspell-forge.sh no-match="" match="" block=""
Using DssExecLib at: 0x8De6DDbCd5053d32292AAA0D2105A32d108484a6
[⠊] Compiling...
[⠊] Compiling 114 files with Solc 0.8.16
[⠢] Solc 0.8.16 finished in 19.98s
Compiler run successful!

Ran 2 tests for src/test/starknet.t.sol:StarknetTests
[PASS] testStarknet() (gas: 6497815)
[PASS] testStarknetSpell() (gas: 2287)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 55.91s (53.75s CPU time)

Warning: the following cheatcode(s) are deprecated and will be removed in future versions:
  revertTo(uint256): replaced by `revertToState`
  snapshot(): replaced by `snapshotState`
Ran 40 tests for src/DssSpell.t.sol:DssSpellTest
[PASS] testBytecodeMatches() (gas: 4494142)
[PASS] testCastCost() (gas: 6375050)
[PASS] testCastOnTime() (gas: 6372079)
[PASS] testChainlogIntegrity() (gas: 11434750)
[PASS] testChainlogValues() (gas: 13836007)
[SKIP] testCollateralIntegrations() (gas: 0)
[SKIP] testContractSize() (gas: 0)
[PASS] testDaoResolutions() (gas: 11413)
[SKIP] testDeployCost() (gas: 0)
[SKIP] testEsmAuth() (gas: 0)
[PASS] testGeneral() (gas: 31799992)
[SKIP] testIlkClipper() (gas: 0)
[SKIP] testL2ArbitrumSpell() (gas: 0)
[SKIP] testL2OptimismSpell() (gas: 0)
[SKIP] testLerpSurplusBuffer() (gas: 0)
[PASS] testLitePSMs() (gas: 7228919)
[PASS] testLockstakeIlkIntegration() (gas: 15129629)
[PASS] testMedianReaders() (gas: 6380505)
[PASS] testNewAuthorizations() (gas: 6552167)
[SKIP] testNewCronJobs() (gas: 0)
[PASS] testNewOsmMomAddition() (gas: 6418875)
[PASS] testNextCastTime() (gas: 405635)
[SKIP] testOffboardings() (gas: 0)
[PASS] testOfficeHours() (gas: 479554)
[SKIP] testOracleList() (gas: 0)
[PASS] testOsmReaders() (gas: 6396102)
[PASS] testPSMs() (gas: 7532554)
[PASS] testPayments() (gas: 6492037)
[PASS] testRemoveChainlogValues() (gas: 6378617)
[PASS] testRevertIfNotScheduled() (gas: 16830)
[PASS] testRwaTellAndCull() (gas: 6459681)
[PASS] testSparkSpellIsExecuted() (gas: 6376733)
[PASS] testSplitter() (gas: 6878708)
[PASS] testSystemTokens() (gas: 7201102)
[PASS] testUseEta() (gas: 341990)
[SKIP] testVestDAI() (gas: 0)
[SKIP] testVestMKR() (gas: 0)
[SKIP] testVestSKY() (gas: 0)
[SKIP] testYankDAI() (gas: 0)
[SKIP] testYankMKR() (gas: 0)
Suite result: ok. 24 passed; 0 failed; 16 skipped; finished in 391.54s (1363.05s CPU time)

Ran 2 test suites in 392.06s (447.45s CPU time): 26 tests passed, 0 failed, 16 skipped (42 total tests)

@SidestreamStrongStrawberry
Copy link
Collaborator

Good to handover :)

Deployed Stage

  • Source code settings
    • Deployed spell is verified on etherscan
    • Optimization enabled: false UNLESS the contract size is too big AND all mitigation strategies (i.e.: removing revert strings) have failed
    • Default evmVersion
    • GNU AGPLv3 license
  • Source code validity
    • Deployed spell code matches source on github. (can be checked via make diff-deployed-spell or manually)
    • No new changes are made after previously given "good to deploy"
  • Deployed spell Etherscan checks
    • Automated checks via make check-deployed-spell
      • Verified
      • Valid license
      • Version matches
      • Optimizations are disabled
        ⚠️ Optimization is enabled due to the big size of the spell, and it is expected
      • dss-exec-lib library address used (under 'Libraries Used') matches the hardcoded local DssExecLib.address file
      • deployed_spell_created matches deployment timestamp
      • deployed_spell_block matches deployment block number
    • Manual checks
      • Ensure make deploy-info tx=<tx> matches config
        • deployed_spell_created timestamp
        • deployed_spell_block block number
      • Check again that the PR did not modify the DssExecLib.address file (e.g. look under the 'Files Changed' PR tab, etc.)
      • Ensure Etherscan Libraries Used matches DssExecLib Latest Release
      • (For your tests to be accurate) git submodule hash matches dss-exec-lib latest release's tag commit and inspect diffs if doesn't match to ensure expected behaviour (Currently Non-Critical pending the next DssExecLib release, double check that the ExecLib used by the contract matches the latest release)
        ⚠️ The hash doesn't match as in the previous spells.
        Hash of latest release v0.0.9: c0d3c6c6244468ddab9767de6f853122723fafda
        git submodule lib/dss-exec-lib: 69b658f35d8618272cd139dfc18c5713caf6b96b
        diff check: changes are not related to current spell
  • Tenderly Testnet checks
    • A testnet with the name matching spell description is found at maker dashboard
    • The testnet name is unique (previous testnets does not have the same name)
    • Cast transaction is set to the correct "receiver" (matches deployed spell address)
    • All actions are executed in the transaction trace
    • No reverts are present that block execution
    • No out-of-gas errors are present
  • Archive checks
    • make diff-archive-spell for current date or make diff-archive-spell date="YYYY-MM-DD"
    • Ensure date corresponds to target Exec Doc date
  • Tests
    • Ensure that the DssExecLib.address file is not being modified by the spell PR
    • Check all CI tests are passing as at the latest commit
      Insert most recent commit hash where CI was passing
      9cc3369
    • Ensure that any other env variable does not affect execution of the tests (for example, by inspecting the output of printenv | grep "FOUNDRY_\|DAPP_")
    • Check all tests are passing locally using make test
_Insert your local test logs here_
./scripts/test-dssspell-forge.sh no-match="" match="" block=""
Using DssExecLib at: 0x8De6DDbCd5053d32292AAA0D2105A32d108484a6
[⠊] Compiling...
[⠆] Compiling 4 files with Solc 0.8.16
[⠰] Solc 0.8.16 finished in 13.78s
Compiler run successful!

Ran 2 tests for src/test/starknet.t.sol:StarknetTests
[PASS] testStarknet() (gas: 6497846)
[PASS] testStarknetSpell() (gas: 2287)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 57.88s (55.33s CPU time)

Warning: the following cheatcode(s) are deprecated and will be removed in future versions:
  revertTo(uint256): replaced by `revertToState`
  snapshot(): replaced by `snapshotState`
Ran 40 tests for src/DssSpell.t.sol:DssSpellTest
[PASS] testBytecodeMatches() (gas: 4494142)
[PASS] testCastCost() (gas: 6375081)
[PASS] testCastOnTime() (gas: 6372110)
[PASS] testChainlogIntegrity() (gas: 11434781)
[PASS] testChainlogValues() (gas: 13836038)
[SKIP] testCollateralIntegrations() (gas: 0)
[SKIP] testContractSize() (gas: 0)
[PASS] testDaoResolutions() (gas: 11413)
[SKIP] testDeployCost() (gas: 0)
[SKIP] testEsmAuth() (gas: 0)
[PASS] testGeneral() (gas: 31800023)
[SKIP] testIlkClipper() (gas: 0)
[SKIP] testL2ArbitrumSpell() (gas: 0)
[SKIP] testL2OptimismSpell() (gas: 0)
[SKIP] testLerpSurplusBuffer() (gas: 0)
[PASS] testLitePSMs() (gas: 7191753)
[PASS] testLockstakeIlkIntegration() (gas: 15129660)
[PASS] testMedianReaders() (gas: 6380536)
[PASS] testNewAuthorizations() (gas: 6552198)
[SKIP] testNewCronJobs() (gas: 0)
[PASS] testNewOsmMomAddition() (gas: 6418906)
[PASS] testNextCastTime() (gas: 405635)
[SKIP] testOffboardings() (gas: 0)
[PASS] testOfficeHours() (gas: 479557)
[SKIP] testOracleList() (gas: 0)
[PASS] testOsmReaders() (gas: 6396133)
[PASS] testPSMs() (gas: 7532585)
[PASS] testPayments() (gas: 6492239)
[PASS] testRemoveChainlogValues() (gas: 6378648)
[PASS] testRevertIfNotScheduled() (gas: 16830)
[PASS] testRwaTellAndCull() (gas: 6459712)
[PASS] testSparkSpellIsExecuted() (gas: 6376764)
[PASS] testSplitter() (gas: 6878739)
[PASS] testSystemTokens() (gas: 7201774)
[PASS] testUseEta() (gas: 341990)
[SKIP] testVestDAI() (gas: 0)
[SKIP] testVestMKR() (gas: 0)
[SKIP] testVestSKY() (gas: 0)
[SKIP] testYankDAI() (gas: 0)
[SKIP] testYankMKR() (gas: 0)
Suite result: ok. 24 passed; 0 failed; 16 skipped; finished in 351.09s (880.26s CPU time)

Ran 2 test suites in 351.67s (408.97s CPU time): 26 tests passed, 0 failed, 16 skipped (42 total tests)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved :)

Handover and Merge Stage

  • Check that the spell address posted by the crafter in new-spells is correct
  • Confirm the address in the new-spells channel (via a separate "reply to" message, restating the address to avoid edits)
    • Wait until responsible governance facilitator confirms handover in new-spells
  • Ensure that no changes were made to the code since the spell was deployed and archived
  • Approve spell PR for merge via 'Approve' review option

Copy link
Contributor

@amusingaxl amusingaxl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TL;DR: Good to merge 🔀

Handover and Merge Stage

  • Check that the spell address posted by the crafter in new-spells is correct
  • Confirm the address in the new-spells channel (via a separate "reply to" message, restating the address to avoid edits)
    • Wait until responsible governance facilitator confirms handover in new-spells
  • Ensure that no changes were made to the code since the spell was deployed and archived
  • Approve spell PR for merge via 'Approve' review option

@SidestreamColdMelon SidestreamColdMelon merged commit 460b178 into master Oct 18, 2024
3 checks passed
@SidestreamColdMelon SidestreamColdMelon deleted the 2024-10-17 branch October 18, 2024 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants