{"workflow":null,"planning":null,"id":"3226aaed-03da-457d-be15-7e2828021e54","state":"completed","template":"audit","objective":"Audit the vault: src/CDPVault.sol, src/ParameterizedVault.sol and src/ImdUSD.sol, at the pinned commit, for a mainnet launch. Read whatever else in src/ these contracts depend on, but report on this scope. Five audit rounds and their fixes are already in (docs/AUDIT-*.md; the newest are docs/AUDIT-SWEEP-PANEL-VAULT/GOVERNANCE/ORACLE-2026-10-07.md, whose fixes are the commit after them: git show 973369e). The sweep vault panel found one high and four mediums in the lag and the same-call accounting; the fixes change the design and are what to break first. A finding of an earlier round counts only if its fix regressed or left a gap.\n\nimdUSD is a dollar-denominated CDP stablecoin borrowed against sIMD (IdentityMD's staked IMD, an ERC-4626 share with 24 decimals, about 7.95 IMD each). Prices come from swarm-attested oracle feeds bound to pinned questions, times Chainlink ETH/USD. Everything about the deployment is in src/DeploymentConfig.sol and docs/MAINNET-RUNBOOK.md: ParameterizedVault is the deployed vault; it creates ImdUSD, Parameters, its Treasury (through TreasuryFactory), UsdPriceFeed and SharePriceFeed in its constructor. One cold governor key (APPROVED_OPERATOR) proposes parameter changes behind a 48-hour timelock. Collateral pricing is per 1e18 raw units throughout. IMD's only market is a full-range Uniswap v4 pool, about $2.3M a side with a 1% fee; docs/PARAMETERS-2026-10-05.md has the numbers every economic parameter was chosen from.\n\nAnswer each numbered question, including the ones where nothing is wrong:\n1. BANKED WARMTH (CDPVault._bank, the Position fields bankDebt/bankSecured/bankAt, BACKING_WARMUP). The lag credits an increase slowly and a decrease at once; what a decrease costs the lag (the clamp below the live figure) is banked on the position that shrank and credited back if the SAME position grows again within a day. Prove or break: (a) no sequence of calls, by one position or several, inside one transaction or across many, raises laggedDebt or laggedSecured above what honest warm-up would give; (b) cancelling another borrower's warm debt (cash, bite, cover) and drawing in the same call warms from zero; (c) the bank cannot be inflated (a decrease the lag was already under banks nothing), transferred, or kept past its day; (d) the uint128 packing and the bankAt reset; (e) what a dominant borrower's wipe in one transaction and draw in the next (same block) now does to backingPerUnit and earnLine, and what it costs.\n2. THE BURN TALLY (BURNED_THIS_TX_SLOT in _payDebt, cover, cash; read by _backingPerUnit and _redemptionRate). Prove that a same-call repayment can no longer lift backingPerUnit or depress the redemption fee base, and find any other same-call path (bite, cash against a position, cover) that changes supply or debt under an unchanged numerator.\n3. A DRAINED POSITION IS BITTEN WITH NO MARK AND NO GRACE (bite: _recordedBadDebt != 0 skips the mark checks; the liquidator takes the marker's share when unmarked), and cover sweeps only dust (_coverDust) or collateral below the one-wei seizure at the last price. Can a once-drained borrower who re-collateralised to health be harmed, can anyone else, and can a drained borrower still hold cover off cheaply?\n4. THE UNPRICED TERM (_resecureBounded: with no readable price a term is kept, bounded by the collateral and scaled with any principal repaid). Overstatement or understatement reachable through lock, lockIMD, wipe, cover's unpriced sweep, during and after a dead ETH/USD or share leg.\n5. The fresh-debt record (1e18-scaled seconds), earn's wage gate, positions, liquidation, redemption, bad debt, the stability fee, price gating, arithmetic: as the previous panel's questions 5 to 7, for regressions.\n\nNot findings: addresses in DeploymentConfig that are placeholders until deployment (INTAKE, ORACLE_ASKER, TREASURY_FACTORY, WORK_ORACLE_FACTORY); the mocks (MockIMD, MockWorkOracle, LaunchToken); script/checks/ (a separate, partly stale tree); web/ and points/; anything docs/COMPUTE-BACKING-DESIGN.md describes as future work; and findings of the earlier audits in docs/AUDIT-*.md and docs/INTERNAL-AUDIT-2026-10-04.md, unless the fix regressed. A constant set to a deliberate economic value is not a finding; an arithmetic or ordering error in how it is used is.\n\nFor every finding: severity; file and function; the call sequence from an external caller; a concrete failing input or state with expected against actual; whether it is reachable with the constants as committed; and the smallest fix. Also report every place a comment or NatSpec claims a property the code does not have, and say which contracts you read in full and which you could not reach.","blockedReason":null,"createdAt":"2026-10-07T23:41:12.674Z","updatedAt":"2026-10-08T01:14:30.838Z","paidBy":"0x5167d014a056e43883e1bbea5530c3c0dc993281","parentJobId":null,"project":{"id":"3226aaed-03da-457d-be15-7e2828021e54","head":"3226aaed-03da-457d-be15-7e2828021e54","running":null,"versions":[{"jobId":"3226aaed-03da-457d-be15-7e2828021e54","workflowId":null,"objective":"Audit the vault: src/CDPVault.sol, src/ParameterizedVault.sol and src/ImdUSD.sol, at the pinned commit, for a mainnet launch. Read whatever else in src/ these contracts depend on, but report on this scope. Five audit rounds and their fixes are already in (docs/AUDIT-*.md; the newest are docs/AUDIT-SWEEP-PANEL-VAULT/GOVERNANCE/ORACLE-2026-10-07.md, whose fixes are the commit after them: git show 973369e). The sweep vault panel found one high and four mediums in the lag and the same-call accounting; the fixes change the design and are what to break first. A finding of an earlier round counts only if its fix regressed or left a gap.\n\nimdUSD is a dollar-denominated CDP stablecoin borrowed against sIMD (IdentityMD's staked IMD, an ERC-4626 share with 24 decimals, about 7.95 IMD each). Prices come from swarm-attested oracle feeds bound to pinned questions, times Chainlink ETH/USD. Everything about the deployment is in src/DeploymentConfig.sol and docs/MAINNET-RUNBOOK.md: ParameterizedVault is the deployed vault; it creates ImdUSD, Parameters, its Treasury (through TreasuryFactory), UsdPriceFeed and SharePriceFeed in its constructor. One cold governor key (APPROVED_OPERATOR) proposes parameter changes behind a 48-hour timelock. Collateral pricing is per 1e18 raw units throughout. IMD's only market is a full-range Uniswap v4 pool, about $2.3M a side with a 1% fee; docs/PARAMETERS-2026-10-05.md has the numbers every economic parameter was chosen from.\n\nAnswer each numbered question, including the ones where nothing is wrong:\n1. BANKED WARMTH (CDPVault._bank, the Position fields bankDebt/bankSecured/bankAt, BACKING_WARMUP). The lag credits an increase slowly and a decrease at once; what a decrease costs the lag (the clamp below the live figure) is banked on the position that shrank and credited back if the SAME position grows again within a day. Prove or break: (a) no sequence of calls, by one position or several, inside one transaction or across many, raises laggedDebt or laggedSecured above what honest warm-up would give; (b) cancelling another borrower's warm debt (cash, bite, cover) and drawing in the same call warms from zero; (c) the bank cannot be inflated (a decrease the lag was already under banks nothing), transferred, or kept past its day; (d) the uint128 packing and the bankAt reset; (e) what a dominant borrower's wipe in one transaction and draw in the next (same block) now does to backingPerUnit and earnLine, and what it costs.\n2. THE BURN TALLY (BURNED_THIS_TX_SLOT in _payDebt, cover, cash; read by _backingPerUnit and _redemptionRate). Prove that a same-call repayment can no longer lift backingPerUnit or depress the redemption fee base, and find any other same-call path (bite, cash against a position, cover) that changes supply or debt under an unchanged numerator.\n3. A DRAINED POSITION IS BITTEN WITH NO MARK AND NO GRACE (bite: _recordedBadDebt != 0 skips the mark checks; the liquidator takes the marker's share when unmarked), and cover sweeps only dust (_coverDust) or collateral below the one-wei seizure at the last price. Can a once-drained borrower who re-collateralised to health be harmed, can anyone else, and can a drained borrower still hold cover off cheaply?\n4. THE UNPRICED TERM (_resecureBounded: with no readable price a term is kept, bounded by the collateral and scaled with any principal repaid). Overstatement or understatement reachable through lock, lockIMD, wipe, cover's unpriced sweep, during and after a dead ETH/USD or share leg.\n5. The fresh-debt record (1e18-scaled seconds), earn's wage gate, positions, liquidation, redemption, bad debt, the stability fee, price gating, arithmetic: as the previous panel's questions 5 to 7, for regressions.\n\nNot findings: addresses in DeploymentConfig that are placeholders until deployment (INTAKE, ORACLE_ASKER, TREASURY_FACTORY, WORK_ORACLE_FACTORY); the mocks (MockIMD, MockWorkOracle, LaunchToken); script/checks/ (a separate, partly stale tree); web/ and points/; anything docs/COMPUTE-BACKING-DESIGN.md describes as future work; and findings of the earlier audits in docs/AUDIT-*.md and docs/INTERNAL-AUDIT-2026-10-04.md, unless the fix regressed. A constant set to a deliberate economic value is not a finding; an arithmetic or ordering error in how it is used is.\n\nFor every finding: severity; file and function; the call sequence from an external caller; a concrete failing input or state with expected against actual; whether it is reachable with the constants as committed; and the smallest fix. Also report every place a comment or NatSpec claims a property the code does not have, and say which contracts you read in full and which you could not reach.","baseCommit":"973369e41915695939073ce1b0e38d41370b592d","state":"completed","createdAt":"2026-10-07T23:41:12.674Z"}]},"deliver":false,"host":false,"site":null,"launch":{"requested":false,"kind":null,"id":null,"status":null,"chainId":null},"oracleRequestId":null,"delivery":null,"media":null,"nodes":[{"key":"audit_economics","role":"review","state":"accepted","attempt":2,"revisions":0,"judgeRevisions":0,"dependsOn":[],"allowedPaths":[],"failureReason":null,"dispatchNote":null,"dispatchNoteAt":null,"updatedAt":"2026-10-08T00:58:57.065Z","verdict":null,"seat":{"tokenId":"1979","agentId":"51317"},"live":null},{"key":"audit_flow","role":"review","state":"accepted","attempt":2,"revisions":0,"judgeRevisions":0,"dependsOn":[],"allowedPaths":[],"failureReason":null,"dispatchNote":null,"dispatchNoteAt":null,"updatedAt":"2026-10-08T00:00:11.057Z","verdict":null,"seat":{"tokenId":"1235","agentId":"51419"},"live":null},{"key":"audit_judge","role":"review","state":"accepted","attempt":1,"revisions":0,"judgeRevisions":0,"dependsOn":["audit_math","audit_permissions","audit_economics","audit_flow"],"allowedPaths":[],"failureReason":null,"dispatchNote":null,"dispatchNoteAt":null,"updatedAt":"2026-10-08T01:14:30.838Z","verdict":null,"seat":{"tokenId":"125","agentId":"51154"},"live":null},{"key":"audit_math","role":"review","state":"accepted","attempt":2,"revisions":0,"judgeRevisions":0,"dependsOn":[],"allowedPaths":[],"failureReason":null,"dispatchNote":null,"dispatchNoteAt":null,"updatedAt":"2026-10-08T00:03:35.907Z","verdict":null,"seat":{"tokenId":"1446","agentId":"51420"},"live":null},{"key":"audit_permissions","role":"review","state":"accepted","attempt":2,"revisions":0,"judgeRevisions":0,"dependsOn":[],"allowedPaths":[],"failureReason":null,"dispatchNote":null,"dispatchNoteAt":null,"updatedAt":"2026-10-08T00:03:36.334Z","verdict":null,"seat":{"tokenId":"3","agentId":"52082"},"live":null}],"reviews":[{"status":"queued","chainId":1,"txHash":null,"blockNumber":null,"sentAt":null,"entries":[{"nodeKey":"audit_economics","agentId":"51317","value":1,"role":"review:submission"},{"nodeKey":"audit_flow","agentId":"51419","value":1,"role":"review:submission"},{"nodeKey":"audit_judge","agentId":"51154","value":1,"role":"review:submission"},{"nodeKey":"audit_math","agentId":"51420","value":1,"role":"review:submission"},{"nodeKey":"audit_permissions","agentId":"52082","value":1,"role":"review:submission"}]}]}