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

Spell 2023-11-15 #371

Merged
merged 6 commits into from
Nov 17, 2023
Merged

Spell 2023-11-15 #371

merged 6 commits into from
Nov 17, 2023

Conversation

0xdecr1pto
Copy link
Contributor

Description

Contribution Checklist

  • PR title starts with (PE-<TICKET_NUMBER>)
  • 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

@0xdecr1pto 0xdecr1pto marked this pull request as ready for review November 15, 2023 16:28
@0xdecr1pto 0xdecr1pto self-assigned this Nov 15, 2023
@SidestreamSweatyPumpkin
Copy link
Contributor

Mainnet Executive Spell Review Checklist

Good to deploy

Mainnet 2023-11-15

Spell Actions (Per Exec Doc):

  • Spark Proxy-Spell
    • NOTE: not directly implemented in this spell, instead is in the spark spell
    • Pass Spark Proxy Spelll at 0xDa69603384Ef825E52FD5B8bEF656ff62Fe19703
    • Gnosis Chain - Increase wstETH Supply Cap to 10,000 wstETH
    • Ethereum - Set DAI Market Maximum Loan-to-Value to Zero Percent
    • Ethereum - Reactivate WBTC and Optimize Parameters for Current Market Conditions
    • Ethereum - Increase rETH & wstETH Supply Caps
    • Ethereum & Gnosis Chain - Adjust ETH Market Interest Rate Models
  • Adjust Spark Lend D3M Maximum Debt Ceiling (line)
    • Increase the DIRECT-SPARK-DAI Maximum Debt Ceiling (line) from 400 million DAI to 800 million DAI.
  • Launch Project Funds Transfer
    • Transfer 2,200,000 DAI to 0x3C5142F28567E6a0F172fd0BaaF1f2847f49D02F.
    • Transfer 500.00 MKR to 0x3C5142F28567E6a0F172fd0BaaF1f2847f49D02F.
  • DAO Resolution Pertaining to HVBank (RWA009-A) and Updated Standing Instructions to Escrow Agent
    • Updated Standing Instructions to Escrow Agent - QmWVWXckY482WLTtCFv3x45DFioV1K8mfRM3FVrodqUDud
    • DAO Resolution to Approve New Galaxy Payment Instructions - QmSbwqULr66CiCvNips93vwTrvoTe4i2rJVmho7QfmyqZG
  • Whistleblower Bounty
    • Transfer 27.78 MKR from the Pause Proxy to 0xCDDd2A697d472d1e8a0B1B188646c756d097b058.
  • Delegate Compensation for October
    • 0xDefensor 0x9542b441d65B6BF4dDdd3d4D2a66D8dCB9EE07a9 41.67
    • TRUE NAME 0x612f7924c367575a0edf21333d96b15f1b345a5d 41.67
    • BONAPUBLICA 0x167c1a762B08D7e78dbF8f24e5C3f1Ab415021D3 41.67
    • Cloaky 0x869b6d5d8FA7f4FFdaCA4D23FFE0735c5eD1F818 41.67
    • Navigator 0x11406a9CC2e37425F15f920F494A51133ac93072 40.33
    • vigilant 0x2474937cB55500601BCCE9f4cb0A0A72Dc226F61 13.84
    • UPMaker 0xbb819df169670dc71a16f58f55956fe642cc6bcd 13.89
    • PBG 0x8D4df847dB7FfE0B46AF084fE031F7691C6478c2 13.89
    • PALC 0x78Deac4F87BD8007b9cb56B8d53889ed5374e83A 13.44
    • BLUE 0xb6c09680d822f162449cdfb8248a7d3fc26ec9bf 12.97
    • JAG 0x58D1ec57E4294E4fe650D1CB12b96AE34349556f 4.45

Development Stage

  • Office Hours
    • On (Collateral Onboarding, Keepers, Integrations, ...)
    • Matches Exec Doc
  • 30 days spell expiry in constructor (block.timestamp + 30 days)
  • Exec Doc Hash
  • Spell Description
    • Description follows the format TARGET_DATE MakerDAO Executive Spell | Hash: EXEC_DOC_HASH)
    • Target date in description matches the Exec Doc target date
    • Exec Doc Hash in description matches your locally generated Exec Doc Hash
    • Accompanying comment above spell description
      • Comment follows the format // Hash: cast keccak -- "$(wget 'EXEC_DOC_URL' -q -O - 2>/dev/null)"
      • Exec Doc URL in comment matches your Raw Exec Doc URL
      • Exec Doc URL in comment refers to the 'Community' GitHub repo
  • Ensure the comments inside the spell action are correct:
    • Every Section text from the Exec Sheet should be copied as comment to the spell code (above the code segment that implements the action)
      • is surrounded by the set of dashes (E.g. // ----- Section text -----)
    • Every Instruction text Exec Sheet should be:
      • copied to the spell code as // Instruction text
      • have newline above it
    • Every Reasoning URL and Authority URL from the Exec Sheet should be present under relevant section or instruction in the spell code (depending on which row the link is present)
      • Every Reasoning URL and Authority URL should 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/
    • If action in the spell doesn't have relevant instruction (e.g.: chainlog version bump), it should have explanation prefixed with // Note:
    • If an instruction can not be taken, it should have a comment under the instruction prefixed with // Note: (e.g.: // Note: Payments are skipped on goerli)
  • Local Environment Actions
    • Update Foundry by running foundryup
    • Reinstall libraries
      • Remove libraries by deleting the lib folder
      • Install libraries using 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 '9bfd7afadd1f8c217ef05850b25556917
        86286cb'
        Submodule path 'lib/dss-exec-lib/lib/forge-std': checked out '0aa99eb8456693c015350c5e6c4f442ebe912f
        77'
        Submodule path 'lib/dss-exec-lib/lib/forge-std/lib/ds-test': checked out 'cd98eff28324bfac652e63a239
        a60632a761790b'
        Submodule path 'lib/dss-test': checked out '4ad127cf53eeaddfb7b8ad56dd4b13e57d6a0067'
        Submodule path 'lib/dss-test/lib/dss-interfaces': checked out '9bfd7afadd1f8c217ef05850b255569178628
        6cb'
        Submodule path 'lib/dss-test/lib/forge-std': checked out 'aea0b2685bebc883c09f5554d7fb481e85d0564d'
        Submodule path 'lib/dss-test/lib/forge-std/lib/ds-test': checked out 'cd98eff28324bfac652e63a239a606
        32a761790b'
        
    • Dependency checks
      • dss-exec-lib
        • if submodule upgrades are present make sure dss-exec-lib is synced as well
        • git submodule hash (run git submodule status) matches the latest release version or newer (NOTE: dss-exec-lib as installed locally will use GitHub code more recent than the 0.0.9 release)
      • dss-test
  • Interface Checks
    • dss-interfaces
      • used in the current spell
      • cleanup previous ones
      • ensure only single import layout is used (e.g. import "dss-interfaces/dss/VatAbstract.sol";)
    • Static Interfaces
      • ensure they match dss-interfaces (Where there is a mismatch, use cast interface as the source of truth)
      • check on-chain interface of deployed contract via cast interface <contract_address> to ensure correctness
      • interface naming style should match with Like suffix (e.g. VatLike), with some exceptions
      • ensure they only list used functions in spell code
  • Rate constants used are correct
    • Manual check 1: using make rates pct=<pct> (e.g. pct=0.75, for 0.75%)
    • Manual check 2: Compare against IPFS
    • Variable name conforms to X_PT_Y_Z_PCT_RATE (e.g. ZERO_PT_SEVEN_FIVE_PCT_RATE for 0.75%)
    • Variable visibility declared as internal
    • State mutability declared as constant
  • Constants Match
    • Precision unit constants used match their defined values
      • WAD = 10 ** 18
      • RAY = 10 ** 27
      • RAD = 10 ** 45
      • Variable visibility declared as internal
      • State mutability declared as constant
      • Ensure they match with ds-math and the Numerical Ranges
    • Math unit constants used match their defined values
      • HUNDRED = 10 ** 2
      • THOUSAND = 10 ** 3
      • MILLION = 10 ** 6
      • BILLION = 10 ** 9
      • Variable visibility declared as internal
      • State mutability declared as constant
      • Ensure they match with config
    • Timestamp constants used are correct
      • Ensure the timestamp converts to the correct date
      • Variable naming matches MONTH_DD_YYYY (e.g. MAY_01_2023 for 2023-05-01)
      • Time of day makes logical sense (i.e. 23:59:59 for the final day of something, 00:00:00 for the first day of something) in the context of timestamp usage
      • Variable visibility declared as internal
      • State mutability declared as constant
  • Deployed Contracts (not yet on chainlog or new to chainlog)
    • Verified on etherscan
    • Optimizations match Repo
    • GNU AGPLv3 license
    • Constructor args ok (e.g. vat, dai, dog, ...)
    • Wards ok (pause proxy relied, deployer denied)
      • MCD_ESM is already relied / being relied in this spell (as approved by Governance Facilitators) in order to allow de-authing the pause proxy during Emergency Shutdown, via denyProxy.
    • Matches corresponding github source code (i.e. diffcheck via vscode code --diff etherscan.sol github.sol)
    • Ensure deployer address is included into addresses_deployers.sol (to keep up to date)
  • Core System Parameter Changes
  • Debt Ceiling Changes
  • Onboarding (insert relevant checklists inline here)
  • Offboarding (Lerp mat)
    • 1st Stage Spell Actions
      • Remove Ilk from Autoline
      • Set Ilks Debt Ceilings to 0
      • Cache Ilks line to Reduce in the Global Debt Ceiling
      • Decrease Global Debt Ceiling by Total Amount of Offboarded Ilks line Cached
    • 2nd Stage Spell Actions
      • Set Ilk Liquidation Penalty chop to 0
      • Set Keeper Incentive Flat Rate tip to 0
      • Check IF chip is required to be adjusted as well
      • Use DssExecLib.linearInterpolation
        • name Format matches "XXX-A Offboarding"
        • target matches spotter
        • ilk Format matches "XXX-A"
        • what matches mat
        • startTime matches block.timestamp
        • start matches Var CURRENT_XXX_A_MAT
        • end matches Var TARGET_XXX_A_MAT (Match Exec Doc & Risk Computations)
          • Check IF Target mat Covers All Remaining Vaults CR times Risk Multiplier Factor
        • duration matches Exec Doc
  • RWA Updates
    • doc (Using the _updateDoc helper or otherwise)
      • init the RwaLiquidationOracle to reset the doc
      • Sanity Check pip must be set (not the zero address)
      • ilk follows format "RWAXXX-A"
      • val price ignored (0) if init has already been called
      • doc new legal document (IPFS HASH) matches Exec Doc
      • tau parameter used is the old tau value
    • Debt Ceiling changes (line)
      • Autoline (line) + Liquidation Oracle Price Bump (val)
        • Enable Autoline
          • ilk follows format "RWAXXX-A"
          • line (max debt ceiling)
          • gap
          • ttl
      • Debt Ceiling (line) + Liquidation Oracle Price Bump (val)
        • Increase Ilk Debt Ceiling (set DC + increase Global DC)
      • bump RwaLiquidationOracle with new computed increased price (val)
        • ensure val is set accordingly with autoline max debt ceiling (line)
        • val should enable DAI to be drawn over the loan period while taking into account the configured ink amount, interest rate and liquidation ratio (see below)
          • New val is calculated with line * [(1 + duty) ** years] * mat - rounded up - and makes sense in context of the rate mechanism. Minimum duration is usually in the Exec Doc of the spell with the RWAXXX ilk onboarding.
          • Comment explaining val formula (Debt ceiling * [ (1 + RWA stability fee ) ^ (minimum deal duration in years) ] * liquidation ratio) is present
          • Accompanying comment above bump line in format // XXM * 1.XX^X * X.XX as a WAD corresponding to the val calculation formula (e.g. // 15M * 1.03^2 * 1.00 as a WAD) is present along with the calculation formula on the line above
          • IF combining val of multiple RWA ilks being combined, val calculation is done once per ilk and added to make the total, with workings provided in code comments. The existing val value can be retrieved by calling read() on PIP_RWAXX and converting the result into decimal.
      • Poke spotter to pull in the new price
    • Soft Liquidation (tell)
      • Call RwaLiquidationOracle.tell(ilk)
      • IF RWAXX_A_INPUT_CONDUIT is an instance of TinlakeMgr (it is a Centrifuge integration)
        • Call TinlakeMgr.tell() to prevent further TIN redemptions in the Centrifuge pool.
  • Payments
    • MKR transfers
      • Recipient addresses match Exec Doc
      • Transfer values match Exec Doc
        • All values are specified with at least 2 decimals
        • Sum of all values matches Exec Doc
      • Follows archive patterns
    • DAI Surplus Buffer transfers
      • Recipient addresses match Exec Doc
      • Transfer values match Exec Doc
        • All values are specified with 2 decimals
          not feasible since the datatype is int
        • Sum of all values matches Exec Doc
      • Follows previous patterns
    • Create New MKR/DAI Streams (DssVest)
      • DssVestLike interface is correct
      • Check for all streams (MKR, DAI)
        • restrict is used for each stream unless otherwise stated in the Exec Doc
        • usr (Vest recipient address) matches Exec Doc
        • tot (Total stream amount) matches Exec Doc
          • Use ether to express decimal (non-integer) values of tot
          • Where vest amount is expressed in 'per year' or similar in the Exec Doc, account for leap days
        • bgn (Vest start timestamp) matches Exec Doc
        • tau (Vest total duration) matches Exec Doc
          • tau is expressed as 'bgn - fin' (i.e. MONTH_DD_YYYY - MONTH_DD_YYYY)
          • fin (Vest end timestamp) matches Exec Doc
        • eta (Vest cliff duration) matches Exec Doc
          • If the Exec Doc does not specify a cliff date (clf), eta is 0
          • clf (Cliff end timestamp) matches Exec Doc
          • If clf <= bgn, eta is 0
          • If clf > bgn
            • eta is expressed as 'clf - bgn' (i.e. MONTH_DD_YYYY - MONTH_DD_YYYY)
        • mgr (Vest manager address) matches Exec Doc
          • If the Exec Doc does not specify a manager address, mgr is address(0)
      • Max vesting rate (cap) check (MKR, DAI)
        • 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
          • Round new cap up with 2 significant figure precision (i.e. 2446 becomes 2500)
          • Notify Governance Facilitators for addition in Exec Doc AND Exec Sheet
          • Ensure that cap change is noted in the Exec Doc
          • New cap value matches Exec Doc
      • MKR Streams (DssVestTransferrable)
        • Increase vest contract's MKR allowance by the cumulative tot (total of new MKR vest amounts)
        • Ensure allowance increase follows archive patterns
    • Terminate Existing MKR/DAI Streams (Yank)
      • Yanked stream ID matches Exec Doc
      • Use MCD_VEST_MKR_TREASURY for MKR yank
      • Use MCD_VEST_DAI for DAI yank
    • Ensure Recipient Addresses match addresses_wallets.sol
  • SubDAO Content
    • SubDAO SubProxy spell execution
      • SubDAO spell address matches Exec Doc
      • 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
      • Executed using ProxyLike(SUBDAO_PROXY).exec(SUBDAO_SPELL, abi.encodeWithSignature("execute()"));
      • Execution is NOT delegate call
      • Reviewer Note: Gas cost may be very high as SubDAO spells execute within the main cast execution. (Also note that low level call gas estimation is not done by our scripts)
    • Maker Core (main spell) SubDAO actions (i.e. operate in 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 are verified (Blocking if not true)
      • Upgradable SubDAO contracts
        • Any 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 Doc and are correct. SubDAO addresses being authed or given any permissions MUST be in the Exec Doc. 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 Doc (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)
  • External Contracts Calls (Not SubDAOs, e.g. Starknet)
    • Target Contract don't block spell execution
    • External call is NOT delegate call
    • 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
  • ChainLog
    • Increment ChainLog version 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.++)
  • addresses_mainnet.sol matches spell code
  • Ensure every spell variable is declared as public/internal
  • Ensure immutable visibility is only used when fetching addresses from the ChainLog via DssExecLib.getChangelogAddress 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)
  • Spell actions match the corresponding Exec Doc
  • Tests
    • Ensure each spell action has sufficient test coverage
      • Spark Proxy-Spell
        • testSparkSpellIsExecuted
      • Adjust Spark Lend D3M Maximum Debt Ceiling (line)
        • config.sol
      • Launch Project Funds Transfer
        • Transfer 2,200,000 DAI to 0x3C5142F28567E6a0F172fd0BaaF1f2847f49D02F.
          • testPayments
        • Transfer 500.00 MKR to 0x3C5142F28567E6a0F172fd0BaaF1f2847f49D02F.
          • testMKRPayments
      • DAO Resolution Pertaining to HVBank (RWA009-A) and Updated Standing Instructions to Escrow Agent
        • not tested
      • Whistleblower Bounty
        • Transfer 27.78 MKR from the Pause Proxy to 0xCDDd2A697d472d1e8a0B1B188646c756d097b058.
          • testMKRPayments
      • Delegate Compensation for October
        • 0xDefensor 0x9542b441d65B6BF4dDdd3d4D2a66D8dCB9EE07a9 41.67
          • testMKRPayments
        • TRUE NAME 0x612f7924c367575a0edf21333d96b15f1b345a5d 41.67
          • testMKRPayments
        • BONAPUBLICA 0x167c1a762B08D7e78dbF8f24e5C3f1Ab415021D3 41.67
          • testMKRPayments
        • Cloaky 0x869b6d5d8FA7f4FFdaCA4D23FFE0735c5eD1F818 41.67
          • testMKRPayments
        • Navigator 0x11406a9CC2e37425F15f920F494A51133ac93072 40.33
          • testMKRPayments
        • vigilant 0x2474937cB55500601BCCE9f4cb0A0A72Dc226F61 13.84
          • testMKRPayments
        • UPMaker 0xbb819df169670dc71a16f58f55956fe642cc6bcd 13.89
          • testMKRPayments
        • PBG 0x8D4df847dB7FfE0B46AF084fE031F7691C6478c2 13.89
          • testMKRPayments
        • PALC 0x78Deac4F87BD8007b9cb56B8d53889ed5374e83A 13.44
          • testMKRPayments
        • BLUE 0xb6c09680d822f162449cdfb8248a7d3fc26ec9bf 12.97
          • testMKRPayments
        • JAG 0x58D1ec57E4294E4fe650D1CB12b96AE34349556f 4.45
          • testMKRPayments
    • Ensure every test function is declared as public if enabled or private if disabled
    • 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
      eac7218
    • Check all tests are passing locally using make test
      • Ensure that only ETH_RPC_URL is being used from env (i.e. no match, block or similar are active in your env)
``./scripts/test-dssspell-forge.sh no-match="" match="" block=""
Using DssExecLib at: 0x8De6DDbCd5053d32292AAA0D2105A32d108484a6
[⠃] Compiling...
[⠘] Compiling 7 files with 0.8.16
[⠒] Solc 0.8.16 finished in 1.89s
Compiler run successful!

Running 2 tests for src/test/starknet.t.sol:StarknetTests
[PASS] testStarknet() (gas: 2741262)
[PASS] testStarknetSpell() (gas: 2346)
Test result: ok. 2 passed; 0 failed; 0 skipped; finished in 84.14s

Running 20 tests for src/DssSpell.t.sol:DssSpellTest
[PASS] testAuth() (gas: 9223371487106296465)
[PASS] testAuthInSources() (gas: 9223371487099537782)
[PASS] testBytecodeMatches() (gas: 2354824)
[PASS] testCastCost() (gas: 2589111)
[PASS] testChainlogValues() (gas: 11539777)
[PASS] testChainlogVersionBump() (gas: 6251944)
[PASS] testContractSize() (gas: 9028)
[PASS] testDeployCost() (gas: 2340536)
[PASS] testFailNotScheduled() (gas: 14375)
[PASS] testFailTooEarly() (gas: 13519)
[PASS] testFailTooLate() (gas: 13584)
[PASS] testFailWrongDay() (gas: 13629)
[PASS] testGeneral() (gas: 38087524)
[PASS] testMKRPayments() (gas: 2700698)
[PASS] testNextCastTime() (gas: 353614)
[PASS] testOnTime() (gas: 2584838)
[PASS] testPSMs() (gas: 3933390)
[PASS] testPayments() (gas: 2657396)
[PASS] testSparkSpellIsExecuted() (gas: 2588374)
[PASS] testUseEta() (gas: 352346)
Test result: ok. 20 passed; 0 failed; 0 skipped; finished in 945.01s

Ran 2 test suites: 22 tests passed, 0 failed, 0 skipped (22 total tests)

@0xp3th1um
Copy link
Collaborator

Good to deploy!

Mainnet Executive Spell Review Checklist

Mainnet 2023-11-15

Spell Actions (Per Exec Doc):

Spark Proxy-Spell

  • Pass Spark Proxy Spelll at 0xDa69603384Ef825E52FD5B8bEF656ff62Fe19703
  • Gnosis Chain - Increase wstETH Supply Cap to 10,000 wstETH
  • Ethereum - Set DAI Market Maximum Loan-to-Value to Zero Percent
  • Ethereum - Reactivate WBTC and Optimize Parameters for Current Market Conditions
  • Ethereum - Increase rETH & wstETH Supply Caps
  • Ethereum & Gnosis Chain - Adjust ETH Market Interest Rate Models

Adjust Spark Protocol D3M Maximum Debt Ceiling

  • Increase the DIRECT-SPARK-DAI Maximum Debt Ceiling from 400 million DAI to 800 million DAI.

Launch Project Funds Transfer

  • Launch Project - 2200000.00 DAI - 0x3C5142F28567E6a0F172fd0BaaF1f2847f49D02F
  • Launch Project - 500.00 MKR - 0x3C5142F28567E6a0F172fd0BaaF1f2847f49D02F

Pass HVB Resolutions

  • Updated Standing Instructions to Escrow Agent - QmWVWXckY482WLTtCFv3x45DFioV1K8mfRM3FVrodqUDud
  • Approval of New Payment Instructions to Galaxy Digital Trading Cayman LLC - QmSbwqULr66CiCvNips93vwTrvoTe4i2rJVmho7QfmyqZG

Whistleblower Bounty

  • VeniceTree - 27.78 MKR - 0xCDDd2A697d472d1e8a0B1B188646c756d097b058

October Delegate Compensation

  • 0xDefensor - 41.67 MKR - 0x9542b441d65B6BF4dDdd3d4D2a66D8dCB9EE07a9
  • TRUE NAME - 41.67 MKR - 0x612F7924c367575a0Edf21333D96b15F1B345A5d
  • BONAPUBLICA - 41.67 MKR - 0x167c1a762B08D7e78dbF8f24e5C3f1Ab415021D3
  • Cloaky - 41.67 MKR - 0x869b6d5d8FA7f4FFdaCA4D23FFE0735c5eD1F818
  • Navigator - 40.33 MKR - 0x11406a9CC2e37425F15f920F494A51133ac93072
  • vigilant - 13.84 MKR - 0x2474937cB55500601BCCE9f4cb0A0A72Dc226F61
  • UPMaker - 13.89 MKR - 0xbB819DF169670DC71A16F58F55956FE642cc6BcD
  • PBG - 13.89 MKR - 0x8D4df847dB7FfE0B46AF084fE031F7691C6478c2
  • PALC - 13.44 MKR - 0x78Deac4F87BD8007b9cb56B8d53889ed5374e83A
  • BLUE - 12.97 MKR - 0xb6C09680D822F162449cdFB8248a7D3FC26Ec9Bf
  • JAG - 4.45 MKR - 0x58D1ec57E4294E4fe650D1CB12b96AE34349556f

Checksums

  • DAI - 2,200,000.00
  • MKR - 807.27

Development Stage

  • Office Hours

    • On (Collateral Onboarding, Keepers, Integrations, ...)
    • Matches Exec Doc
  • 30 days spell expiry in constructor (block.timestamp + 30 days)

  • Exec Doc Hash

  • Spell Description

    • Description follows the format TARGET_DATE MakerDAO Executive Spell | Hash: EXEC_DOC_HASH)
    • Target date in description matches the Exec Doc target date
    • Exec Doc Hash in description matches your locally generated Exec Doc Hash
    • Accompanying comment above spell description
      • Comment follows the format // Hash: cast keccak -- "$(wget 'EXEC_DOC_URL' -q -O - 2>/dev/null)"
      • Exec Doc URL in comment matches your Raw Exec Doc URL
        ⚠️ The PR merge commit is used in the spell whereas the last modifying commit is used here: the content keccak hash is the same!
      • Exec Doc URL in comment refers to the 'Community' GitHub repo
  • Ensure the comments inside the spell action are correct:

    • Every Section text from the Exec Sheet should be copied as comment to the spell code (above the code segment that implements the action)
      • is surrounded by the set of dashes (E.g. // ----- Section text -----)
    • Every Instruction text Exec Sheet should be:
      • copied to the spell code as // Instruction text
      • have newline above it
    • Every Reasoning URL and Authority URL from the Exec Sheet should be present under relevant section or instruction in the spell code (depending on which row the link is present)
      • Every Reasoning URL and Authority URL should 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/
    • If action in the spell doesn't have relevant instruction (e.g.: chainlog version bump), it should have explanation prefixed with // Note:
    • If an instruction can not be taken, it should have a comment under the instruction prefixed with // Note: (e.g.: // Note: Payments are skipped on goerli)
  • Local Environment Actions

    • Update Foundry by running foundryup
    • Reinstall libraries
      • Remove libraries by deleting the lib folder
      • Install libraries using 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 '4ad127cf53eeaddfb7b8ad56dd4b13e57d6a0067'
        Submodule 'lib/dss-interfaces' (https://github.com/makerdao/dss-interfaces) registered for path 'lib/dss-test/lib/dss-interfaces'
        Submodule 'lib/forge-std' (https://github.com/foundry-rs/forge-std) registered for path 'lib/dss-test/lib/forge-std'
        Submodule path 'lib/dss-test/lib/dss-interfaces': checked out '9bfd7afadd1f8c217ef05850b2555691786286cb'
        Submodule path 'lib/dss-test/lib/forge-std': checked out 'aea0b2685bebc883c09f5554d7fb481e85d0564d'
        Submodule path 'lib/dss-test/lib/forge-std/lib/ds-test': checked out 'cd98eff28324bfac652e63a239a60632a761790b'
        
    • Dependency checks
      • dss-exec-lib
        • if submodule upgrades are present make sure dss-exec-lib is synced as well
        • git submodule hash (run git submodule status) matches the latest release version or newer (NOTE: dss-exec-lib as installed locally will use GitHub code more recent than the 0.0.9 release)
      • dss-test
  • Interface Checks

    • dss-interfaces
      • used in the current spell
      • cleanup previous ones
      • ensure only single import layout is used (e.g. import "dss-interfaces/dss/VatAbstract.sol";)
    • Static Interfaces
      • ensure they match dss-interfaces (Where there is a mismatch, use cast interface as the source of truth)
      • check on-chain interface of deployed contract via cast interface <contract_address> to ensure correctness
      • interface naming style should match with Like suffix (e.g. VatLike), with some exceptions
      • ensure they only list used functions in spell code
  • Rate constants used are correct

    • Manual check 1: using make rates pct=<pct> (e.g. pct=0.75, for 0.75%)
    • Manual check 2: Compare against IPFS
    • Variable name conforms to X_PT_Y_Z_PCT_RATE (e.g. ZERO_PT_SEVEN_FIVE_PCT_RATE for 0.75%)
    • Variable visibility declared as internal
    • State mutability declared as constant
  • Constants Match

    • Precision unit constants used match their defined values
      • WAD = 10 ** 18
      • RAY = 10 ** 27
      • RAD = 10 ** 45
      • Variable visibility declared as internal
      • State mutability declared as constant
      • Ensure they match with ds-math and the Numerical Ranges
    • Math unit constants used match their defined values
      • ~~HUNDRED = 10 ** 2
      • ~~THOUSAND = 10 ** 3
      • MILLION = 10 ** 6
      • ~~BILLION = 10 ** 9
      • Variable visibility declared as internal
      • State mutability declared as constant
      • Ensure they match with config
    • Timestamp constants used are correct
      • Ensure the timestamp converts to the correct date
      • Variable naming matches MONTH_DD_YYYY (e.g. MAY_01_2023 for 2023-05-01)
      • Time of day makes logical sense (i.e. 23:59:59 for the final day of something, 00:00:00 for the first day of something) in the context of timestamp usage
      • Variable visibility declared as internal
      • State mutability declared as constant
  • Deployed Contracts (not yet on chainlog or new to chainlog)

    • Verified on etherscan
    • Optimizations match Repo
    • GNU AGPLv3 license
    • Constructor args ok (e.g. vat, dai, dog, ...)
    • Wards ok (pause proxy relied, deployer denied)
      • MCD_ESM is already relied / being relied in this spell (as approved by Governance Facilitators) in order to allow de-authing the pause proxy during Emergency Shutdown, via denyProxy.
    • Matches corresponding github source code (i.e. diffcheck via vscode code --diff etherscan.sol github.sol)
    • Ensure deployer address is included into addresses_deployers.sol (to keep up to date)
  • Core System Parameter Changes

  • Debt Ceiling Changes

  • Onboarding (insert relevant checklists inline here)

  • Offboarding (Lerp mat)

    • 1st Stage Spell Actions
      • ~~Remove Ilk from Autoline
      • ~~Set Ilks Debt Ceilings to 0
      • ~~Cache Ilks line to Reduce in the Global Debt Ceiling
      • ~~Decrease Global Debt Ceiling by Total Amount of Offboarded Ilks line Cached
    • 2nd Stage Spell Actions
      • Set Ilk Liquidation Penalty chop to 0
      • Set Keeper Incentive Flat Rate tip to 0
      • Check IF chip is required to be adjusted as well
      • Use DssExecLib.linearInterpolation
        • name Format matches "XXX-A Offboarding"
        • target matches spotter
        • ilk Format matches "XXX-A"
        • what matches mat
        • startTime matches block.timestamp
        • start matches Var CURRENT_XXX_A_MAT
        • end matches Var TARGET_XXX_A_MAT (Match Exec Doc & Risk Computations)
          • Check IF Target mat Covers All Remaining Vaults CR times Risk Multiplier Factor
        • duration matches Exec Doc
  • RWA Updates

    • doc (Using the _updateDoc helper or otherwise)
      • init the RwaLiquidationOracle to reset the doc
      • Sanity Check pip must be set (not the zero address)
      • ilk follows format "RWAXXX-A"
      • val price ignored (0) if init has already been called
      • doc new legal document (IPFS HASH) matches Exec Doc
      • tau parameter used is the old tau value
    • Debt Ceiling changes (line)
      • Autoline (line) + Liquidation Oracle Price Bump (val)
        • Enable Autoline
          • ilk follows format "RWAXXX-A"
          • line (max debt ceiling)
          • gap
          • ttl
      • Debt Ceiling (line) + Liquidation Oracle Price Bump (val)
        • Increase Ilk Debt Ceiling (set DC + increase Global DC)
      • bump RwaLiquidationOracle with new computed increased price (val)
        • ensure val is set accordingly with autoline max debt ceiling (line)
        • val should enable DAI to be drawn over the loan period while taking into account the configured ink amount, interest rate and liquidation ratio (see below)
          • New val is calculated with line * [(1 + duty) ** years] * mat - rounded up - and makes sense in context of the rate mechanism. Minimum duration is usually in the Exec Doc of the spell with the RWAXXX ilk onboarding.
          • Comment explaining val formula (Debt ceiling * [ (1 + RWA stability fee ) ^ (minimum deal duration in years) ] * liquidation ratio) is present
          • Accompanying comment above bump line in format // XXM * 1.XX^X * X.XX as a WAD corresponding to the val calculation formula (e.g. // 15M * 1.03^2 * 1.00 as a WAD) is present along with the calculation formula on the line above
          • IF combining val of multiple RWA ilks being combined, val calculation is done once per ilk and added to make the total, with workings provided in code comments. The existing val value can be retrieved by calling read() on PIP_RWAXX and converting the result into decimal.
      • Poke spotter to pull in the new price
    • Soft Liquidation (tell)
      • Call RwaLiquidationOracle.tell(ilk)
      • IF RWAXX_A_INPUT_CONDUIT is an instance of TinlakeMgr (it is a Centrifuge integration)
        • Call TinlakeMgr.tell() to prevent further TIN redemptions in the Centrifuge pool.
  • Payments

    • MKR transfers
      • Recipient addresses match Exec Doc
      • Transfer values match Exec Doc
        • All values are specified with at least 2 decimals
        • Sum of all values matches Exec Doc
      • Follows archive patterns
    • DAI Surplus Buffer transfers
      • Recipient addresses match Exec Doc
      • Transfer values match Exec Doc
        • All values are specified with 2 decimals
          ⚠️ Cannot be done for DAI
        • Sum of all values matches Exec Doc
      • Follows previous patterns
    • Create New MKR/DAI Streams (DssVest)
      • DssVestLike interface is correct
      • Check for all streams (MKR, DAI)
        • restrict is used for each stream unless otherwise stated in the Exec Doc
        • usr (Vest recipient address) matches Exec Doc
        • tot (Total stream amount) matches Exec Doc
          • Use ether to express decimal (non-integer) values of tot
          • Where vest amount is expressed in 'per year' or similar in the Exec Doc, account for leap days
        • bgn (Vest start timestamp) matches Exec Doc
        • tau (Vest total duration) matches Exec Doc
          • tau is expressed as 'bgn - fin' (i.e. MONTH_DD_YYYY - MONTH_DD_YYYY)
          • fin (Vest end timestamp) matches Exec Doc
        • eta (Vest cliff duration) matches Exec Doc
          • If the Exec Doc does not specify a cliff date (clf), eta is 0
          • clf (Cliff end timestamp) matches Exec Doc
          • If clf <= bgn, eta is 0
          • If clf > bgn
            • eta is expressed as 'clf - bgn' (i.e. MONTH_DD_YYYY - MONTH_DD_YYYY)
        • mgr (Vest manager address) matches Exec Doc
          • If the Exec Doc does not specify a manager address, mgr is address(0)
      • Max vesting rate (cap) check (MKR, DAI)
        • 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
          • Round new cap up with 2 significant figure precision (i.e. 2446 becomes 2500)
          • Notify Governance Facilitators for addition in Exec Doc AND Exec Sheet
          • Ensure that cap change is noted in the Exec Doc
          • New cap value matches Exec Doc
      • MKR Streams (DssVestTransferrable)
        • Increase vest contract's MKR allowance by the cumulative tot (total of new MKR vest amounts)
        • Ensure allowance increase follows archive patterns
    • Terminate Existing MKR/DAI Streams (Yank)
      • Yanked stream ID matches Exec Doc
      • Use MCD_VEST_MKR_TREASURY for MKR yank
      • Use MCD_VEST_DAI for DAI yank
    • Ensure Recipient Addresses match addresses_wallets.sol
  • SubDAO Content

    • SubDAO SubProxy spell execution
      • SubDAO spell address matches Exec Doc
      • 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
      • Executed using ProxyLike(SUBDAO_PROXY).exec(SUBDAO_SPELL, abi.encodeWithSignature("execute()"));
      • Execution is NOT delegate call
      • Reviewer Note: Gas cost may be very high as SubDAO spells execute within the main cast execution. (Also note that low level call gas estimation is not done by our scripts)
    • Maker Core (main spell) SubDAO actions (i.e. operate in 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 are verified (Blocking if not true)
      • Upgradable SubDAO contracts
        • Any 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 Doc and are correct. SubDAO addresses being authed or given any permissions MUST be in the Exec Doc. 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 Doc (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)
  • External Contracts Calls (Not SubDAOs, e.g. Starknet)

    • Target Contract don't block spell execution
    • External call is NOT delegate call
    • 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
  • ChainLog

    • Increment ChainLog version 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.++)
  • addresses_mainnet.sol matches spell code

  • Ensure every spell variable is declared as public/internal

  • Ensure immutable visibility is only used when fetching addresses from the ChainLog via DssExecLib.getChangelogAddress 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)
  • Spell actions match the corresponding Exec Doc

  • Tests

    • Ensure each spell action has sufficient test coverage

      • Spark Proxy-Spell
        testSparkSpellIsExecuted()
      • Adjust Spark Protocol D3M Maximum Debt Ceiling
        testGeneral()
      • Launch Project Funds Transfer
        testPayments()
        testMKRPayments()
      • Pass HVB Resolutions
        • Not tested, but checked manually
      • Whistleblower Bounty
        testMKRPayments()
      • October Delegate Compensation
        testMKRPayments()
      • Checksums
        testMKRPayments()
        testPayments()
    • Ensure every test function is declared as public if enabled or private if disabled

    • 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
      eac7218

    • Check all tests are passing locally using make test

      • Ensure that only ETH_RPC_URL is being used from env (i.e. no match, block or similar are active in your env)
./scripts/test-dssspell-forge.sh no-match="" match="" block=""
Using DssExecLib at: 0x8De6DDbCd5053d32292AAA0D2105A32d108484a6
[⠆] Compiling...
[⠔] Compiling 104 files with 0.8.16
[⠃] Solc 0.8.16 finished in 8.35s
Compiler run successful!

Running 2 tests for src/test/starknet.t.sol:StarknetTests
[PASS] testStarknet() (gas: 2741262)
[PASS] testStarknetSpell() (gas: 2346)
Test result: ok. 2 passed; 0 failed; 0 skipped; finished in 898.56s


Running 20 tests for src/DssSpell.t.sol:DssSpellTest
[PASS] testAuth() (gas: 9223371487106296465)
[PASS] testAuthInSources() (gas: 9223371487099537782)
[PASS] testBytecodeMatches() (gas: 2354824)
[PASS] testCastCost() (gas: 2589111)
[PASS] testChainlogValues() (gas: 11539777)
[PASS] testChainlogVersionBump() (gas: 6251944)
[PASS] testContractSize() (gas: 9028)
[PASS] testDeployCost() (gas: 2340536)
[PASS] testFailNotScheduled() (gas: 14375)
[PASS] testFailTooEarly() (gas: 13519)
[PASS] testFailTooLate() (gas: 13584)
[PASS] testFailWrongDay() (gas: 13629)
[PASS] testGeneral() (gas: 38087524)
[PASS] testMKRPayments() (gas: 2700698)
[PASS] testNextCastTime() (gas: 353614)
[PASS] testOnTime() (gas: 2584838)
[PASS] testPSMs() (gas: 3933390)
[PASS] testPayments() (gas: 2657626)
[PASS] testSparkSpellIsExecuted() (gas: 2588374)
[PASS] testUseEta() (gas: 352346)
Test result: ok. 20 passed; 0 failed; 0 skipped; finished in 2538.88s

Ran 2 test suites: 22 tests passed, 0 failed, 0 skipped (22 total tests)

@SidestreamSweatyPumpkin
Copy link
Contributor

Deployed Stage

Good to handover

  • Deployed Spell is Verified
    • Optimization Enabled: No
    • Other Settings: default evmVersion, GNU AGPLv3 license
  • Deployed Spell Code matches GitHub
    • diffcheck etherscan source against spell PR (via make diff-deployed-spell)
  • Deployed Spell Etherscan Checks
    • automated checks via make check-deployed-spell
      • verified
      • license type matches
      • solc version matches
      • optimizations are disabled
      • dss-exec-lib library address used (under 'Libraries Used') matches the hardcoded local DssExecLib.address file
        • Check again that the PR did not modify the DssExecLib.address file (e.g. look under the 'Files Changed' PR tab, etc.)
      • 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
      • 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)
  • Archive matches src
    • make diff-archive-spell for current date or or date="YYYY-MM-DD" make diff-archive-spell (date as per target Exec Doc date)
    • 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
      8c26e0e
    • Check all tests are passing locally using make test
      • Ensure that only ETH_RPC_URL is being used from env (i.e. no match, block or similar are active in your env)
./scripts/test-dssspell-forge.sh no-match="" match="" block=""
Using DssExecLib at: 0x8De6DDbCd5053d32292AAA0D2105A32d108484a6
[⠔] Compiling...
[⠆] Compiling 4 files with 0.8.16
[⠊] Solc 0.8.16 finished in 1.77s
Compiler run successful!

Running 2 tests for src/test/starknet.t.sol:StarknetTests
[PASS] testStarknet() (gas: 2741262)
[PASS] testStarknetSpell() (gas: 2346)
Test result: ok. 2 passed; 0 failed; 0 skipped; finished in 90.68s

Running 20 tests for src/DssSpell.t.sol:DssSpellTest
[PASS] testAuth() (gas: 9223371487106296465)
[PASS] testAuthInSources() (gas: 9223371487099537782)
[PASS] testBytecodeMatches() (gas: 2354824)
[PASS] testCastCost() (gas: 2589111)
[PASS] testChainlogValues() (gas: 11539777)
[PASS] testChainlogVersionBump() (gas: 6251944)
[PASS] testContractSize() (gas: 9028)
[PASS] testDeployCost() (gas: 2340536)
[PASS] testFailNotScheduled() (gas: 14375)
[PASS] testFailTooEarly() (gas: 13519)
[PASS] testFailTooLate() (gas: 13584)
[PASS] testFailWrongDay() (gas: 13629)
[PASS] testGeneral() (gas: 38089621)
[PASS] testMKRPayments() (gas: 2700698)
[PASS] testNextCastTime() (gas: 353614)
[PASS] testOnTime() (gas: 2584838)
[PASS] testPSMs() (gas: 3933390)
[PASS] testPayments() (gas: 2657396)
[PASS] testSparkSpellIsExecuted() (gas: 2588374)
[PASS] testUseEta() (gas: 352346)
Test result: ok. 20 passed; 0 failed; 0 skipped; finished in 976.66s

Ran 2 test suites: 22 tests passed, 0 failed, 0 skipped (22 total tests)`

@0xp3th1um
Copy link
Collaborator

Good to handover

Deployed Stage

  • Deployed Spell is Verified
    • Optimization Enabled: No
    • Other Settings: default evmVersion, GNU AGPLv3 license
  • Deployed Spell Code matches GitHub
    • diffcheck etherscan source against spell PR (via make diff-deployed-spell)
      • ⚠️ There is an expected difference as in previous spells becuse part of the DssExecLib code is replaced
  • Deployed Spell Etherscan Checks
    • automated checks via make check-deployed-spell
      • verified
      • license type matches
      • solc version matches
      • optimizations are disabled
      • dss-exec-lib library address used (under 'Libraries Used') matches the hardcoded local DssExecLib.address file
        • Check again that the PR did not modify the DssExecLib.address file (e.g. look under the 'Files Changed' PR tab, etc.)
      • deployed_spell_created matches deployment timestamp
        • ⚠️ The script gives a wrong result on Mac, checked manually below
      • deployed_spell_block matches deployment block number
        • ⚠️ The script gives a wrong result on Mac, checked manually below
    • manual checks
      • Ensure make deploy-info tx=<tx> matches config
        • deployed_spell_created timestamp
          • timestamp: 1700149271
        • deployed_spell_block block number
          • block: 18585407
      • Ensure Etherscan Libraries Used matches DssExecLib Latest Release
      • ℹ️ Step below skipped, there is a current mismatch as in previous spells
      • (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)
  • Archive matches src
    • make diff-archive-spell for current date or or date="YYYY-MM-DD" make diff-archive-spell (date as per target Exec Doc date)
    • 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
      8c26e0e
    • Check all tests are passing locally using make test
      • Ensure that only ETH_RPC_URL is being used from env (i.e. no match, block or similar are active in your env)
./scripts/test-dssspell-forge.sh no-match="" match="" block=""
Using DssExecLib at: 0x8De6DDbCd5053d32292AAA0D2105A32d108484a6
[⠘] Compiling...
[⠒] Compiling 4 files with 0.8.16
[⠢] Solc 0.8.16 finished in 5.29s
Compiler run successful!

Running 2 tests for src/test/starknet.t.sol:StarknetTests
[PASS] testStarknet() (gas: 2741262)
[PASS] testStarknetSpell() (gas: 2346)
Test result: ok. 2 passed; 0 failed; 0 skipped; finished in 78.14s


Running 20 tests for src/DssSpell.t.sol:DssSpellTest
[PASS] testAuth() (gas: 9223371487106296465)
[PASS] testAuthInSources() (gas: 9223371487099537782)
[PASS] testBytecodeMatches() (gas: 2354824)
[PASS] testCastCost() (gas: 2589111)
[PASS] testChainlogValues() (gas: 11539777)
[PASS] testChainlogVersionBump() (gas: 6251944)
[PASS] testContractSize() (gas: 9028)
[PASS] testDeployCost() (gas: 2340536)
[PASS] testFailNotScheduled() (gas: 14375)
[PASS] testFailTooEarly() (gas: 13519)
[PASS] testFailTooLate() (gas: 13584)
[PASS] testFailWrongDay() (gas: 13629)
[PASS] testGeneral() (gas: 38089621)
[PASS] testMKRPayments() (gas: 2700698)
[PASS] testNextCastTime() (gas: 353614)
[PASS] testOnTime() (gas: 2584838)
[PASS] testPSMs() (gas: 3933390)
[PASS] testPayments() (gas: 2656936)
[PASS] testSparkSpellIsExecuted() (gas: 2588374)
[PASS] testUseEta() (gas: 352346)
Test result: ok. 20 passed; 0 failed; 0 skipped; finished in 1297.57s

Ran 2 test suites: 22 tests passed, 0 failed, 0 skipped (22 total tests)

Copy link
Collaborator

@0xp3th1um 0xp3th1um left a comment

Choose a reason for hiding this comment

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

Ready to be merged!

Handover and Merge Stage

  • Check that the spell address posted by the crafter in new-spells is correct
    • Confirm the address in new-spells (via a thumbs up message reaction, )
  • Ensure that no commits or changes have occurred since the spell was deployed and archived
  • Approve spell PR for merge via 'Approve' review option

Copy link
Contributor

@SidestreamSweatyPumpkin SidestreamSweatyPumpkin left a comment

Choose a reason for hiding this comment

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

Handover and Merge Stage

  • Check that the spell address posted by the crafter in new-spells is correct
    • Confirm the address in new-spells (via a thumbs up message reaction, )
  • Ensure that no commits or changes have occurred since the spell was deployed and archived
  • Approve spell PR for merge via 'Approve' review option

@0xdecr1pto 0xdecr1pto merged commit 38d95e5 into master Nov 17, 2023
2 checks passed
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