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

2023-09-13 Executive Spell #365

Merged
merged 16 commits into from Sep 13, 2023
Merged

2023-09-13 Executive Spell #365

merged 16 commits into from Sep 13, 2023

Conversation

SidestreamSweatyPumpkin
Copy link
Contributor

@SidestreamSweatyPumpkin SidestreamSweatyPumpkin commented Sep 13, 2023

Description

This PR implements executive spell planned for 2023-09-13.

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 Mainnet changelog or known
  • Notify any external teams affected by the spell so they have the opportunity to review
  • Deploy spell to Mainnet ETH_GAS_LIMIT="XXX" ETH_GAS_PRICE="YYY" make deploy
  • Ensure contract is verified on Mainnet 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 and DssSpell.t.base.sol
  • squash and merge this PR

@DaiFoundation-DevOps
Copy link

DaiFoundation-DevOps commented Sep 13, 2023

CLA assistant check
All committers have signed the CLA.

@SidestreamSweatyPumpkin SidestreamSweatyPumpkin changed the title cleanup & add content 2023-09-13 Executive Spell Sep 13, 2023
Copy link
Contributor

@SidestreamColdMelon SidestreamColdMelon left a comment

Choose a reason for hiding this comment

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

Mainnet Executive Spell Review Checklist

Mainnet 2023-09-13

Spell Actions (Per Exec Doc):

  • Read spell actions and instructions from the Exec Doc
  • List the actions being performed in this spell
  • Stability Scope Parameter Changes
    • ETH-A Stability Fee will be increased by 0.12% from 3.58% to 3.70%
    • ETH-B Stability Fee will be increased by 0.12% from 4.08% to 4.20%
    • ETH-C Stability Fee will be increased by 0.12% from 3.33% to 3.45%
    • PSM-PAX-A Debt Ceiling Instant Access Module (DC-IAM) Activation
      • Maximum Debt Ceiling will be increased from zero DAI to 120 million DAI
      • Target Available Debt will be increased from zero DAI to 50 million DAI
      • Ceiling Increase Cooldown will be set to 24 hours
  • Spark Protocol Dai Direct Deposit Module (D3M) Parameter Changes
    • The Spark Protocol D3M (DIRECT-SPARK-DAI) Maximum Debt Ceiling will be increased from 200 million DAI to 400 million DAI
    • The Spark Protocol D3M (DIRECT-SPARK-DAI) Ceiling Increase Cooldown will be increased from 8 hours to 12 hours
  • Fortunafi (RWA005-A) Vault - Initiate Offboarding
    • vault Debt Ceiling will be decreased from 15 million DAI to zero DAI
  • DAO Resolution for HV Bank (RWA009-A) Vault
    • DAO Resolution with the IPFS hash QmXU2TwsRpVevGY74NVFbD9bKwtsw1mSuSce7My1zinD9m will be approved
  • Aligned Delegate Compensation for August 2023
    • 0xDefensor 0x9542b441d65B6BF4dDdd3d4D2a66D8dCB9EE07a9 41.67
    • TRUE NAME 0x612f7924c367575a0edf21333d96b15f1b345a5d 41.67
    • BONAPUBLICA 0x167c1a762B08D7e78dbF8f24e5C3f1Ab415021D3 41.67
    • vigilant 0x2474937cB55500601BCCE9f4cb0A0A72Dc226F61 41.67
    • Navigator 0x11406a9CC2e37425F15f920F494A51133ac93072 28.23
    • QGov 0xB0524D8707F76c681901b782372EbeD2d4bA28a6 20.16
    • UPMaker 0xbb819df169670dc71a16f58f55956fe642cc6bcd 13.89
    • PALC 0x78Deac4F87BD8007b9cb56B8d53889ed5374e83A 13.89
    • PBG 0x8D4df847dB7FfE0B46AF084fE031F7691C6478c2 13.89
    • Cloaky 0x869b6d5d8FA7f4FFdaCA4D23FFE0735c5eD1F818 7.17
    • WBC 0xeBcE83e491947aDB1396Ee7E55d3c81414fB0D47 6.72
    • BLUE 0xb6C09680D822F162449cdFB8248a7D3FC26Ec9Bf 1.25
  • Core Unit MKR Vesting Transfers
    • DECO-001 Core Unit [...] transfer of 125 MKR to the Core Unit's Auditor Wallet (0xF482D1031E5b172D42B2DAA1b6e5Cbf6519596f7)
    • SES-001 Core Unit [...] transfer of 34.94 MKR to the Core Unit's Auditor Wallet (0x87acdd9208f73bfc9207e1f6f0fde906bca95cc6)
  • Scuttle MCD_CAT Contract
    • Remove MCD_CAT from the Chainlog
    • Revoke MCD_CAT access to MCD_VAT: vat.deny(cat)
    • Yield ownership of MCD_CAT: cat.deny(pauseProxy)
  • Spark Protocol Proxy Spell
    • will be triggered at 0x95bcf659653d2E0b44851232d61F6F9d2e933fB1

Development Stage

  • Office Hours
    • ON
    • OFF
    • 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
  • 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-test': checked out '4ad127cf53eeaddfb7b8ad56dd4b13e57d6a0067'
        
    • 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-exec-lib is on 69b658f35d8618272cd139dfc18c5713caf6b96b, not the latest release
      • dss-test (hasn't changed)
  • 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. 11: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 GovAlpha) 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
    • Autoline (line) + Liquidation Oracle Price Bump (val)
      • Enable Autoline
        • ilk follows format "RWAXXX-A"
        • line (max debt ceiling)
        • gap
        • ttl
      • 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
    • 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)
        • 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
  • Payments
    • MKR transfers
      • Recipient addresses match Exec Doc
      • Transfer values match Exec Doc
      • Follows archive patterns
    • DAI Surplus Buffer transfers
      • Recipient Addresses match Exec Doc
      • Payment Amounts match 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)
          • TODO Calculate new cap value equal to 10% greater than the new maximum vesting rate
          • TODO Round new cap up with 2 significant figure precision (i.e. 2446 becomes 2500)
          • TODO Notify Governance Facilitators for addition in Exec Doc
          • 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
      • SubDAO spell deployer is a smart contract (e.g. multisig or factory)
        • Ensure the deployer address is in addresses_deployers.sol as an entry
      • SubDAO spell deployer is purely an EOA
        • Ensure the deployer address is in addresses_deployers.sol as a comment
      • 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
      List actions for which coverage was checked here
      • Stability Scope Parameter Changes are tested via config
      • Spark Protocol DC-IAM changes are tested via config
      • Aligned Delegate Compensation for August and Core Unit MKR Vesting Transfers are tested via testMKRPayments
      • Decrease Debt Ceiling for Fortunafi is tested via config
      • Trigger Spark Proxy Spell is tested via testSparkSpellIsExecuted (only execution of it, not changes)
      • Scuttle MCD_CAT is tested via testScuttleMcdCat
      • Changes to chainlog are tested via testRemoveChainlogValues
      • Approve HV Bank (RWA009-A) DAO Resolution is not tested (per archive pattern)
    • 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
      Insert most recent commit hash where CI was passing
      1101ac0
    • 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)

Insert your passing local tests here

./scripts/test-dssspell-forge.sh no-match="" match="" block=""
Using DssExecLib at: 0x8De6DDbCd5053d32292AAA0D2105A32d108484a6
[⠢] Compiling...
[⠢] Compiling 9 files with 0.8.16
[⠔] Solc 0.8.16 finished in 2.03s
Compiler run successful!

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

Running 22 tests for src/DssSpell.t.sol:DssSpellTest
[PASS] testAuth() (gas: 9223371487105890401)
[PASS] testAuthInSources() (gas: 9223371487099493823)
[PASS] testBytecodeMatches() (gas: 2756205)
[PASS] testCastCost() (gas: 1130653)
[PASS] testChainlogValues() (gas: 9990713)
[PASS] testChainlogVersionBump() (gas: 3767038)
[PASS] testContractSize() (gas: 8984)
[PASS] testDeployCost() (gas: 2740753)
[PASS] testFailNotScheduled() (gas: 14420)
[PASS] testFailTooEarly() (gas: 13607)
[PASS] testFailTooLate() (gas: 13562)
[PASS] testFailWrongDay() (gas: 13563)
[PASS] testGeneral() (gas: 36939683)
[PASS] testMKRPayments() (gas: 1248086)
[PASS] testNewChainlogValues() (gas: 1133880)
[PASS] testNextCastTime() (gas: 353637)
[PASS] testOnTime() (gas: 1126359)
[PASS] testPSMs() (gas: 2500968)
[PASS] testRemoveChainlogValues() (gas: 1132356)
[PASS] testScuttleMcdCat() (gas: 1144936)
[PASS] testSparkSpellIsExecuted() (gas: 1129895)
[PASS] testUseEta() (gas: 352324)
Test result: ok. 22 passed; 0 failed; 0 skipped; finished in 981.78s
 
Ran 2 test suites: 24 tests passed, 0 failed, 0 skipped (24 total tests)

src/DssSpell.sol Outdated Show resolved Hide resolved
src/DssSpell.sol Outdated Show resolved Hide resolved
src/DssSpell.sol Outdated Show resolved Hide resolved
src/DssSpell.sol Outdated Show resolved Hide resolved
src/DssSpell.sol Outdated Show resolved Hide resolved
src/DssSpell.sol Outdated Show resolved Hide resolved
src/DssSpell.t.sol Show resolved Hide resolved
src/DssSpell.t.sol Outdated Show resolved Hide resolved
src/DssSpell.sol Outdated Show resolved Hide resolved
src/DssSpell.sol Outdated Show resolved Hide resolved
src/DssSpell.sol Outdated Show resolved Hide resolved
src/DssSpell.t.sol Outdated Show resolved Hide resolved
src/DssSpell.t.sol Outdated Show resolved Hide resolved
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: All good, except for a few nitpicks.

Mainnet 2023-09-13

Spell Actions (Per Exec Doc)

  • Stability Scope Parameter Changes
    • Stability Fee Changes
      • Increase the ETH-A Stability Fee (SF) by 0.12% from 3.58% to 3.70%.
      • Increase the ETH-B Stability Fee (SF) by 0.12% from 4.08% to 4.20%.
      • Increase the ETH-C Stability Fee (SF) by 0.12% from 3.33% to 3.45%.
  • Activate DC-IAM for PSM-PAX-A
    • Maximum Debt Ceiling (line): 120M
    • Target Available Debt (gap): 50 million DAI
    • Ceiling Increase Cooldown (ttl): 24 hours
  • Spark Protocol DC-IAM Parameter Changes (main spell)
    • Increase the Maximum Debt Ceiling from 200 million DAI to 400 million DAI.
    • Increase the Ceiling Increase Cooldown from 8 hours to 12 hours.
  • Aligned Delegate Compensation for August
    • 0xDefensor - 41.67 - 0x9542b441d65B6BF4dDdd3d4D2a66D8dCB9EE07a9
    • TRUE NAME - 41.67 - 0x612f7924c367575a0edf21333d96b15f1b345a5d
    • BONAPUBLICA - 41.67 - 0x167c1a762B08D7e78dbF8f24e5C3f1Ab415021D3
    • vigilant - 41.67 - 0x2474937cB55500601BCCE9f4cb0A0A72Dc226F61
    • Navigator - 28.23 - 0x11406a9CC2e37425F15f920F494A51133ac93072
    • QGov - 20.16 - 0xB0524D8707F76c681901b782372EbeD2d4bA28a6
    • UPMaker - 13.89 - 0xbb819df169670dc71a16f58f55956fe642cc6bcd
    • PALC - 13.89 - 0x78Deac4F87BD8007b9cb56B8d53889ed5374e83A
    • PBG - 13.89 - 0x8D4df847dB7FfE0B46AF084fE031F7691C6478c2
    • Cloaky - 7.17 - 0x869b6d5d8FA7f4FFdaCA4D23FFE0735c5eD1F818
    • WBC - 6.72 - 0xeBcE83e491947aDB1396Ee7E55d3c81414fB0D47
    • BLUE - 1.25 - 0xb6c09680d822f162449cdfb8248a7d3fc26ec9bf
  • Decrease Debt Ceiling for Fortunafi (RWA005-A) to 0
    • Decrease Debt Ceiling from 15 million DAI to 0 (zero)
  • Approve HV Bank (RWA009-A) DAO Resolution
    • Approve DAO resolution hash QmXU2TwsRpVevGY74NVFbD9bKwtsw1mSuSce7My1zinD9m
  • Trigger Spark Proxy Spell
    • Goerli (will not be in doc) - 0x95bcf659653d2E0b44851232d61F6F9d2e933fB1
    • Mainnet - 0x95bcf659653d2E0b44851232d61F6F9d2e933fB1
  • Core Unit MKR Vesting Transfers
    • DECO-001 - 125 MKR - 0xF482D1031E5b172D42B2DAA1b6e5Cbf6519596f7
    • SES-001 - 34.94 MKR - 0x87acdd9208f73bfc9207e1f6f0fde906bca95cc6
  • Scuttle MCD_CAT
    • Remove MCD_CAT from the Chainlog
    • Revoke MCD_CAT access to MCD_VAT: vat.deny(cat)
    • Yield ownership of MCD_CAT: cat.deny(pauseProxy)

Development Stage

  • Office Hours
    • ON
    • OFF
    • 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
  • 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 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
      • 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. 11: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 GovAlpha) 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
    • Autoline (line) + Liquidation Oracle Price Bump (val)
      • Enable Autoline
        • ilk follows format "RWAXXX-A"
        • line (max debt ceiling)
        • gap
        • ttl
      • 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
    • 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)
        • 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
    • Debt Ceiling (line)
      • vat.ilk.line changes (per ilk)
      • vat.Line changes (Global Line)
  • Payments
    • MKR transfers
      • Recipient addresses match Exec Doc
      • Transfer values match Exec Doc
      • Follows archive patterns
    • DAI Surplus Buffer transfers
      • Recipient Addresses match Exec Doc
      • Payment Amounts match 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)
          • TODO Calculate new cap value equal to 10% greater than the new maximum vesting rate
          • TODO Round new cap up with 2 significant figure precision (i.e. 2446 becomes 2500)
          • TODO Notify Governance Facilitators for addition in Exec Doc
          • 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
      • SubDAO spell deployer is a smart contract (e.g. multisig or factory)
        • Ensure the deployer address is in addresses_deployers.sol as an entry
      • SubDAO spell deployer is purely an EOA
        • Ensure the deployer address is in addresses_deployers.sol as a comment
      • 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
      • Stability Fee Changes
        testGeneral
      • Activate DC-IAM for PSM-PAX-A
        testGeneral
      • Spark Protocol DC-IAM Parameter Changes (main spell)
        testGeneral
      • Aligned Delegate Compensation for August
        testMKRPayments
      • Decrease Debt Ceiling for Fortunafi (RWA005-A) to 0
        testGeneral
      • Approve HV Bank (RWA009-A) DAO Resolution
        ✅ Not applicable
      • Trigger Spark Proxy Spell
        testSparkSpellIsExecuted
      • Core Unit MKR Vesting Transfers
        testMKRPayments
      • Scuttle MCD_CAT
        testScuttleMcdCat
    • 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
      bfa19d1
    • 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)
Using DssExecLib at: 0x8De6DDbCd5053d32292AAA0D2105A32d108484a6
[] Compiling...
[] Compiling 9 files with 0.8.16
[] Solc 0.8.16 finished in 2.28s
Compiler run successful!

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

Running 22 tests for src/DssSpell.t.sol:DssSpellTest
[PASS] testAuth() (gas: 9223371487105890401)
[PASS] testAuthInSources() (gas: 9223371487099493823)
[PASS] testBytecodeMatches() (gas: 2756205)
[PASS] testCastCost() (gas: 1130193)
[PASS] testChainlogValues() (gas: 9990253)
[PASS] testChainlogVersionBump() (gas: 3766578)
[PASS] testContractSize() (gas: 8984)
[PASS] testDeployCost() (gas: 2740753)
[PASS] testFailNotScheduled() (gas: 14420)
[PASS] testFailTooEarly() (gas: 13607)
[PASS] testFailTooLate() (gas: 13562)
[PASS] testFailWrongDay() (gas: 13563)
[PASS] testGeneral() (gas: 36939223)
[PASS] testMKRPayments() (gas: 1247626)
[PASS] testNewChainlogValues() (gas: 1133420)
[PASS] testNextCastTime() (gas: 353637)
[PASS] testOnTime() (gas: 1125899)
[PASS] testPSMs() (gas: 2500508)
[PASS] testRemoveChainlogValues() (gas: 1131896)
[PASS] testScuttleMcdCat() (gas: 1144476)
[PASS] testSparkSpellIsExecuted() (gas: 1129435)
[PASS] testUseEta() (gas: 352324)
Test result: ok. 22 passed; 0 failed; 0 skipped; finished in 813.59s
 
Ran 2 test suites: 24 tests passed, 0 failed, 0 skipped (24 total tests)

Co-authored-by: amusingaxl <112016538+amusingaxl@users.noreply.github.com>
Co-authored-by: amusingaxl <112016538+amusingaxl@users.noreply.github.com>
Co-authored-by: amusingaxl <112016538+amusingaxl@users.noreply.github.com>
Co-authored-by: amusingaxl <112016538+amusingaxl@users.noreply.github.com>
Co-authored-by: amusingaxl <112016538+amusingaxl@users.noreply.github.com>
Co-authored-by: amusingaxl <112016538+amusingaxl@users.noreply.github.com>
Co-authored-by: amusingaxl <112016538+amusingaxl@users.noreply.github.com>
@SidestreamColdMelon
Copy link
Contributor

  • ✅ All changes requested from my side were addressed
  • ✅ The changes from my last review looks good
  • ✅ Spell content didn't change
  • ✅ Exec doc is still on ef20638
  • ✅ Local tests pass
./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.87s
Compiler run successful!

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

Running 22 tests for src/DssSpell.t.sol:DssSpellTest
[PASS] testAuth() (gas: 9223371487105890401)
[PASS] testAuthInSources() (gas: 9223371487099493823)
[PASS] testBytecodeMatches() (gas: 2756205)
[PASS] testCastCost() (gas: 1130538)
[PASS] testChainlogValues() (gas: 9990598)
[PASS] testChainlogVersionBump() (gas: 3766923)
[PASS] testContractSize() (gas: 8984)
[PASS] testDeployCost() (gas: 2740753)
[PASS] testFailNotScheduled() (gas: 14420)
[PASS] testFailTooEarly() (gas: 13607)
[PASS] testFailTooLate() (gas: 13562)
[PASS] testFailWrongDay() (gas: 13563)
[PASS] testGeneral() (gas: 36939568)
[PASS] testMKRPayments() (gas: 1247971)
[PASS] testNewChainlogValues() (gas: 1133765)
[PASS] testNextCastTime() (gas: 353637)
[PASS] testOnTime() (gas: 1126244)
[PASS] testPSMs() (gas: 2500853)
[PASS] testRemoveChainlogValues() (gas: 1132241)
[PASS] testScuttleMcdCat() (gas: 1144821)
[PASS] testSparkSpellIsExecuted() (gas: 1129780)
[PASS] testUseEta() (gas: 352324)
Test result: ok. 22 passed; 0 failed; 0 skipped; finished in 988.94s
 
Ran 2 test suites: 24 tests passed, 0 failed, 0 skipped (24 total tests)

Good to deploy 👍

@amusingaxl
Copy link
Contributor

  • Changes addressed
  • Local tests pass
Using DssExecLib at: 0x8De6DDbCd5053d32292AAA0D2105A32d108484a6
[] Compiling...
[] Compiling 4 files with 0.8.16
[] Solc 0.8.16 finished in 2.28s
Compiler run successful!

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

Running 22 tests for src/DssSpell.t.sol:DssSpellTest
[PASS] testAuth() (gas: 9223371487105890401)
[PASS] testAuthInSources() (gas: 9223371487099493823)
[PASS] testBytecodeMatches() (gas: 2756205)
[PASS] testCastCost() (gas: 1129503)
[PASS] testChainlogValues() (gas: 9989563)
[PASS] testChainlogVersionBump() (gas: 3765888)
[PASS] testContractSize() (gas: 8984)
[PASS] testDeployCost() (gas: 2740753)
[PASS] testFailNotScheduled() (gas: 14420)
[PASS] testFailTooEarly() (gas: 13607)
[PASS] testFailTooLate() (gas: 13562)
[PASS] testFailWrongDay() (gas: 13563)
[PASS] testGeneral() (gas: 36938533)
[PASS] testMKRPayments() (gas: 1246936)
[PASS] testNewChainlogValues() (gas: 1132730)
[PASS] testNextCastTime() (gas: 353637)
[PASS] testOnTime() (gas: 1125209)
[PASS] testPSMs() (gas: 2499818)
[PASS] testRemoveChainlogValues() (gas: 1131206)
[PASS] testScuttleMcdCat() (gas: 1143786)
[PASS] testSparkSpellIsExecuted() (gas: 1128745)
[PASS] testUseEta() (gas: 352324)
Test result: ok. 22 passed; 0 failed; 0 skipped; finished in 520.30s
 
Ran 2 test suites: 24 tests passed, 0 failed, 0 skipped (24 total tests)

Good to deploy :shipit:

@SidestreamSweatyPumpkin
Copy link
Contributor Author

@SidestreamColdMelon
Copy link
Contributor

Deployed Stage

  • Deployed Spell is Verified
    • Optimization Enabled: No
    • Other Settings: default evmVersion, GNU AGPLv3 license
      Note: london evmVersion
  • 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)
          ⚠️ Doesn't match, as in many previous spells (dss-exec-lib submodule is at 69b658f which is the latest commit in the dss-exec-lib repo, but the latest release is at c0d3c6c which is 7 commits behind)
  • 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
      Insert most recent commit hash where CI was passing
      8be2261
    • 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)

Insert your passing local tests here

./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.99s
Compiler run successful!

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

Running 22 tests for src/DssSpell.t.sol:DssSpellTest
[PASS] testAuth() (gas: 9223371487105890401)
[PASS] testAuthInSources() (gas: 9223371487099493823)
[PASS] testBytecodeMatches() (gas: 2756205)
[PASS] testCastCost() (gas: 1130365)
[PASS] testChainlogValues() (gas: 9990425)
[PASS] testChainlogVersionBump() (gas: 3766750)
[PASS] testContractSize() (gas: 8984)
[PASS] testDeployCost() (gas: 2740753)
[PASS] testFailNotScheduled() (gas: 14420)
[PASS] testFailTooEarly() (gas: 13607)
[PASS] testFailTooLate() (gas: 13562)
[PASS] testFailWrongDay() (gas: 13563)
[PASS] testGeneral() (gas: 36941492)
[PASS] testMKRPayments() (gas: 1247798)
[PASS] testNewChainlogValues() (gas: 1133592)
[PASS] testNextCastTime() (gas: 353637)
[PASS] testOnTime() (gas: 1126071)
[PASS] testPSMs() (gas: 2500680)
[PASS] testRemoveChainlogValues() (gas: 1132068)
[PASS] testScuttleMcdCat() (gas: 1144648)
[PASS] testSparkSpellIsExecuted() (gas: 1129607)
[PASS] testUseEta() (gas: 352324)
Test result: ok. 22 passed; 0 failed; 0 skipped; finished in 1004.48s
 
Ran 2 test suites: 24 tests passed, 0 failed, 0 skipped (24 total tests)

Good to handover 👍

@amusingaxl
Copy link
Contributor

amusingaxl commented Sep 13, 2023

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)
  • 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
      ./scripts/check-deployed-dssspell.sh
      [✔] DssSpell is verified.
      [✔] DssSpell was verified with a valid license.
      [✔] DssSpell solc version matches.
      [✔] DssSpell was not compiled with optimizations.
      [✔] DssSpell library matches hardcoded address in DssExecLib.address.
      [✔] DssSpell deployment timestamp matches.
      [✔] DssSpell deployment block number matches.
      
    • 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
      8be2261
    • 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)
Using DssExecLib at: 0x8De6DDbCd5053d32292AAA0D2105A32d108484a6
[] Compiling...
[] Compiling 104 files with 0.8.16
[] Solc 0.8.16 finished in 4.44s
Compiler run successful!

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

Running 22 tests for src/DssSpell.t.sol:DssSpellTest
[PASS] testAuth() (gas: 9223371487105890401)
[PASS] testAuthInSources() (gas: 9223371487099493823)
[PASS] testBytecodeMatches() (gas: 2756205)
[PASS] testCastCost() (gas: 1129560)
[PASS] testChainlogValues() (gas: 9989620)
[PASS] testChainlogVersionBump() (gas: 3765945)
[PASS] testContractSize() (gas: 8984)
[PASS] testDeployCost() (gas: 2740753)
[PASS] testFailNotScheduled() (gas: 14420)
[PASS] testFailTooEarly() (gas: 13607)
[PASS] testFailTooLate() (gas: 13562)
[PASS] testFailWrongDay() (gas: 13563)
[PASS] testGeneral() (gas: 36940687)
[PASS] testMKRPayments() (gas: 1246993)
[PASS] testNewChainlogValues() (gas: 1132787)
[PASS] testNextCastTime() (gas: 353637)
[PASS] testOnTime() (gas: 1125266)
[PASS] testPSMs() (gas: 2499875)
[PASS] testRemoveChainlogValues() (gas: 1131263)
[PASS] testScuttleMcdCat() (gas: 1143843)
[PASS] testSparkSpellIsExecuted() (gas: 1128802)
[PASS] testUseEta() (gas: 352324)
Test result: ok. 22 passed; 0 failed; 0 skipped; finished in 512.40s
 
Ran 2 test suites: 24 tests passed, 0 failed, 0 skipped (24 total tests)

Good to handover :shipit:

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.

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

@SidestreamColdMelon SidestreamColdMelon 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

Good to merge 👍

@SidestreamSweatyPumpkin SidestreamSweatyPumpkin merged commit 6c5a029 into master Sep 13, 2023
3 checks passed
@amusingaxl amusingaxl deleted the 2023-09-13 branch September 13, 2023 18:04
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.

None yet

4 participants