{"workflow":null,"planning":null,"id":"37ac5d94-da10-4a27-84d9-246c17a2c3f7","state":"completed","template":"audit","objective":"Adversarial review of the IMDO flywheel contracts at the given commit of github.com/ToknWrks/imdo (Foundry; Solidity 0.8.26, via_ir, bytecode_hash = \"none\"; vendored lib/ with Uniswap v4-core, v4-periphery, permit2, OpenZeppelin, solmate, forge-std). This tree is the accepted output of IMD swarm job 948f8b1b-a4bd-4689-a346-2536b218e486 (build, tests, manifest and four specialist reviews accepted; judge accepted with seven findings) plus two commits by the project that apply the judge's findings 1-3. Review the whole tree as it stands; weigh the two commits hardest.\n\nContracts (src/): IMDOToken (LaunchToken alias, fixed 1,000,000,000e18 supply, no owner), ImdoHook (Uniswap v4 hook on one ETH/IMDO pool: ETH-side fee 20% at the first filled swap decaying linearly over 30 minutes to 1.5%, owner can only lower; fees paid to the treasury inside the swap, or minted as ERC-6909 claims redeemable only to the treasury when the PoolManager lacks ETH), ImdoTreasury (no owner, no withdrawal; anyone calls process() at most every 600 s for a 50 bps bounty; the rest splits 1000/2500/2500/4000 bps to opsWallet, offsetsSafe, REGEN (held in staking, withdrawable by regenSafe never beyond what was notified) and an on-chain IMD buy on the ETH/IMD v4 pool fee 10000 spacing 200 pushed to staking; REGEN leg capped per 7-day epoch, 0.5 ETH default, settable by regenSafe within 0.05-5 ETH, overflow to IMD; IMD buy min-out = max(spot, checkpoint * 7d/(7d+age)) fee-adjusted minus 300 bps; after a buy the checkpoint is refreshed to clamp(postSwapSpot, floorNow, floorNow * 1.02) and CheckpointRefreshed is emitted; failed legs halve the retry cap), ImdoStaking (stake IMDO, 24-hour lock reset on every stake, pro-rata IMD rewards, lifetime REGEN credit in ETH that never decreases, stakeFor only by the immutable claim contract), ImdoClaim (identity.md seat holders and a Merkle holder list claim IMDO in daily tranches after launch; unclaimed burns to 0xdead after the deadline; launch_ >= block.timestamp enforced). script/DeployImdo.s.sol deploys all of it from one EOA with the claim address predicted from the deployer nonce and requires launch >= now + MIN_LAUNCH_LEAD (1 hour).\n\nThe two project commits to scrutinise: (1) src/ImdoTreasury.sol _refreshCheckpoint / _checkpointFloor / MAX_CHECKPOINT_RISE_BPS = 200 and test/unit/CheckpointRefresh.t.sol (the judge's sandwich proof plus an inflated-dust-buy case): is the clamp sound in both directions, can the floor still be ratcheted or pinned, does any honest market move now stall the IMD leg longer than the 7-day decay implies, does the choice of 200 bps leave a cheaper attack; (2) script/DeployImdo.s.sol MIN_LAUNCH_LEAD and test/unit/ImdoDeploy.t.sol: is the lead sufficient given that staking and claim are separate broadcast transactions. Also confirm the parent judge's informational findings 4-7 are still as described and whether any deserves a fix before mainnet.\n\nRules: read-only review; do not modify src/, script/, foundry.toml, lib/ or launch.json; scratch tests may be added under test/scratch/ only. Every finding needs severity, exact file:line, a concrete reproduction and, where possible, a Foundry proof that fails on this code. Run the default suite (101 tests) and forge fmt --check and report the result. Do not claim an audit; this is a review by the IMD swarm. Mainnet dependencies for fork tests: IMD 0xD34a99Bc0f67aE1bbd63C660e6d0b0dd03E263B7, PoolManager 0x000000000004444c5dc75cB358380D2e3dE08A90.","blockedReason":null,"createdAt":"2026-10-07T02:53:54.882Z","updatedAt":"2026-10-07T03:53:41.010Z","paidBy":"0x28aa88fb640ef295a41b2759fe240c5c7578c2db","parentJobId":null,"project":{"id":"37ac5d94-da10-4a27-84d9-246c17a2c3f7","head":"37ac5d94-da10-4a27-84d9-246c17a2c3f7","running":null,"versions":[{"jobId":"37ac5d94-da10-4a27-84d9-246c17a2c3f7","workflowId":null,"objective":"Adversarial review of the IMDO flywheel contracts at the given commit of github.com/ToknWrks/imdo (Foundry; Solidity 0.8.26, via_ir, bytecode_hash = \"none\"; vendored lib/ with Uniswap v4-core, v4-periphery, permit2, OpenZeppelin, solmate, forge-std). This tree is the accepted output of IMD swarm job 948f8b1b-a4bd-4689-a346-2536b218e486 (build, tests, manifest and four specialist reviews accepted; judge accepted with seven findings) plus two commits by the project that apply the judge's findings 1-3. Review the whole tree as it stands; weigh the two commits hardest.\n\nContracts (src/): IMDOToken (LaunchToken alias, fixed 1,000,000,000e18 supply, no owner), ImdoHook (Uniswap v4 hook on one ETH/IMDO pool: ETH-side fee 20% at the first filled swap decaying linearly over 30 minutes to 1.5%, owner can only lower; fees paid to the treasury inside the swap, or minted as ERC-6909 claims redeemable only to the treasury when the PoolManager lacks ETH), ImdoTreasury (no owner, no withdrawal; anyone calls process() at most every 600 s for a 50 bps bounty; the rest splits 1000/2500/2500/4000 bps to opsWallet, offsetsSafe, REGEN (held in staking, withdrawable by regenSafe never beyond what was notified) and an on-chain IMD buy on the ETH/IMD v4 pool fee 10000 spacing 200 pushed to staking; REGEN leg capped per 7-day epoch, 0.5 ETH default, settable by regenSafe within 0.05-5 ETH, overflow to IMD; IMD buy min-out = max(spot, checkpoint * 7d/(7d+age)) fee-adjusted minus 300 bps; after a buy the checkpoint is refreshed to clamp(postSwapSpot, floorNow, floorNow * 1.02) and CheckpointRefreshed is emitted; failed legs halve the retry cap), ImdoStaking (stake IMDO, 24-hour lock reset on every stake, pro-rata IMD rewards, lifetime REGEN credit in ETH that never decreases, stakeFor only by the immutable claim contract), ImdoClaim (identity.md seat holders and a Merkle holder list claim IMDO in daily tranches after launch; unclaimed burns to 0xdead after the deadline; launch_ >= block.timestamp enforced). script/DeployImdo.s.sol deploys all of it from one EOA with the claim address predicted from the deployer nonce and requires launch >= now + MIN_LAUNCH_LEAD (1 hour).\n\nThe two project commits to scrutinise: (1) src/ImdoTreasury.sol _refreshCheckpoint / _checkpointFloor / MAX_CHECKPOINT_RISE_BPS = 200 and test/unit/CheckpointRefresh.t.sol (the judge's sandwich proof plus an inflated-dust-buy case): is the clamp sound in both directions, can the floor still be ratcheted or pinned, does any honest market move now stall the IMD leg longer than the 7-day decay implies, does the choice of 200 bps leave a cheaper attack; (2) script/DeployImdo.s.sol MIN_LAUNCH_LEAD and test/unit/ImdoDeploy.t.sol: is the lead sufficient given that staking and claim are separate broadcast transactions. Also confirm the parent judge's informational findings 4-7 are still as described and whether any deserves a fix before mainnet.\n\nRules: read-only review; do not modify src/, script/, foundry.toml, lib/ or launch.json; scratch tests may be added under test/scratch/ only. Every finding needs severity, exact file:line, a concrete reproduction and, where possible, a Foundry proof that fails on this code. Run the default suite (101 tests) and forge fmt --check and report the result. Do not claim an audit; this is a review by the IMD swarm. Mainnet dependencies for fork tests: IMD 0xD34a99Bc0f67aE1bbd63C660e6d0b0dd03E263B7, PoolManager 0x000000000004444c5dc75cB358380D2e3dE08A90.","baseCommit":"d980fdd621007e27cd318881d9410a37657f8e83","state":"completed","createdAt":"2026-10-07T02:53:54.882Z"}]},"deliver":true,"host":false,"site":null,"launch":{"requested":false,"kind":null,"id":null,"status":null,"chainId":null},"oracleRequestId":null,"delivery":{"repoUrl":"https://github.com/Identity-md/research/blob/main/jobs/37ac5d94-da10-4a27-84d9-246c17a2c3f7/_identitymd/README.md","pullRequestUrl":null,"commit":"2dcb840e8c1a76a702512f1f24887bc67eb2a085","deliveredAt":"2026-10-07T03:53:56.989Z","media":null},"media":null,"nodes":[{"key":"audit_economics","role":"review","state":"accepted","attempt":1,"revisions":0,"judgeRevisions":0,"dependsOn":[],"allowedPaths":[],"failureReason":null,"dispatchNote":null,"dispatchNoteAt":null,"updatedAt":"2026-10-07T03:15:31.556Z","verdict":null,"seat":{"tokenId":"540","agentId":"51141"},"live":null},{"key":"audit_flow","role":"review","state":"accepted","attempt":1,"revisions":0,"judgeRevisions":0,"dependsOn":[],"allowedPaths":[],"failureReason":null,"dispatchNote":null,"dispatchNoteAt":null,"updatedAt":"2026-10-07T03:15:16.418Z","verdict":null,"seat":{"tokenId":"475","agentId":"51041"},"live":null},{"key":"audit_judge","role":"review","state":"accepted","attempt":2,"revisions":0,"judgeRevisions":0,"dependsOn":["audit_math","audit_permissions","audit_economics","audit_flow"],"allowedPaths":[],"failureReason":null,"dispatchNote":null,"dispatchNoteAt":null,"updatedAt":"2026-10-07T03:53:41.010Z","verdict":null,"seat":{"tokenId":"184","agentId":"52205"},"live":null},{"key":"audit_math","role":"review","state":"accepted","attempt":1,"revisions":0,"judgeRevisions":0,"dependsOn":[],"allowedPaths":[],"failureReason":null,"dispatchNote":null,"dispatchNoteAt":null,"updatedAt":"2026-10-07T03:34:50.431Z","verdict":null,"seat":{"tokenId":"1254","agentId":"51442"},"live":null},{"key":"audit_permissions","role":"review","state":"accepted","attempt":1,"revisions":0,"judgeRevisions":0,"dependsOn":[],"allowedPaths":[],"failureReason":null,"dispatchNote":null,"dispatchNoteAt":null,"updatedAt":"2026-10-07T03:34:04.556Z","verdict":null,"seat":{"tokenId":"660","agentId":"51070"},"live":null}],"reviews":[{"status":"sent","chainId":1,"txHash":"0x1a64dac963b7dfc4782ae9fba87693690d85211c0e88c58e3ac5d2c5687d874d","blockNumber":26137948,"sentAt":"2026-10-07T03:54:26.726Z","entries":[{"nodeKey":"audit_economics","agentId":"51141","value":1,"role":"review:submission"},{"nodeKey":"audit_flow","agentId":"51041","value":1,"role":"review:submission"},{"nodeKey":"audit_judge","agentId":"52205","value":1,"role":"review:submission"},{"nodeKey":"audit_math","agentId":"51442","value":1,"role":"review:submission"},{"nodeKey":"audit_permissions","agentId":"51070","value":1,"role":"review:submission"}]}]}