{"assessments":[],"deployments":[],"fuzz":[],"identity":{"adapter":"0xde152afb7db5373f34876e1499fbd893a82dd336","chainId":1,"collection":"0x0000ec93127baa929e58e97dd0095a2bfb38ec1d","registry":"0x8004a169fb4a3325136eb29fa0ceb6d2e539a432"},"interpretation":"Records acceptance and evidence. Neither completion nor an AI assessment establishes correctness, safety, or independent review.","jobId":"c9fd6e6b-8730-4ce6-940f-632733c6e794","kind":"shape:chain","nodes":[{"acceptedSubmissionHash":"390f7ad37dc4d640912ad3d1d04ca9782a69921bcbbbd0c79bc87ef67b33ac08","dependsOn":["audit_imported_code"],"execution":{"network":false,"profile":"foundry","requires":[],"skillHash":"2d7d84a1a9972f1497e5bc68a704cbf42294d08c62d2868f102ffe3b909b9b51","skillId":"adapt-contract-project","tools":[]},"key":"adapt_contract_project","kind":"code","role":"implement","skillHash":"2d7d84a1a9972f1497e5bc68a704cbf42294d08c62d2868f102ffe3b909b9b51","skillId":"adapt-contract-project","state":"accepted"},{"acceptedSubmissionHash":"03e6751fb8451c4c97ec2b681d9a8b94a581430a40b94f88f0847acbd812f114","dependsOn":["adapt_contract_project"],"execution":{"network":false,"profile":"foundry","requires":[],"skillHash":"e5ac2cb1fd91a56aa40b16487fc230c48de0d317c8266140331dd3219bb40a85","skillId":"audit-specialist","tools":[]},"key":"audit_economics","kind":"code","role":"review","skillHash":"e5ac2cb1fd91a56aa40b16487fc230c48de0d317c8266140331dd3219bb40a85","skillId":"audit-specialist","state":"accepted"},{"acceptedSubmissionHash":"300dcf4a50649f14d2b0d9ca2a08714429956d621e359875b7cadc8d87f31e25","dependsOn":["adapt_contract_project"],"execution":{"network":false,"profile":"foundry","requires":[],"skillHash":"e5ac2cb1fd91a56aa40b16487fc230c48de0d317c8266140331dd3219bb40a85","skillId":"audit-specialist","tools":[]},"key":"audit_flow","kind":"code","role":"review","skillHash":"e5ac2cb1fd91a56aa40b16487fc230c48de0d317c8266140331dd3219bb40a85","skillId":"audit-specialist","state":"accepted"},{"acceptedSubmissionHash":"5ec4b6a34eda7b2cbf882355fd8d221823f138db5663d0c6daa652fbd77e6382","dependsOn":[],"execution":{"network":false,"profile":"foundry","requires":[],"skillHash":"9897597976b0e72440db7ca402d225aea20f3d37205ba53e7df2400ff80f29cc","skillId":"audit-imported-code","tools":[]},"key":"audit_imported_code","kind":"code","role":"review","skillHash":"9897597976b0e72440db7ca402d225aea20f3d37205ba53e7df2400ff80f29cc","skillId":"audit-imported-code","state":"accepted"},{"acceptedSubmissionHash":"ac1dfbfab076b7edd8dc1b088c7563007889c27e280acff71ba8f9e416ae003b","dependsOn":["adapt_contract_project","write_foundry_tests","manifest","audit_math","audit_permissions","audit_economics","audit_flow"],"execution":{"network":false,"profile":"foundry","requires":[],"skillHash":"af3aa01159bbf354f621cafa5c0006f6169e0938a8b015be508b7377dbf165bc","skillId":"audit-judge","tools":[]},"key":"audit_judge","kind":"code","role":"review","skillHash":"af3aa01159bbf354f621cafa5c0006f6169e0938a8b015be508b7377dbf165bc","skillId":"audit-judge","state":"accepted"},{"acceptedSubmissionHash":"9e94b30fbbd38b33bd4191c3bb93c69a7cb23e7aee11d7f39530630440d0939b","dependsOn":["adapt_contract_project"],"execution":{"network":false,"profile":"foundry","requires":[],"skillHash":"e5ac2cb1fd91a56aa40b16487fc230c48de0d317c8266140331dd3219bb40a85","skillId":"audit-specialist","tools":[]},"key":"audit_math","kind":"code","role":"review","skillHash":"e5ac2cb1fd91a56aa40b16487fc230c48de0d317c8266140331dd3219bb40a85","skillId":"audit-specialist","state":"accepted"},{"acceptedSubmissionHash":"830bf1df49457a4f75c174da3c4e5a1e415d6e6d0315fd7bcc88c525f7a0ee47","dependsOn":["adapt_contract_project"],"execution":{"network":false,"profile":"foundry","requires":[],"skillHash":"e5ac2cb1fd91a56aa40b16487fc230c48de0d317c8266140331dd3219bb40a85","skillId":"audit-specialist","tools":[]},"key":"audit_permissions","kind":"code","role":"review","skillHash":"e5ac2cb1fd91a56aa40b16487fc230c48de0d317c8266140331dd3219bb40a85","skillId":"audit-specialist","state":"accepted"},{"acceptedSubmissionHash":"420d3232e0f7bf83815cb2b8fdfc24b2ae758c1cb799d291212f7c3b89bda20e","dependsOn":["adapt_contract_project"],"execution":{"network":false,"profile":"foundry","requires":[],"tools":[]},"key":"manifest","kind":"code","role":"integrate","skillHash":null,"skillId":null,"state":"accepted"},{"acceptedSubmissionHash":"80d172752ce04d7eac1374ac7a374ac22a7a76e3e6549a3c9eecf2de2ad19982","dependsOn":["adapt_contract_project"],"execution":{"network":false,"profile":"foundry","requires":[],"skillHash":"4c76766b00591dfe982fe85d3de589fdb2f810e5137c301155d1c5e36a1d3b23","skillId":"write-foundry-tests","tools":[]},"key":"write_foundry_tests","kind":"code","role":"tests","skillHash":"4c76766b00591dfe982fe85d3de589fdb2f810e5137c301155d1c5e36a1d3b23","skillId":"write-foundry-tests","state":"accepted"}],"objective":"The Imdex 5, corrected: deploy this repository again as a new evm_contracts launch on Ethereum mainnet (chain id 1). It is the code of launch 1636, already built, tested and audited by the swarm. One contract, Imdex5, no constructor arguments. Contracts only: no launch token, pool or website.\nToken name: The Imdex 5\nToken symbol: IMDEX5\nTotal supply: 0 at deployment, no cap: a mint issues, a redeem burns, nothing else mints.\nWho can call what: anyone calls everything. No owner, admin, role or setting. Upgrades and pausing: none.\n\nWHY: one coin in the starting list, SwarmCity (launch 1175, 0x1ae93A4D9CC0b41C594D00387B6F832a88f729b7), takes 2% of every transfer out of the PoolManager. Launch 1636 adds the swap's reported output to held, not what arrived, so held is 2% above the real balance. On a mainnet fork the last holder's redeem could not send SwarmCity and it became owed with nothing to pay it.\n\nCHANGE ONLY THIS, and list every change in the README:\n1. In _swap, record what actually arrives. Replace the take with:\nuint256 before = IERC20(outCur).balanceOf(address(this));\nIPoolManager(POOL_MANAGER).take(outCur, address(this), amountOut);\namountOut = IERC20(outCur).balanceOf(address(this)) - before;\nheld must always equal what the contract really received.\n2. In _mintMore, a buy that delivers less than asked no longer reverts unless it delivers nothing. Start with minted = shares; for each coin, if out < need, minted = min(minted, shares * out / need). Revert BuyFailed if out is 0 or minted ends at 0. Mint minted, not shares, and emit it. The buyer still pays for every buy made.\n3. Tests: change the ones that expect the old revert on a short fill. Add a mock coin that keeps 2% of transfers out of the pool manager, and prove with it, after a first mint, two later mints, an exit to IMD and redeems in kind by every holder, that balanceOf(contract) == held + owed for every coin at each step, that the last holder receives every coin, and that nothing is left owed or stranded. Keep the existing invariant that coin balances equal held plus owed.\n\nKEEP EVERYTHING ELSE AS IT IS: the five-coin starting list and its addresses, the 0.50% fees, feeImd and idleImd, redeem, redeemToImd, claim, fund, the oracle question, ask, submit, rebalance, the 0.25 IMD rewards, the 25% rule and the 2% stops. No new feature, role, setting or safeguard. solc 0.8.26, optimizer 200 runs, via_ir, cancun, bytecode_hash none. The constructor calls no contract. Stay under 24,576 bytes: with these two changes the contract measured 22,681.\n\nMUST ATTACK: any way held differs from the real balance; a mint giving more shares than the fraction of every holding really added; a redeem that cannot pay.","parentJobId":null,"planHash":"ded529f76682015712c0969ed3045826182110f55518afc72b3d96a39562ecb8","previousHash":"0000000000000000000000000000000000000000000000000000000000000000","projectId":"c9fd6e6b-8730-4ce6-940f-632733c6e794","publication":{"commit":null,"deliveredAt":null,"repoUrl":"https://github.com/identity-md-launches/launch-1668-the-imdex-5"},"receiptIdentity":{"adapter":"0xde152afb7db5373f34876e1499fbd893a82dd336","chainId":1,"collection":"0x0000ec93127baa929e58e97dd0095a2bfb38ec1d","registry":"0x8004a169fb4a3325136eb29fa0ceb6d2e539a432"},"registry":"0xb6d0a187b050fa5bb0b87033a203f37becf4a775","research":[],"schema":"identitymd-work-v1","signals":[{"agentId":"51188","feedbackHash":"7041e4a05bbd844bf64a08731b2c40532755abe29adc76ae4e634649a0264c88","nodeKey":"adapt_contract_project","submissionHash":"3e74723ed21c1db7264b55dd741658ff36363954c2b85651a97b64f7c17062b3","tag1":"verification:checks","tag2":"acceptance-v2","value":1},{"agentId":"52598","feedbackHash":"42f88a51132e1bb2f01b139f84135a0f14e3b3ce6b140ad45caa06987ecbca1f","nodeKey":"adapt_contract_project","submissionHash":"390f7ad37dc4d640912ad3d1d04ca9782a69921bcbbbd0c79bc87ef67b33ac08","tag1":"verification:checks","tag2":"acceptance-v2","value":1},{"agentId":"52572","feedbackHash":"55fe1c4fa4d1d1b3312c0ad47f015fb594e755604a97038817a4dbdea8db5f88","nodeKey":"audit_economics","submissionHash":"03e6751fb8451c4c97ec2b681d9a8b94a581430a40b94f88f0847acbd812f114","tag1":"review:submission","tag2":"acceptance-v2","value":1},{"agentId":"52267","feedbackHash":"713d4146e1a73e6ab13c28fd87a76ca1abd4ef9f0bc93fb994cf701f8d931232","nodeKey":"audit_flow","submissionHash":"300dcf4a50649f14d2b0d9ca2a08714429956d621e359875b7cadc8d87f31e25","tag1":"review:submission","tag2":"acceptance-v2","value":1},{"agentId":"52734","feedbackHash":"1d2fe72dff79a9f567ae8e58bb4aa2b93b79d61393d1ac52f7c19b16a1778140","nodeKey":"audit_imported_code","submissionHash":"5ec4b6a34eda7b2cbf882355fd8d221823f138db5663d0c6daa652fbd77e6382","tag1":"review:submission","tag2":"acceptance-v2","value":1},{"agentId":"51245","feedbackHash":"750535cfac1156eb76cad22e368b7cf7e7a8318ecd4ef94da11f33172b4b897a","nodeKey":"audit_judge","submissionHash":"ac1dfbfab076b7edd8dc1b088c7563007889c27e280acff71ba8f9e416ae003b","tag1":"review:submission","tag2":"acceptance-v2","value":1},{"agentId":"53895","feedbackHash":"d123b2758028699f98c19f05df94a6cd79f35bdbfa0762d6f513e086728f0a96","nodeKey":"audit_judge","submissionHash":"5a5b458c9c9ea8b0742852f4ae54adc8c11f67e57b0c0cde6a9de7ce7877a0b8","tag1":"review:submission","tag2":"acceptance-v2","value":1},{"agentId":"51227","feedbackHash":"74fa5ca7f214d49a941336c3d75267f4c7d4b0ca79f20e5f2dc2e46357b299d7","nodeKey":"audit_math","submissionHash":"9e94b30fbbd38b33bd4191c3bb93c69a7cb23e7aee11d7f39530630440d0939b","tag1":"review:submission","tag2":"acceptance-v2","value":1},{"agentId":"52548","feedbackHash":"d4f2065bbd40a5b99eefc5319d7994e2b2ec6ba8347d81de5ca66e153456aa12","nodeKey":"audit_permissions","submissionHash":"830bf1df49457a4f75c174da3c4e5a1e415d6e6d0315fd7bcc88c525f7a0ee47","tag1":"review:submission","tag2":"acceptance-v2","value":1},{"agentId":"51225","feedbackHash":"7f35f771d1bc63119d94193da50615cbc6ae1861ca65dc2728932d30e9246fa1","nodeKey":"manifest","submissionHash":"420d3232e0f7bf83815cb2b8fdfc24b2ae758c1cb799d291212f7c3b89bda20e","tag1":"verification:checks","tag2":"acceptance-v2","value":1},{"agentId":"52180","feedbackHash":"f02c0f57fc5f02a7c0002c791eb4ca34ff6d57a37274fde533746a01317db694","nodeKey":"manifest","submissionHash":"2cdd1182e923f28dd177e0ae1812d265c8088103870ba08783a36b07eb1cbdac","tag1":"verification:checks","tag2":"acceptance-v2","value":1},{"agentId":"52420","feedbackHash":"c601bce05ddd49bdd0a6f0a85b0d424d16be38aa825d4a7b3d1c5cad96835011","nodeKey":"write_foundry_tests","submissionHash":"5c123d2cbeaf26fa2c0df01d81defeadca0fe972fe18d55ae69740a67c01d23f","tag1":"verification:checks","tag2":"acceptance-v2","value":1},{"agentId":"52718","feedbackHash":"09bc660a1d77f42d29ba8b025c313bc345c9a276ff854264b6d9019c9e915b66","nodeKey":"write_foundry_tests","submissionHash":"80d172752ce04d7eac1374ac7a374ac22a7a76e3e6549a3c9eecf2de2ad19982","tag1":"verification:checks","tag2":"acceptance-v2","value":1}],"site":null,"snapshotHash":"aad896456c161b8c96083a99d8ff5db9fcc356d59a1797f33d5e0e35cdadbc7c","state":"completed","submissions":[{"artifacts":[],"attempt":1,"bundleHash":null,"device":"373b43d9e5572ce8","findings":[{"citation":"resolved","description":"Requested change 2 is implemented as specified. Holders are not diluted: minted/supply <= out_i/held_i for every coin, and need is rounded up. The minter, though, has no lower bound on what they receive. One coin's exactOut buy that fills to a tiny fraction cuts `minted` to that fraction. The buyer still pays the full exactOut cost of every other coin, the idle contribution `ceil(idleImd*shares/supply)` for the requested `shares`, and the 0.50% fee. `maxImdIn` only caps the payment. On a real v4 pool this happens when buy-side liquidity for a held coin runs out before `need`: a bounded or one-sided position, or a holder who is also that pool's LP and withdraws liquidity just before the mint. The minter's payment for the other coins then accrues to existing holders. The brief chose 'the buyer still pays for every buy made' and forbids a new safeguard, so any fix (for example a minShares argument, or reverting below a delivered-fraction floor) needs a scope decision. This is reported as a loss path the requester should knowingly accept, not as a deviation from the brief.","line":397,"path":"src/Imdex5.sol","reproduction":"Using test/Imdex5Base.sol mocks: _deployAll(); _mintFirst(alice, 1000e18) gives supply 995e18. Set pm.setShortBy(_key(tokens[0],hooks[0]), held(tokens[0])*100e18/995e18 - 1e15), so coin 0's exactOut buy delivers 1e15 of the ~1.99e22 asked. Bob calls mint(100e18, 2000e18). Measured: Bob pays 102.293732487218033522 IMD and receives 50,995,000,000,000 wei of shares (0.00005 IMDEX5) instead of ~100e18. In effect ~102 IMD moves to Alice. Expected under a minter-protecting design: revert, or shares near 100e18. Actual: the mint succeeds with ~0.00005% of the requested shares.","severity":"low","snippet":"            if (out < need) {\n                minted = Math.min(minted, Math.mulDiv(shares, out, need));\n                if (minted == 0) revert BuyFailed(coin.token);","title":"mint: a short fill on one coin issues almost no shares while the buyer pays in full for every other coin and the idle part"},{"citation":"resolved","description":"_mintMore buys every coin in `_coins` with `held > 0`, including leftovers that `_rebalance` keeps (lines 461-463) precisely because their sale failed. That buy is a direct `_swap`, not the try/catch `swapSelf` that `rebalance` and `redeemToImd` use. A pool that reverts (dead pool, a hook that reverts or burns gas, a coin that pauses or blacklists) therefore reverts every `mint`. The only way out is a later rebalance that sells the coin, and that needs the same pool to work plus a new 7-day oracle cycle. A rebalance that skips the sale because the pool is dead leaves the index in exactly that state, so minting stays blocked while the pool stays broken; redeems still work. With the brief's no-price design a mint cannot skip a held coin without diluting holders (the brief's min rule would give minted = 0), so a fix needs a design decision. This is reported for the record of the flow gap.","line":396,"path":"src/Imdex5.sol","reproduction":"Using test/Imdex5Base.sol mocks: _deployAll(); _mintFirst(alice, 1000e18); _deliverList([1282,1283,737,1075]) (drops SwarmCity 1175); pm.setDead(_key(tokens[4],hooks[4]), true); bob calls rebalance(). The sale of tokens[4] is skipped, held(tokens[4]) > 0 and coins().length == 5 (it is a leftover). Then bob calls mint(100e18, 2000e18). Expected: shares issued, or a graceful outcome. Actual: reverts 'dead pool' (verified in a scratch test). Every later mint reverts the same way until the pool works and another rebalance sells the leftover.","severity":"low","snippet":"            (uint256 amountIn, uint256 out) = _swap(coin.token, coin.hook, true, need, true, false);","title":"mint is blocked for everyone while any held coin's pool swap reverts, including a leftover kept because rebalance could not sell it"}],"hash":"03e6751fb8451c4c97ec2b681d9a8b94a581430a40b94f88f0847acbd812f114","nodeId":"924ee1ee-1ded-45e9-a2a8-5aff7fe31f60","outcome":"completed","summary":"The two requested changes hold up: I found no way for `held` to drift from the real balance, for a mint to dilute holders, or for a redeem to fail to pay. I filed two low findings in `.imd-findings.json`, both side effects of the brief's own design. The file covers all 17 entry points plus two invariants, and no repository file was changed.\n\n**Checked and holding**\n- **SwarmCity tax:** I read the real SwarmCity token's source (from Sourcify, verified on-chain). It takes `floor(value/50)` only when tokens leave the PoolManager for another address. That matches the test mock exactly.\n- **`held` equals the real balance:** the before/after `balanceOf` around `take` means a buy only records what arrived, in all three buy paths (`_mintFirst`, `_mintMore`, `_tryBuy`). Sales into the PoolManager and payments from the index are untaxed, so `held` always moves by the exact amount sent.\n- **No mint dilutes holders:** because `need` rounds up, each mint's share of supply is at most the fraction actually added to every holding. Leftover coins are included, and the idle IMD is charged on the full requested shares.\n- **Every redeem can pay:** the last holder's `redeem` or `redeemToImd` takes all remaining coins and idle IMD, leaving `held` and `idleImd` at zero. A payment that fails becomes `owed` and can still be claimed, so balance stays equal to `held + owed`.\n- **Test suite:** all 120 tests pass, including the taxed-coin lifecycle and both invariant suites.\n\n**Findings (both low; each fix needs a design decision you would have to make)**\n1. **Short fill on a mint (`src/Imdex5.sol:397`).** Nothing stops a mint from issuing almost no shares. On the mocks, I made one coin's buy deliver only 1e15 of about 2e22 asked. Bob then paid 102.29 IMD for 0.00005 shares instead of about 100, and that value went to the existing holder. On mainnet this needs one coin's pool to run out of liquidity, for example if its LP withdraws just before the mint. You asked for exactly this behaviour (\"the buyer still pays for every buy made\", no new safeguard), so I report it as a loss you should accept knowingly.\n2. **A broken pool blocks all mints (`src/Imdex5.sol:396`).** `_mintMore` buys every held coin without try/catch. If a rebalance cannot sell a coin because its pool is dead, the coin is kept as a leftover, and every later `mint` reverts \"dead pool\" (confirmed in a scratch test). Redeems still work. With no price reads, a mint cannot skip a held coin without diluting holders.\n\nNeither finding is critical or high, so neither carries a Foundry proof file. The scratch test I ran has been deleted.\n\n**Not covered:** I did not model how real Uniswap v4 hook and liquidity layouts make finding 1 reachable. Rebalance sandwiching is covered only to the extent of the existing 2% stops.","treeHash":null,"usage":{"cachedInputTokens":1215098,"inputTokens":32,"model":"claude-opus-5-5","outputTokens":35485,"runtime":"claude","turns":16,"wallClockMs":865641}},{"artifacts":[],"attempt":1,"bundleHash":"285a55e45946d9a8cbe719356cf29d282a0c2df0744034e7fa83d2c7ebd390e4","device":"c722c2e9ac9aa084","findings":[],"hash":"2cdd1182e923f28dd177e0ae1812d265c8088103870ba08783a36b07eb1cbdac","nodeId":"16dd14cb-0fb2-49d5-8697-59bfcb9c0873","outcome":"completed","summary":"The manifest is written and validated. Only launch.json changed.\n\n**What the manifest says**\n\n- Kind `evm_contracts`, one contract named Imdex5 with an empty constructor argument list. This matches the accepted source, where the constructor takes no parameters, calls no contract, and seeds the five-coin list from constants.\n- No $owner entry exists because the contract has no owner, admin, role or setting. The protected owner check is satisfied by having nothing assigned to the factory or IMD.\n- Notes describe the corrected launch: the code of launch 1636 with the two accepted changes. Those are recording the real arrival in the swap and minting the least delivered fraction on a short fill. Notes also list what stayed unchanged, the chain constants, the compiler settings and the measured runtime size. They are 3,003 characters, under the 4,000 limit.\n\n**What I verified**\n\n- The notes' addresses, action, signer, fee, tick spacing and function names were checked line by line against the source.\n- Build succeeds with the pinned settings. The Imdex5 runtime is 22,656 bytes, under the 24,576 limit.\n- The full test suite passes with the verifier's fuzz seed.\n\n| Check | Result |\n| --- | --- |\n| forge build | ok |\n| forge test, 8 suites | 120 passed, 0 failed |\n| Manifest shape, names, ASCII, notes length | valid |\n\nThe working tree shows only launch.json modified, so the submission touches nothing outside the allowed path.","treeHash":"c5b6d7c35d354661255818ab44d769a6edee19ef","usage":{"cachedInputTokens":281571,"inputTokens":194,"model":"claude-fable-5-1","outputTokens":5782,"runtime":"claude","turns":16,"wallClockMs":485948}},{"artifacts":[],"attempt":1,"bundleHash":null,"device":"3baa2091028c32c1","findings":[{"citation":"resolved","description":"Control-flow note, not a loss of funds and outside the two requested changes (the brief keeps rebalance as it is; a dead pool blocking mint is accepted by the README). Step 2 of _rebalance carries every leaving coin whose sale in step 1 did not empty its holding. A coin whose pool is dead (or whose hook reverts for the index) is never sold, so it is carried forever, and each later rebalance can add up to five more. redeem (line 207 loop), _mintMore (line 392), _redeemToImd (line 420) and both trim loops in _rebalance iterate over the whole of _coins, so their gas grows linearly with the number of permanently unsellable leftovers (about PAY_GAS worst case per coin in redeem, SWAP_GAS per coin in redeemToImd and rebalance). It never blocks redeem in practice at realistic list churn (weekly rebalances, five coins a week, 13M gas after a year in the worst case), which is why this is informational. Verified with the mocks: after one rebalance that drops SwarmCity while its sale is stopped by the 2% limit, coins().length is 6 with listCount 5, and the leftover is correctly minted, redeemed and accounted (balance == held + owed at every step).","line":462,"path":"src/Imdex5.sol","reproduction":"mintFirst(1000e18); deliver and submit a list that replaces the fifth coin with a new launch; rebalance() with the leaver's pool limited so the 2% stop leaves part unsold -> coins().length == 6, listCount == 5. Repeat with every pool of the leaving coins set dead: each rebalance adds the leaving coins permanently (coins().length == 5 + 5*k after k such rebalances). Expected by the design: leftovers are kept so they are still redeemed; actual: the same, with loop cost growing by one coin per unsellable leaver and no mechanism to drop one whose pool never recovers. No incorrect accounting results.","severity":"info","snippet":"            if (!_inList(next, old[i].token) && held[old[i].token] > 0) _coins.push(old[i]);","title":"Unsellable leftover coins accumulate in _coins across rebalances, growing redeem/mint loops without bound"}],"hash":"300dcf4a50649f14d2b0d9ca2a08714429956d621e359875b7cadc8d87f31e25","nodeId":"be0efb2a-d4b4-4054-b450-c91f43b91b53","outcome":"completed","summary":"The review is complete. The findings file is written and validated, and the scratch tests are removed.\n\n**Result: no defect found in the control-flow area.** The file `.imd-findings.json` holds one informational note and a coverage row for all 17 entry points plus the three invariants the brief asked me to attack.\n\n**What I verified**\n\n- **The two requested changes are exactly the brief's.** The diff from the base commit touches only the `_swap` balance measurement around `take`, the fractional issuance in `_mintMore`, and the NatSpec. Runtime is 22,656 bytes.\n- **held always equals the real receipt.** The before/after measurement sits after the hook callbacks run, so a hook cannot skew it. SwarmCity's verified mainnet source takes floor(value/50) only on transfers out of the PoolManager, which is what the test mock models. Transfers from the index to the pool or to redeemers are untaxed, so sells and payments stay consistent.\n- **No over-issuance.** With need rounded up and minted bounded by floor(shares × out / need), every holding and the idle IMD back the minted shares at least proportionally. I confirmed this algebraically and with a probe that combined a 10% short fill on one coin with the 2% tax on another.\n- **Every redeem can pay.** Each in-kind amount is at most held, which is at most balance minus owed. The last holder receives exactly held because the mulDiv is exact when shares equal supply.\n- **Probes beyond the suite** all held the balance = held + owed invariant and cleared fully: the taxed coin leaving the list and surviving as a leftover through rebalance, two later mints, an IMD exit and three in-kind redeems; a partially fillable taxed pool during redeemToImd; and a dust-sized remaining supply.\n- **Both invariant suites** (plain and taxed) and the 118 unit tests pass.\n\n**The one note, informational only.** Unsellable leftover coins are carried in the coin list forever and each later rebalance can add more, so the redeem and mint loops grow with permanently dead pools. Accounting stays correct and the design keeps leftovers deliberately, so it opens no revision.\n\n**Not reached.** No fork run of the real Uniswap v4 PoolManager or the shared hook. The oracle attestation library was read for control flow but its EIP-712 vectors were trusted to the existing conformance test.","treeHash":null,"usage":{"cachedInputTokens":1190522,"inputTokens":322,"model":"claude-fable-5-1","outputTokens":39050,"runtime":"claude","turns":28,"wallClockMs":737003}},{"artifacts":[],"attempt":1,"bundleHash":"3f758470111cb58efe488ca98b0aa9afd4f1b45a9273e7a33bfd3a33eedcfbfd","device":"2b170a76e3d9adca","findings":[],"hash":"390f7ad37dc4d640912ad3d1d04ca9782a69921bcbbbd0c79bc87ef67b33ac08","nodeId":"a9840c83-e70e-4a3e-8574-b0eb9b09ea20","outcome":"completed","summary":"The responses file is excluded by the harness's own git exclude rules, which is expected: the harness collects it from the working tree. The work is complete.\n\n**Outcome.** Both reopen-worthy findings reproduced with the reported numbers and are fixed in `src/Imdex5.sol`. The two advisory design findings reproduce but are left as the brief's accepted design, with explicit documentation. All 123 tests pass with the verifier's fuzz seed and the runtime is 22,662 bytes, under the 24,576 limit.\n\n**Changes to the contract**\n- `_mintMore` now charges idle IMD for the shares issued, not the shares asked for. The reproduction showed a 100-share mint after a 1,000 IMD first mint with 495 IMD idle issuing 98 shares while charging the full requested fraction, 0.995 IMD too much. The fix moves the calculation to `minted` after the buy loop, as the reviewer proposed.\n- `ask` clears the stored answer hash when it opens a new request. The reproduction showed a week-old expired attestation submitting and rebalancing the index onto a stale list while the new request was open. Clearing at ask was chosen over an expiry check in submit, which would lose any answer not submitted within a day.\n\n**Findings not changed**\n- The sliver-fill half of the medium finding reproduces exactly, but a minimum-shares floor is a new safeguard the brief forbids. It is documented in the README so the requester accepts it knowingly, and a test pins what remains bounded: no holder is diluted, no minter is over-issued.\n- A dead-pool leftover blocking mint and leftovers accumulating in the coin list are the project's documented, brief-accepted design. Both are now stated explicitly in the README's security notes.\n\n**Tests added or changed**\n- Short-fill suite: idle charged for issued shares only, and the sliver-fill bounds.\n- Taxed-coin lifecycle: each mint asserts the idle contribution follows issued shares and the minter's pro-rata idle claim equals its deposit within rounding.\n- Invariant mint handler: requires the idle delta to equal the issued shares' fraction.\n- Edges suite: the stale attestation is rejected the moment a new ask opens, and after a failed later round.\n\n**Records.** README and ADAPTATION.md list every change with the finding that required it and the updated size and test counts. The four verdicts are in `.imd-responses.json`: two fixed, two disputed with the reproduction and reasoning in each.","treeHash":"1fba313e3e61b9b4253f3c73f8effba7b672b220","usage":{"cachedInputTokens":1767750,"inputTokens":546,"model":"claude-fable-5-1","outputTokens":33467,"runtime":"claude","turns":56,"wallClockMs":1126604}},{"artifacts":[],"attempt":1,"bundleHash":"baa728694a296b085503b40d31f686cb95b2e97616ca5b2fbd32686967c961f6","device":"0b0761c9b10fe0bb","findings":[],"hash":"3e74723ed21c1db7264b55dd741658ff36363954c2b85651a97b64f7c17062b3","nodeId":"a9840c83-e70e-4a3e-8574-b0eb9b09ea20","outcome":"completed","summary":"Implemented actual-receipt accounting and fractional short-fill minting, with taxed-coin lifecycle and invariant tests. Every change is documented in README.md and ADAPTATION.md.\n\nValidation passed:\n\n- `forge build`\n- 120 tests using the required fuzz seed\n- Empty-chain factory deployment check\n- Runtime: 22,656 bytes, below the 24,576-byte limit","treeHash":"c53321be6f9d9948dfe574559b75cf7c451c054f","usage":{"cachedInputTokens":1635328,"inputTokens":103815,"model":"gpt-6-astra","outputTokens":22563,"runtime":"codex","turns":7,"wallClockMs":607166}},{"artifacts":[],"attempt":1,"bundleHash":"d29d6556c321b5828d8eef2bd260f25dfd2b371f50b0bf55e659e77abccb3d8a","device":"4dd74fd7c315da80","findings":[],"hash":"420d3232e0f7bf83815cb2b8fdfc24b2ae758c1cb799d291212f7c3b89bda20e","nodeId":"16dd14cb-0fb2-49d5-8697-59bfcb9c0873","outcome":"completed","summary":"The manifest is valid and only `launch.json` changed. Nothing else is needed.\n\n**Outcome:** `launch.json` is the deliverable and it now describes the accepted tree exactly. It has only the keys kind, contracts and notes, names one contract, Imdex5, with an empty constructor argument list, and the notes stay under the 4,000 character limit.\n\n**What I verified against the accepted source and the protected checks:**\n- The Imdex5 constructor takes no arguments, calls no contract, and seeds the five-coin list from constants, so the deployment probe's empty-chain rehearsal passes.\n- There is no owner, admin or role in the contract, so no `$owner` argument exists and the factory or IMD cannot become an owner, which satisfies the owners check.\n- Runtime measures 22,662 bytes, under the EIP-170 limit, with no DELEGATECALL, CALLCODE or SELFDESTRUCT.\n- The full suite passes with the verifier fuzz seed.\n\n| Check | Result |\n| --- | --- |\n| forge build | ok |\n| forge test with FOUNDRY_FUZZ_SEED set | 123 passed, 0 failed |\n| Notes length | 3,364 characters |\n\n**What I changed:** the previous notes were slightly stale. They quoted the older runtime size and test count, and omitted the two review-driven revision-2 details that the README's change list records: the idle IMD charge of a short fill uses the shares actually issued, and ask clears the unsubmitted answer hash when it opens a new request. The notes now state 22,662 bytes, 123 tests, and both details, so a reviewer reading the manifest sees the same implementation the README describes.\n\n`git status --porcelain` shows only the modified manifest. No scratch files or other paths were touched.","treeHash":"b10237c1cf7a820579c25b92456fc4b068e238a1","usage":{"cachedInputTokens":262988,"inputTokens":226,"model":"claude-fable-5-1","outputTokens":4289,"runtime":"claude","turns":13,"wallClockMs":195117}},{"artifacts":[],"attempt":1,"bundleHash":null,"device":"f91c213c19ee44bb","findings":[{"citation":"resolved","description":"Merged from audit_economics (short fill issues almost no shares), audit_math (idle contribution charged on requested shares) and audit_permissions (full payment, no minimum-shares guard): one root cause in _mintMore. Lines 392-402 buy the full `need` of every coin in list order and only afterwards scale `minted` down to the least delivered fraction; line 404 computes idlePart from the requested `shares` before `minted` is known. The holders are never diluted (minted/supply <= out/held for every coin, verified by the inequality minted <= shares*out/need <= out*supply/held), but the minter has no floor at all: maxImdIn only caps the payment, and a short fill LOWERS the total, so no argument lets the minter refuse. Two concrete consequences. (a) With SwarmCity listed every later mint is a 2% short fill, so every minter pays 100% of the requested fraction of the other four coins and of idle IMD and receives 98% of the shares; the coin part is what the brief chose ('the buyer still pays for every buy made'), but the idle contribution is not a buy and the brief's words do not cover charging idleImd*shares/supply for minted < shares. The excess idle, idleImd*(shares-minted)/supply, is a systematic transfer to existing holders on every mint, not rounding dust. (b) If one coin's exact-output buy fills to a sliver (one-sided or bounded liquidity in a v4 pool, or an LP of that pool who is also a holder and withdraws liquidity just before the mint and re-adds it after), `minted` collapses to that fraction while the minter pays the full exact-output cost of the four other coins, the full idle part and the 0.50% fee. The payment accrues to the existing holders, so a holder who controls one pool's liquidity can extract a minter's payment. Reproduced on this tree with test/scratch/Review.t.sol (not kept). Minimal fix inside the agreed design for (a): compute idlePart after the loop as Math.mulDiv(idleImd, minted, supply, Math.Rounding.Ceil). A floor for (b) (a minShares argument or reverting below a delivered-fraction threshold) is a scope decision the brief currently forbids ('no new safeguard'); it is reported so the requester accepts it knowingly.","line":404,"path":"src/Imdex5.sol","reproduction":"Mocks from test/Imdex5Base.sol. (b) sliver fill: _deployAll(); _mintFirst(alice, 1000e18) -> supply 995e18. need0 = ceil(held[tokens[0]] * 100e18 / 995e18) = 1960976566330032356114. pm.setShortBy(_key(tokens[0], hooks[0]), need0 - 1e15) so coin 0 delivers 1e15 of the 1.96e21 asked. bob calls mint(100e18, 2000e18). Expected (minter-protecting): revert, or shares close to 100e18. Actual: bob pays 102705360721442885777 wei IMD (102.7 IMD) and receives 50994999999999 wei of shares (0.00005 IMDEX5, 0 ppm of supply); the mint succeeds and ~102 IMD of backing accrues to alice. (a) idle over-charge: etch test/mocks/PoolTaxERC20.sol at tokens[4]; pm.setMaxIn(key_i, 100e18) for all five pools; _mintFirst(alice, 1000e18) -> supply 995e18, idleImd 495e18; lift the caps; bob calls mint(100e18, 2000e18). Expected: minted = 98e18 and idle charged = ceil(495e18*98e18/995e18) = 48753768844221105528. Actual: minted = 98e18, idle charged = ceil(495e18*100e18/995e18) = 49748743718592964825, i.e. 994974874371859297 wei (0.995 IMD) more than the shares bob receives are entitled to; bob's pro-rata idle claim immediately after the mint is 48842979766168445153, below what he deposited. Repeats on every mint while SwarmCity is listed.","severity":"medium","snippet":"uint256 idlePart = Math.mulDiv(idleImd, shares, supply, Math.Rounding.Ceil);","title":"A short-filled mint charges the full requested fraction of every other coin and of idle IMD while issuing fewer shares; a sliver fill on one coin costs the minter nearly the whole payment"},{"citation":"resolved","description":"From audit_permissions; reproduced with the attached specialist proof (it fails on this tree with 'next call did not revert as expected') and with my own scratch test. ask() (lines 245-268) resets openSince, openRequest and lastAsk for a new cycle but never clears answerHash, and submit checks only the stored hash and the signature, never _verifyAttestation, so a.expiresAt is ignored. If one cycle's answer was delivered but nobody submitted it (realistic when feeImd was under 0.25 IMD so submit paid nothing), the hash survives the next ask(). While the new request is open anyone can submit the week-old, expired attestation and call rebalance(): the index sells coins that left the OLD list and buys the OLD list from idle IMD; when the new answer arrives, submit and rebalance run again. Two churns (pool fees twice on the churned part, each side 2%-limited) and four 0.25 IMD rewards instead of two. The README's 'the new answer then replaces the old one' only holds once the new answer has arrived; the window between the new ask and its answer is open. One-line fix inside the agreed design: clear answerHash in ask() when it opens a new request (or require block.timestamp <= a.expiresAt in submit). Loss is bounded (0.5 IMD of extra rewards plus swap fees on the churn), hence low.","line":308,"path":"src/Imdex5.sol","reproduction":"test/scratch/Proof_4710a3460e6b.t.sol (the specialist's proof): fund(5e18); ask() -> R1; Intake delivers A1 (agreed 5, expiresAt now+1 day, answer = 3 launches); nobody submits; warp +7 days; ask() -> R2 open (openSince > 0), answerHash still keccak256(A1.answer), A1.expiresAt < block.timestamp. submit(A1, sig(A1)). Expected: revert (closed, expired request). Actual: ListSubmitted with A1's launches and nextList().length == 3. Continued in my scratch run: carol then calls rebalance() while R2 is open -> listCount goes 5 -> 3, carol received 0.5 IMD of rewards for the stale submit and rebalance; the real answer for R2 then repeats both steps.","severity":"low","snippet":"if (answerHash == 0 || keccak256(a.answer) != answerHash) revert WrongAnswer();","title":"submit accepts a stale, expired attestation from the previous cycle after the next ask has opened; rebalance then trades on it and the index churns twice in one cycle"},{"citation":"resolved","description":"From audit_economics; reproduced. _mintMore buys every coin in _coins with held > 0, including the leftovers _rebalance keeps (lines 461-463) precisely because their sale failed, through a direct _swap rather than the try/catch swapSelf that rebalance and redeemToImd use. A pool that reverts (dead pool, a hook that reverts or burns gas for the index, a coin that pauses or blacklists the PoolManager) therefore reverts every mint. The only exit is a later rebalance that sells the coin, which needs the same pool to work again: a rebalance that skips the sale leaves the leftover in place, so a permanently dead pool blocks mint permanently while redeem and redeemToImd keep working. The README records 'a dead pool blocking mint (never redeem)' as accepted by the brief; this is reported so the requester confirms that acceptance extends to a leftover no oracle answer can ever remove. A fix (skipping the coin, or paying the fraction in another way) is a design decision outside the brief's two changes.","line":396,"path":"src/Imdex5.sol","reproduction":"Mocks from test/Imdex5Base.sol: _deployAll(); _mintFirst(alice, 1000e18); _deliverList([1282,1283,737,1075]) (drops SwarmCity 1175); pm.setDead(_key(tokens[4], hooks[4]), true); bob calls rebalance() -> the sale of tokens[4] is skipped, coins().length == 5, listCount == 4, held(tokens[4]) > 0. bob calls mint(100e18, 2000e18). Expected: shares issued or a graceful outcome. Actual: revert 'dead pool' (test_deadLeftoverBlocksMint in test/scratch/Review.t.sol). alice's redeem(10e18) afterwards succeeds. Every later mint reverts the same way until the pool works and a rebalance sells the leftover.","severity":"low","snippet":"(uint256 amountIn, uint256 out) = _swap(coin.token, coin.hook, true, need, true, false);","title":"mint reverts for everyone while any held coin's pool swap reverts, including a leftover kept because rebalance could not sell it, so one dead pool blocks all future mints"},{"citation":"resolved","description":"From audit_flow; reproduced, informational. Step 2 of _rebalance carries every leaving coin whose sale in step 1 did not empty its holding. A coin whose pool is dead or whose hook reverts for the index is never sold, so it is carried forever, and each later rebalance can add up to five more. redeem (line 207), _mintMore (line 392), _redeemToImd (line 420) and both trim loops iterate over all of _coins, so their gas grows linearly with the number of permanently unsellable leftovers (up to PAY_GAS per coin in redeem for a coin that burns gas, SWAP_GAS per coin in redeemToImd and rebalance). No incorrect accounting results and balance == held + owed holds for the leftover at every step; at realistic list churn it never blocks redeem. Pre-existing in launch 1636 and outside the two requested changes.","line":462,"path":"src/Imdex5.sol","reproduction":"Mocks from test/Imdex5Base.sol: _mintFirst(alice, 1000e18); deliver and submit a list that drops the fifth coin; set that coin's pool dead; rebalance() -> coins().length == 5 with listCount == 4 and the leftover held (my scratch run); with a list that replaces the fifth coin by launch 2000 the same run gives coins().length == 6, listCount == 5. Repeating with every leaving coin's pool dead adds the leavers permanently: coins().length == listCount + 5*k after k such rebalances. Expected by the design: leftovers are kept so they are still redeemed; actual: the same, with loop cost growing by one coin per unsellable leaver and no mechanism to drop one.","severity":"info","snippet":"if (!_inList(next, old[i].token) && held[old[i].token] > 0) _coins.push(old[i]);","title":"Unsellable leftover coins accumulate in _coins across rebalances, growing the redeem, mint and rebalance loops without bound"}],"hash":"5a5b458c9c9ea8b0742852f4ae54adc8c11f67e57b0c0cde6a9de7ce7877a0b8","nodeId":"6ecc9764-0e70-4b6d-8190-e7f90857c4eb","outcome":"completed","summary":"The review is complete and the findings file validates: every snippet matches its line in the tree, and the coverage record answers all 17 entry points plus three invariant rows.\n\n**Outcome.** The two requested changes are implemented correctly. Receipts are measured around `take`, holders are never diluted by a short fill, the last holder receives everything, and all 130 tests pass. The runtime is 22,656 bytes, the constructor takes no arguments and calls nothing, and the manifest is schema-valid with no owner. Nothing blocks deployment.\n\n**Findings kept, all reproduced on this tree:**\n\n1. **Medium, merged from three specialists.** A short-filled mint charges the full requested fraction of the other coins and of idle IMD while issuing fewer shares. With SwarmCity listed, every mint over-charges the idle part by 2 percent, which the brief's words do not cover. Worse, a sliver fill on one coin, which an LP of that pool who also holds shares can arrange, left a minter paying 102.7 IMD for 0.00005 shares. The idle part has a one-line fix inside the brief; a floor is a scope decision for the requester.\n2. **Low.** A delivered but unsubmitted answer survives the next `ask`, so an expired attestation from the previous cycle can be submitted and rebalanced on while the new request is open. The specialist's proof fails on this code as stated, and the double churn paid 0.5 IMD of rewards in my run.\n3. **Low.** A leftover coin whose pool is dead reverts every mint permanently, since mint buys leftovers through a direct swap and no rebalance can sell it. Redeem still works. The README records this as accepted; the requester should confirm that extends to leftovers.\n4. **Info.** Unsellable leftovers accumulate in the coin list across rebalances, growing loop gas without bound. No accounting error.\n\n**Dropped or merged.** The economics, math and permissions reports on mint overpayment were one root cause and became finding 1. No specialist finding failed to reproduce. The static-analysis leads all traced to guarded or benign patterns: reentrancy is blocked by the guard on every entry and the self-only swap, the strict equalities are correct last-holder checks, and the `encodePacked` body is never hashed.\n\n**My own pass found nothing further.** I traced every `held`, `idleImd` and `feeImd` mutation against the real transfer, the mint dilution bound, the unlock and swap callback guards, and the first-mint inflation path, which donations cannot reach because accounting is internal. Scratch tests live under `test/scratch/` and are not kept.","treeHash":null,"usage":{"cachedInputTokens":949527,"inputTokens":290,"model":"claude-fable-5-1","outputTokens":32066,"runtime":"claude","turns":19,"wallClockMs":713322}},{"artifacts":[],"attempt":1,"bundleHash":"3e91188928d19bff18bd3aedab01a941b32fefc3fe71d6a5dc060eebc7febdce","device":"1559912e747bbcd4","findings":[],"hash":"5c123d2cbeaf26fa2c0df01d81defeadca0fe972fe18d55ae69740a67c01d23f","nodeId":"bb3d8a6d-3a26-430a-9a97-d8a0b31711f9","outcome":"completed","summary":"The work is committed and verified. Nothing further depends on another step, so here is the recap.\n\n**Outcome.** `forge build` and `forge test` pass with the verifier's seed: 130 tests across 10 suites, 0 failures. The existing suite already covered the brief's step 3 lifecycle, so I built on it rather than rewriting. I found no defect in the corrected contract, so there is no findings file.\n\n**What I added** (two files, both under `test/`):\n\n- `test/mocks/TaxERC20.sol`: a fee-on-transfer mock with a settable rate and scope. Pool-only mode models SwarmCity. All-transfers mode also taxes the index's own settlements into a pool, which makes a sell leave the pool short.\n- `test/Imdex5TaxEverywhere.t.sol`: nine unit and fuzz tests plus a bounded invariant suite.\n\n**What the new tests attack:**\n\n- All five coins taxed at once at fuzzed rates, through first mint, two later mints, an IMD exit and in-kind redeems by every holder. Every step checks balance equals held plus owed, and the last holder leaves nothing held, owed or stranded.\n- The most taxed coin, in any list position, decides the minted amount, measured from balance deltas rather than the swap report.\n- A 2% tax composed with a capped exact-output fill: held is credited the net receipt and the mint is the delivered fraction.\n- A coin that keeps everything: first mint and later mints revert with BuyFailed and roll back fully. A rebalance buy of it spends IMD but credits nothing, and redeems still pay in kind.\n- A coin taxing its own settlement: its sell fails inside swapSelf, is paid in kind, and it survives a rebalance as a residual.\n- A donation cannot move held, size a buy, or inflate a redeem.\n- An invariant run with all five coins taxed at rates the run changes between calls, from zero to 100%, driving the existing handler.\n\n**Verification that the tests discriminate.** I etched a scratch copy of the uncorrected launch 1636 logic over the index and ran the same tests. Eight of nine failed there for the stated reasons. The donation test passes on both by design.\n\n**Two things to flag:**\n\n- The README should list the two new test files in its change table. README is outside my write scope, so I could not add them.\n- The pre-existing `Imdex5TaxedCoinInvariantTest` inherits its invariant functions, so the inline run config is not applied and it runs at the default 256 runs by 500 depth. It takes about 142 seconds of the 146-second suite. Making it standalone with its own config, as I did for mine, would cut that to a few seconds. I left it untouched to avoid rewriting accepted work.","treeHash":"a299084c9de4090c9fcd017e47971699a34f7531","usage":{"cachedInputTokens":1762190,"inputTokens":514,"model":"claude-fable-5-1","outputTokens":40864,"runtime":"claude","turns":34,"wallClockMs":1368659}},{"artifacts":[],"attempt":1,"bundleHash":null,"device":"2cd7c8e4bd7aedde","findings":[{"citation":"resolved","description":"`_swap` returns `amountOut = uint256(dOut)` straight from the PoolManager's BalanceDelta and `take`s that amount, and every caller (`_mintFirst` line 377, `_mintMore` line 396, `_tryBuy` line 505) adds that figure to `held[coin]`. Uniswap v4's `take` reduces the taker's delta by the full amount and then calls the token's `transfer`; for a token that keeps a share of transfers out of the PoolManager the index receives less than `amountOut`. SwarmCity (launch 1175, 0x1ae93A4D9CC0b41C594D00387B6F832a88f729b7, the fifth coin of the constructor's starting list) keeps 2% of every transfer out of the PoolManager, so after every buy `held[SC]` is ~2.04% above the index's real SC balance. The README's invariant 'a coin's balance may exceed held by the amounts recorded as owed' is violated the moment the first mint lands. Consequences: (1) every redeem and redeemToImd computes the SC share from the inflated `held`, so earlier redeemers are paid more SC than their real fraction and the shortfall is pushed onto whoever redeems last; (2) the last holder's `redeem` (keepBps = 100%) tries to transfer `held[SC]` while the balance is 2% lower, the transfer reverts inside `_pay`, the full amount is recorded in `owed[last][SC]`, and `claim(SC)` reverts for ever with nothing behind the debt; (3) `mint` buys exact-out `need` of SC and mints the full `shares` while only 98% of that SC really arrived, so each mint dilutes the SC behind earlier holders. The existing invariant suite (`invariant_coinBalancesAreHeldPlusOwed`, test/Imdex5.invariant.t.sol:397) only ever uses a MockERC20 that transfers in full, so it never exercised this. The brief's fix (measure `balanceOf` before and after `take` and use the difference) makes the attached test pass; `held` then always equals what the contract really received. Note that once `_swap` measures arrivals, `_mintMore` line 394 (`if (out < need) revert BuyFailed`) reverts on every mint while SwarmCity is listed, which is the second finding.","line":538,"path":"src/Imdex5.sol","reproduction":"Mock PoolManager at 0x000000000004444c5dc75cB358380D2e3dE08A90 with a 1,000,000 coin / 10,000 IMD pool per list coin; etch at 0x1ae93A4D9CC0b41C594D00387B6F832a88f729b7 an ERC-20 that keeps 2% of any transfer whose sender is the PoolManager. (1) alice: mintFirst(1000e18, [0,0,0,0,0]). Expected: SC balance of the index == held[SC]. Actual: held[SC] = 19511716834983821943327, balance = 19121482498284145504461 (2% less). (2) alice transfers 200e18 shares to bob; alice redeemToImd(795e18, 0); bob redeem(200e18) as the last holder. Expected: bob receives all five coins, owed == 0, held == 0, index balances 0. Actual: _pay(SC, bob, 3921953132660064712227) reverts for insufficient balance, owed[bob][SC] = 3921953132660064712227 while the index holds 0 SC, and claim(SC) reverts for ever. The test fails on the current code at step (1) and at step (2) and passes once _swap records `balanceOf(after) - balanceOf(before)` as amountOut.","severity":"critical","snippet":"        if (amountOut > 0) IPoolManager(POOL_MANAGER).take(outCur, address(this), amountOut);","title":"_swap credits held with the swap delta's amountOut, not what arrived: a 2% fee-on-transfer coin (SwarmCity, list slot 4) overstates held and the last holder's redeem cannot be paid"},{"citation":"resolved","description":"`_mintMore` asks an exact-output buy of `need = ceil(held * shares / supply)` for every coin and reverts the whole mint if `out < need`. Today `out` is the delta's figure, so a fee-on-transfer coin passes this check while `held` is over-credited (finding 1). As soon as `_swap` reports what really arrived, as the brief requires and as `held` must, an exact-output buy of SwarmCity (launch 1175, slot 4 of the starting list) always delivers 98% of `need`, so `out < need` holds on every call and `mint` reverts for every buyer for as long as SwarmCity (or any coin whose fills land short: a pool whose liquidity runs out before `need`) is in `_coins`. Only `mintFirst` (exact input) keeps working, and only at supply 0, so the index can never grow after its first mint: a permanent denial of the only way in. The brief's intended behaviour, which the attached test asserts, is: `minted = shares`; for each coin with `out < need`, `minted = min(minted, shares * out / need)`; revert `BuyFailed` only if `out == 0` or `minted == 0`; mint and emit `minted`, not `shares`; the buyer pays `cost + idlePart + fee` for every buy made. The existing tests at test/Imdex5.t.sol:327-330 and test/Imdex5Revised.t.sol:40-42 pin the old revert and must be changed with it.","line":394,"path":"src/Imdex5.sol","reproduction":"Mock PoolManager with a 1,000,000 coin / 10,000 IMD pool per coin; alice mintFirst(1000e18) so supply = 995e18. Make the fourth coin's (0x54C68a4D0A21DBb1ad72FaA052db159d26F967EA) exact-output buy deliver 2% less than asked (the mock's shortBy = need*2/100, where need = ceil(held * 100e18 / 995e18)); bob calls mint(100e18, 2000e18). Expected: bob receives 100e18 * out / need = 98e18 shares, held[coin4] grows by out, bob pays for the buys made, and every coin balance equals held. Actual: revert BuyFailed(0x54C68a4D0A21DBb1ad72FaA052db159d26F967EA); no mint is possible while that coin fills short. The test fails on the current code and passes once _mintMore mints the delivered fraction.","severity":"high","snippet":"            if (out < need) revert BuyFailed(coin.token);","title":"_mintMore reverts BuyFailed on any short fill, so once arrivals are measured every mint reverts while a fee-on-transfer coin (SwarmCity) is listed; a short fill should mint the delivered fraction"},{"citation":"resolved","description":"`test_mintRevertsWhenABuyFailsOrFillsShort` (test/Imdex5.t.sol:320-331) and `Imdex5Revised.t.sol:40-42` assert that a 1-wei short fill reverts `mint` with BuyFailed, which is the behaviour finding 2 replaces; they will fail after the fix and must be rewritten to assert the delivered-fraction mint. `invariant_coinBalancesAreHeldPlusOwed` (test/Imdex5.invariant.t.sol:397-405) is the right invariant but every coin in the suite is a `MockERC20` that transfers in full, so the 2% fee of SwarmCity, a coin of the constructor's own list, was never represented and finding 1 was invisible to 107 passing tests. The brief asks for a 2%-on-transfer-out-of-the-PoolManager mock and a scripted sequence (first mint, two later mints, an exit to IMD, in-kind redeems by every holder) that checks balance == held + owed after each step and that the last holder receives every coin with nothing owed or stranded; test/scratch/HeldOverstated.t.sol in finding 1 is a starting point for that mock.","line":329,"path":"test/Imdex5.t.sol","reproduction":"Apply the brief's change 2 to _mintMore and run `forge test --match-test test_mintRevertsWhenABuyFailsOrFillsShort`: expected revert BuyFailed does not happen, the test fails. Run the invariant suite against a coin that keeps 2% of transfers out of the PoolManager at 0x1ae93A4D9CC0b41C594D00387B6F832a88f729b7: on the current code `coin balance != held + owed` after the first mintFirst (19121482498284145504461 != 19511716834983821943327).","severity":"low","snippet":"        vm.expectRevert(abi.encodeWithSelector(Imdex5.BuyFailed.selector, tokens[1]));","title":"Tests pin the old short-fill revert and never use a fee-on-transfer coin, so the held-vs-balance invariant was never exercised against the real starting list"},{"citation":"resolved","description":"Not a defect of the code as it stands; a consequence of the brief's change 2 the adapter should know and the README should state. `need` is the exact-output amount asked of the pool; for SwarmCity 98% of it arrives, so `minted = shares * 0.98` on every mint, while `cost` includes the full IMD the pool charged for `need` of SwarmCity and of every other coin, plus `idlePart` and the fee computed for the full `shares`. A minter therefore pays for 100% and receives 98% of the requested shares; the 2% of value stays with the existing holders. A minter cannot avoid it by asking for shares/0.98, because the extra SwarmCity bought still loses 2% on arrival. The brief accepts this ('the buyer still pays for every buy made'); it should be documented so a minter sets `maxImdIn` and reads `Minted.shares` accordingly.","line":391,"path":"src/Imdex5.sol","reproduction":"After the brief's changes, with SwarmCity keeping 2% of transfers out of the PoolManager: alice mintFirst(1000e18) (supply 995e18); bob mint(100e18, 2000e18). Expected by a naive minter: 100e18 shares. Actual: Minted emits minted = 100e18 * out / need = 98e18 (out = 98% of need), and bob's IMD paid is cost(100% of need for each coin) + idlePart(100e18 / 995e18 of idleImd) + 0.5% of cost.","severity":"info","snippet":"            uint256 need = Math.mulDiv(held[coin.token], shares, supply, Math.Rounding.Ceil);","title":"With the planned delivered-fraction mint, every mint while SwarmCity is listed issues 2% fewer shares than asked while charging for the full exact-output buys"}],"hash":"5ec4b6a34eda7b2cbf882355fd8d221823f138db5663d0c6daa652fbd77e6382","nodeId":"2bca911a-d02b-415e-b092-9e8301fed07a","outcome":"completed","summary":"Review complete. The findings file holds four entries, two with Foundry proofs that fail on the current code and pass with the brief's fixes.\n\n**Contracts read:** `src/Imdex5.sol`, `src/Interfaces.sol`, `src/OracleAttestation.sol`, all five test files and both mocks, `launch.json`, the README and both protected tests. Nothing in scope was unreachable. The external mainnet contracts (PoolManager, registries, Intake, the five coins) were not read on chain. Their behaviour is taken from the brief and from the Uniswap v4 source I know. I verified the hard-coded v4 constants independently: the transient nonzero-delta slot, pools slot 6, and the tick-math price bounds all match. Runtime is 22,010 bytes with no DELEGATECALL, CALLCODE or SELFDESTRUCT. All 107 existing tests pass.\n\n**Findings written to `.imd-findings.json`:**\n\n- **Critical, `src/Imdex5.sol:538`.** The swap credits `held` with the delta's reported output instead of what arrived. With SwarmCity keeping 2% of transfers out of the PoolManager, `held` overstates the real balance from the first mint on. Earlier redeemers are overpaid, and the last holder's redeem fails inside the payment, leaving an unpayable debt that `claim` can never settle. Proof in `test/scratch/HeldOverstated.t.sol`: two tests fail now and pass with the balance-before-and-after `take`.\n- **High, `src/Imdex5.sol:394`.** The mint reverts on any short fill. Once arrivals are measured, every exact-output buy of SwarmCity lands 2% short, so every `mint` reverts while it is listed. The index could never grow after its first mint. Proof in `test/scratch/MintShortFill.t.sol`: fails now, passes once the mint issues the delivered fraction as the brief specifies.\n- **Low, `test/Imdex5.t.sol:329`.** Two tests pin the old revert and must change. The invariant suite asserts the right thing but only ever used a coin that transfers in full.\n- **Info, `src/Imdex5.sol:391`.** After the planned change, every mint with SwarmCity listed issues 2% fewer shares than asked while charging for the full buys. Worth stating in the README for minters.\n\nI checked the rest of the attack list without finding another defect: sells into the pool are exact and a short settle is caught by the delta check, rebalance and redeem arithmetic round against the caller, access control and reentrancy guards hold, and the constructor calls nothing. The working tree is unchanged apart from the findings file and the scratch tests.","treeHash":null,"usage":{"cachedInputTokens":1104804,"inputTokens":386,"model":"claude-fable-5-1","outputTokens":36254,"runtime":"claude","turns":29,"wallClockMs":567893}},{"artifacts":[],"attempt":1,"bundleHash":"707edb7c6b3bdda13dbf345a5064db0c50774490c10980160a5b0a126e0c38b8","device":"f7df22fc14d72d4e","findings":[],"hash":"80d172752ce04d7eac1374ac7a374ac22a7a76e3e6549a3c9eecf2de2ad19982","nodeId":"bb3d8a6d-3a26-430a-9a97-d8a0b31711f9","outcome":"completed","summary":"Everything is green. The work is done.\n\n**What was wrong.** The implementer's revision 2 changed how a later mint charges idle IMD: it now takes `idleImd * minted / supply` for the shares actually issued, not the fraction of the shares requested. My fuzz test in `test/Imdex5TaxEverywhere.t.sol` still expected the old requested-share charge, so under the verifier's seed it failed on a one-wei rounding difference in the \"every buy must be paid\" assertion.\n\n**What I changed.** Only the mint helper in that file:\n- The expected payment now uses the issued-share idle contribution, rounded up, matching the accepted source.\n- Two new assertions: the idle IMD actually added equals exactly that contribution, and it is never more than the requested-share fraction, so a short fill can never overpay idle IMD.\n- The existing checks stay: held is credited only with what arrived, minted shares never exceed any holding's delivered fraction, and balances equal held plus owed at every step.\n\n**Verification with the verifier's seed:**\n\n| Check | Result |\n| --- | --- |\n| `forge build` | passes, Imdex5 runtime 22,662 bytes |\n| `forge test` (all 10 suites) | 133 passed, 0 failed, 0 skipped |\n\nNo defect was found in the current source, so no findings file was written. The only modified path is `test/Imdex5TaxEverywhere.t.sol`, left uncommitted in the working tree for the submission step.","treeHash":"c6fa28bd1ae6e0e58bd5fd98d7b5a78a7768dec0","usage":{"cachedInputTokens":504640,"inputTokens":226,"model":"claude-fable-5-1","outputTokens":5755,"runtime":"claude","turns":17,"wallClockMs":324555}},{"artifacts":[],"attempt":1,"bundleHash":null,"device":"9b657b3675e34ec5","findings":[{"citation":"resolved","description":"Asymmetry in the request/fulfil pair. ask() (lines 245-268) resets openSince, openRequest and lastAsk for a new cycle but never clears answerHash, and submit() checks only that keccak256(a.answer) equals the stored hash plus the signature; it does not call _verifyAttestation, so expiresAt is ignored. If a cycle's answer was delivered by the Intake but nobody submitted it (realistic when feeImd fell below 0.25 IMD so submit pays no reward), the hash survives the next ask(). While the new request is open, anyone can submit the week-old attestation, which is past its expiresAt, and then call rebalance(): the index sells coins that left the OLD list and buys the OLD list from idle IMD. When the new answer arrives, submit and rebalance run again on the current list, so the index churns twice in one cycle (paying pool fees twice on the churned part, with both sides 2%-limited) and feeImd pays four 0.25 IMD rewards instead of two. Preconditions: one delivered-but-unsubmitted answer and at least 0.75 IMD of fees for the next ask. Actor: anyone. Loss is bounded (extra 0.5 IMD of fees per occurrence plus swap fees on the churn), hence low. A one-line fix inside the agreed design is to clear answerHash in ask() when it opens a new request (or to require block.timestamp <= a.expiresAt in submit). Existing test test_aLaterAskReplacesAnUnsubmittedAnswer only covers the case where the NEW answer has already arrived; the window between the new ask and its answer is untested.","line":308,"path":"src/Imdex5.sol","proof":"// SPDX-License-Identifier: MIT\npragma solidity 0.8.26;\n\nimport {Test} from \"forge-std/Test.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {ECDSA} from \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport {Imdex5} from \"src/Imdex5.sol\";\nimport {IIntake, IRegistry} from \"src/Interfaces.sol\";\nimport {OracleAttestation} from \"src/OracleAttestation.sol\";\n\ncontract PlainToken {\n    mapping(address => uint256) public balanceOf;\n    mapping(address => mapping(address => uint256)) public allowance;\n\n    function mint(address to, uint256 amount) external {\n        balanceOf[to] += amount;\n    }\n\n    function approve(address spender, uint256 amount) external returns (bool) {\n        allowance[msg.sender][spender] = amount;\n        return true;\n    }\n\n    function transfer(address to, uint256 amount) external returns (bool) {\n        balanceOf[msg.sender] -= amount;\n        balanceOf[to] += amount;\n        return true;\n    }\n\n    function transferFrom(address from, address to, uint256 amount) external returns (bool) {\n        allowance[from][msg.sender] -= amount;\n        balanceOf[from] -= amount;\n        balanceOf[to] += amount;\n        return true;\n    }\n}\n\ncontract StubIntake is IIntake {\n    uint256 public count;\n    bytes32 public lastRequestId;\n\n    function requestWithFailure(bytes32, bytes calldata, Callback calldata, bytes4, address asset, uint256 amount)\n        external\n        payable\n        returns (bytes32 requestId)\n    {\n        require(IERC20(asset).transferFrom(msg.sender, address(this), amount), \"pull failed\");\n        count += 1;\n        requestId = keccak256(abi.encode(\"request\", count));\n        lastRequestId = requestId;\n    }\n}\n\ncontract StubRegistry is IRegistry {\n    mapping(uint64 => bool) public recorded;\n    mapping(uint64 => Artifact[]) private artifacts;\n\n    function record(uint64 launch, address token, address hook) external {\n        recorded[launch] = true;\n        delete artifacts[launch];\n        artifacts[launch].push(Artifact(bytes32(\"token\"), bytes32(\"Token\"), token));\n        artifacts[launch].push(Artifact(bytes32(\"hook\"), bytes32(\"Hook\"), hook));\n    }\n\n    function isRecorded(uint64 launch) external view returns (bool) {\n        return recorded[launch];\n    }\n\n    function artifactsOf(uint64 launch) external view returns (Artifact[] memory) {\n        return artifacts[launch];\n    }\n}\n\ncontract StubSigner {\n    address private immutable KEY;\n\n    constructor(address key) {\n        KEY = key;\n    }\n\n    function isValidSignature(bytes32 hash, bytes calldata signature) external view returns (bytes4) {\n        (address recovered,,) = ECDSA.tryRecover(hash, signature);\n        return recovered == KEY ? bytes4(0x1626ba7e) : bytes4(0xffffffff);\n    }\n}\n\n/// A week-old, unsubmitted and already expired attestation is still accepted by `submit`\n/// after the next `ask` has opened a new request. Expected: `submit` rejects it.\ncontract StaleAnswerProof is Test {\n    uint256 constant KEY_PK = 0xA11CE;\n    uint256 constant START = 1_800_000_000;\n\n    Imdex5 index;\n    PlainToken imd;\n    StubIntake intake;\n    StubRegistry regA;\n    address alice = makeAddr(\"alice\");\n\n    function setUp() public {\n        vm.warp(START);\n        index = new Imdex5();\n        imd = PlainToken(index.IMD());\n        vm.etch(address(imd), address(new PlainToken()).code);\n        intake = StubIntake(index.INTAKE());\n        vm.etch(address(intake), address(new StubIntake()).code);\n        regA = StubRegistry(address(index.REGISTRY_A()));\n        vm.etch(address(regA), address(new StubRegistry()).code);\n        vm.etch(index.ORACLE_SIGNER(), address(new StubSigner(vm.addr(KEY_PK))).code);\n        Imdex5.Coin[] memory coins = index.coins();\n        for (uint256 i = 0; i < coins.length; ++i) {\n            regA.record(coins[i].launch, coins[i].token, coins[i].hook);\n        }\n        imd.mint(alice, 10e18);\n        vm.prank(alice);\n        imd.approve(address(index), type(uint256).max);\n    }\n\n    function _attestation(uint64 n) internal view returns (OracleAttestation.Attestation memory a) {\n        Imdex5.Coin[] memory coins = index.coins();\n        bytes32[] memory ids = new bytes32[](n);\n        for (uint256 i = 0; i < n; ++i) {\n            ids[i] = bytes32(uint256(coins[i].launch));\n        }\n        a = OracleAttestation.Attestation({\n            requestId: keccak256(abi.encode(\"uuid\", n)),\n            chainId: 1,\n            questionHash: keccak256(\"question\"),\n            answerType: OracleAttestation.ANSWER_BYTES32_LIST,\n            answer: abi.encode(ids),\n            figure: 0,\n            fromBlock: 100,\n            toBlock: 200,\n            blockHash: bytes32(uint256(7)),\n            panelJobId: keccak256(\"panel\"),\n            panelSize: 5,\n            quorum: 4,\n            agreed: 5,\n            issuedAt: uint64(block.timestamp),\n            expiresAt: uint64(block.timestamp + 86_400)\n        });\n    }\n\n    function _sign(OracleAttestation.Attestation memory a) internal view returns (bytes memory) {\n        (uint8 v, bytes32 r, bytes32 s) = vm.sign(KEY_PK, index.attestationDigest(a));\n        return abi.encodePacked(r, s, v);\n    }\n\n    function test_staleUnsubmittedAnswerIsRejectedAfterTheNextAsk() public {\n        vm.prank(alice);\n        index.fund(5e18);\n        vm.prank(alice);\n        index.ask();\n        OracleAttestation.Attestation memory first = _attestation(3);\n        bytes memory firstSig = _sign(first);\n        bytes32 id = intake.lastRequestId();\n        vm.prank(address(intake));\n        index.onOracleResult(id, first, \"\");\n        assertEq(index.answerHash(), keccak256(first.answer));\n        // nobody submits; a week later a new question is asked and is open\n        vm.warp(START + 7 days);\n        vm.prank(alice);\n        index.ask();\n        assertGt(index.openSince(), 0, \"a new request is open\");\n        assertLt(first.expiresAt, block.timestamp, \"the old attestation has expired\");\n        // the week-old answer must not be adoptable as the next list\n        vm.prank(alice);\n        vm.expectRevert();\n        index.submit(first, firstSig);\n        assertEq(index.nextList().length, 0, \"a stale answer became the next list\");\n    }\n}","reproduction":"1) alice: fund(5e18); ask() -> request R1 opens. 2) Intake: onOracleResult(R1, A1, \"\") with A1.agreed=5, A1.expiresAt = now+1 day -> answerHash = keccak256(A1.answer). 3) Nobody submits. 4) warp +7 days; ask() -> R2 opens, openSince>0, answerHash still keccak256(A1.answer), A1.expiresAt < block.timestamp. 5) carol: submit(A1, sig(A1)) -> expected: revert (stale/expired answer for a closed request); actual: ListSubmitted with A1's launches, carol is paid 0.25 IMD. 6) carol: rebalance() -> sells leavers of A1's list, buys A1's list, pays carol 0.25 IMD, while R2 is still open. 7) Intake delivers A2 for R2; submit(A2), rebalance() -> two more rewards and a second churn. Scratch run on this tree: carol received 1.0 IMD of rewards in one cycle and listCount went 5 -> 3 -> 5. The proof below asserts step 5 reverts and fails on this code with 'next call did not revert as expected'.","severity":"low","snippet":"        if (answerHash == 0 || keccak256(a.answer) != answerHash) revert WrongAnswer();","title":"submit accepts a stale, expired attestation from the previous cycle after the next ask has opened; rebalance then trades on it"},{"citation":"resolved","description":"Economics x asymmetry seam in the corrected _mintMore. The loop buys the full `need` of every coin in list order (lines 394-402) and only afterwards scales `minted` down to the least delivered fraction; idlePart (line 404) is also computed from the requested `shares`, not from `minted`. With SwarmCity in the list every later mint is a 2% short fill on that coin, so the minter pays 100% of the requested fraction of the other four coins and of idle IMD and receives 98% of the shares. The difference is transferred to the existing holders on every mint. maxImdIn cannot bound this because the short fill LOWERS the total cost; there is no minShares argument, so the minter has no way to refuse. The README documents the consequence ('maxImdIn ... is not a minimum-share guarantee'), and the brief states the buyer still pays for every buy made, so this is reported as a design-level low: the idle part is not a buy, and charging idleImd*shares/supply for minted < shares is beyond the brief's words. If the author keeps the design, consider charging idlePart on minted; if a minimum is wanted that is a scope decision for the requester.","line":398,"path":"src/Imdex5.sol","reproduction":"Taxed mock from test/mocks/PoolTaxERC20.sol etched at SwarmCity (tokens[4]); _mintFirst(alice, 1000e18+7); bob: mint(100e18, 2000e18). Measured on this tree (test/scratch/Review.t.sol::test_shortFillOverpaymentNumbers): shares requested 100e18, shares minted 98e18, IMD paid 102.2937e18, IMD sent to pools 101.7848e18; IMD paid above the issued fraction (paid - paid*98/100) = 2.0459e18, i.e. 2.0% of the payment goes to existing holders. Expected (per the minter): pay ~98/100 of the price for 98 shares, or be able to set a floor. Actual: pays the full price of 100 shares' worth of four coins and idle for 98 shares, and cannot refuse via any argument.","severity":"low","snippet":"                minted = Math.min(minted, Math.mulDiv(shares, out, need));","title":"A short-filled mint charges the minter for the full requested fraction of every other holding and of idle IMD while issuing fewer shares, with no minimum-shares guard"}],"hash":"830bf1df49457a4f75c174da3c4e5a1e415d6e6d0315fd7bcc88c525f7a0ee47","nodeId":"d2854506-c38d-42ca-8b41-0b369ed9dde0","outcome":"completed","summary":"Review complete. The findings are in `.imd-findings.json` with all 17 entry points covered, and the working tree is otherwise untouched (git shows only ignored paths).\n\n**Outcome of the permissions audit (Access Control, Trust Gap, Asymmetry)**\n\nThe permission model holds. Every state-changing entry point was traced: the Intake-only callbacks check sender and open request id, `unlockCallback` requires both the PoolManager and an entered guard, `swapSelf` is self-only, and a hook or listed token cannot reach the index's own unlock. The three \"must attack\" targets also hold on this tree:\n\n- **held equals the real balance.** Buys credit the measured receipt, sells debit exactly what was transferred, and in-kind payments leave the unpaid 0.5% in `held`. The taxed-coin lifecycle suite passes.\n- **Mint never over-issues.** With `need` rounded up and `minted` floored, every holding's growth covers the issued fraction.\n- **Redeem always pays.** Burn comes first, failures become `owed`, and the last holder receives everything.\n\n**Two findings, both low severity, both reproduced**\n\n1. **Stale answer accepted after the next ask.** `ask()` resets the request fields but not `answerHash`, and `submit` ignores `expiresAt`. A delivered but unsubmitted answer can be submitted and rebalanced a week later while a new request is open, which churns the index twice in one cycle and pays four rewards instead of two. A proof test under `test/scratch/` fails on this code and passes once `ask` clears the hash or `submit` checks expiry.\n2. **Short-fill overpayment.** A later mint with SwarmCity in the list pays the full requested fraction of the other four coins and of idle IMD but receives 98% of the shares. Measured: 2.05 IMD of a 102.3 IMD mint goes to existing holders, and `maxImdIn` cannot stop it because a short fill lowers the cost. The README documents this as accepted, so it is reported as design-level, noting that charging the idle part on requested rather than issued shares goes beyond the brief's wording.\n\n**Not reported as findings.** A dead or zero-liquidity pool on any held coin blocks `mint` with `BuyFailed`. That is what the brief orders, the tests mark it as accepted, and redeem paths are unaffected. Rebalance sandwiches lose money because the 2% stop is smaller than the round-trip 1.25% pool fee.","treeHash":null,"usage":{"cachedInputTokens":2202965,"inputTokens":546,"model":"claude-fable-5-1","outputTokens":49159,"runtime":"claude","turns":34,"wallClockMs":1068529}},{"artifacts":[],"attempt":1,"bundleHash":null,"device":"11e4593175677f7e","findings":[{"citation":"resolved","description":"After the short-fill change, `minted` can end below `shares` (about 98% of it while SwarmCity is held, since every later mint of it is taxed 2%). The coin buys are deliberately charged in full (the brief: 'the buyer still pays for every buy made'), but the idle-IMD contribution is not a buy: it is a plain pro-rata deposit whose only purpose is to keep `idleImd * f` proportional to the shares the minter receives. It is still computed from `shares` (line 404) and added to `idleImd` before `minted` is known, so the minter deposits `ceil(idleImd * shares / supply)` of IMD against `minted < shares` shares. The excess, `idleImd * (shares - minted) / supply`, is transferred to the existing holders on every later mint for as long as a taxed or short-filling coin is in the list. Precision x invariant seam: the dilution bound `idleImd_before * minted <= idlePart * supply` is kept, but with slack of exactly `(shares - minted)/shares` of the contribution instead of equality, which is a systematic transfer from every later minter rather than rounding dust. The README documents the behaviour, so this may be an accepted trade-off; the judge should decide whether 'plus the proportional idle IMD' in the brief means proportional to the shares issued. Minimal fix that keeps every other rule: move line 404 after the loop and compute `idlePart = Math.mulDiv(idleImd, minted, supply, Math.Rounding.Ceil)`; the bound above still holds because it is the same ceil formula with `minted` in place of `shares`.","line":404,"path":"src/Imdex5.sol","reproduction":"Mocks from test/Imdex5Base.sol with the 2% SwarmCity mock (test/mocks/PoolTaxERC20.sol) etched at tokens[4]. (1) Cap every pool with pm.setMaxIn(key, 100e18) so the first mint leaves idle IMD, then alice calls mintFirst(1000e18, zeros): feeImd = 5e18, supply = 995e18, idleImd = 495e18 (five parts of 199e18 of which only 100e18 each could be taken). Lift the caps. (2) bob calls mint(100e18, 2000e18). Expected (proportional idle): the taxed coin delivers 98% of `need`, so minted = 98e18 and bob's idle contribution should be ceil(495e18 * 98e18 / 995e18) = 48753768844221105528. Actual: line 404 charges ceil(495e18 * 100e18 / 995e18) = 49748743718592964825, so bob pays 994974874371859297 wei (~0.995 IMD) of idle IMD more than the shares he receives are entitled to; immediately after the mint his pro-rata idle claim is 544748743718592964825 * 98e18 / 1093e18 = 48842979766168445153, below what he just deposited. The excess is held by alice through her 995e18 shares. Every later mint while SwarmCity is listed repeats this at 2% of the idle contribution. Checked with a scratch Foundry test (not kept) printing exactly these values; all 120 existing tests pass because none compares idlePart with minted.","severity":"low","snippet":"        uint256 idlePart = Math.mulDiv(idleImd, shares, supply, Math.Rounding.Ceil);","title":"_mintMore charges the idle-IMD contribution for the requested shares, not the shares it issues, so a short-filled minter overpays idle IMD to the other holders"}],"hash":"9e94b30fbbd38b33bd4191c3bb93c69a7cb23e7aee11d7f39530630440d0939b","nodeId":"1c7ef3ab-5417-4a77-9323-5c8d8f204d96","outcome":"completed","summary":"The review is complete. The findings file is written and valid, the scratch tests are deleted, and the working tree is clean apart from the ignored build outputs.\n\n**Outcome.** The math in the corrected Imdex5 holds under the Math Precision, Boundary and Numerical Gap checks. I found one low-severity deviation and no way for `held` to diverge from the real balance, for a mint to out-issue the fraction really added, or for a redeem to go unpaid.\n\n**What I verified**\n\n- **Swap receipts.** Every writer of `held` moves it by the transferred or balance-measured amount. The coin equality `balanceOf == held + owed` and the IMD equality `balanceOf == idleImd + feeImd + owed` survived the existing plain and taxed invariant suites plus my targeted probes: partial sale on the taxed coin by the last holder, a trim and re-buy of the taxed coin in a rebalance followed by a full exit, and dust-sized mints. Nothing was left held, owed or stranded.\n- **Mint issuance bound.** With `need` rounded up and `minted` taken as the floor of the least delivered fraction, `held_before * minted <= received * supply` holds for every coin, both algebraically and in the fuzz suites.\n- **Overflow and casts.** The nested `mulDiv` in `_value` stays far below 2^256 at both sqrt-price extremes, the `uint160` price-limit cast is bounds-checked, the BalanceDelta unpacking uses the correct signed shift and `int128` cast, and `shares * keepBps` cannot overflow at any reachable supply.\n- **Boundary pass.** The attestation decode is bound to the stored hash and signature, launch ids are range-checked before the `uint64` cast, and `_pay` classifies return data the same way v4 and OpenZeppelin do. A lead about coins returning a non-standard word died on its own: v4's `take` rejects such a token, so it can never enter the holdings.\n\n**Finding (low), `src/Imdex5.sol:404`.** The idle-IMD contribution in `_mintMore` is still computed from the requested `shares` while the contract now issues `minted`, which is about 98% of the request whenever SwarmCity is held. The buyer therefore deposits idle IMD for shares they do not receive. Concrete case: after a capped first mint leaving 495 IMD idle at supply 995, a 100-share mint issues 98 shares but charges 49.75 IMD of idle instead of 48.75, so the minter overpays about 0.995 IMD to the existing holders, repeated on every later mint. The README documents this, so it may be an accepted trade-off; the minimal fix is to compute the contribution after the loop from `minted` with the same ceiling formula, which keeps the dilution bound intact.\n\n**Coverage.** All 17 entry points have rows, 16 `holds` and `mint` as `finding`, plus three invariant rows. Runtime size measured 22,656 bytes, and all 120 existing tests pass.","treeHash":null,"usage":{"cachedInputTokens":1533753,"inputTokens":386,"model":"claude-fable-5-1","outputTokens":39416,"runtime":"claude","turns":27,"wallClockMs":731688}},{"artifacts":[],"attempt":1,"bundleHash":null,"device":"911c99a95f538613","findings":[{"citation":"resolved","description":"Round-2 settlement of finding a034ecce (medium). Part (a), the idle contribution charged on the requested shares, is fixed: idlePart is now computed after the buy loop from `minted` with ceiling rounding, so a short-filled minter deposits exactly the pro-rata idle of the shares it receives while the holders' dilution bound idleImd*minted <= idlePart*supply still holds. Re-reproduced on this tree with my own scratch test (not kept): taxed SwarmCity mock at tokens[4], 100 IMD swap caps, first mint 1000 IMD (supply 995e18, idle 495e18), caps lifted, bob mint(100e18, 2000e18): minted 98e18, idle charged 48753768844221105528 (was 49748743718592964825), bob's pro-rata idle claim within 2 wei of his deposit, coin balances == held and IMD balance == idle + fee. Part (b), the absence of any minimum-shares floor, reproduces unchanged (coin 0 short to 1e15 of 1960976566330032356114: bob pays 102705360721442885777 wei and receives 50994999999999 shares) and the author declines it as a new safeguard the brief forbids. That is a correct reading of the brief ('no new feature, role, setting or safeguard'); the README's mint section now states the consequence and test_sliverFillIssuesASliverAndChargesEveryBuy pins the bounds (minter never over-issued, holders never diluted). No further change is requested; recorded so the requester accepts the sliver-fill payment path knowingly.","line":406,"path":"src/Imdex5.sol","reproduction":"Mocks from test/Imdex5Base.sol. (a) etch test/mocks/PoolTaxERC20.sol at tokens[4]; pm.setMaxIn(key_i, 100e18) for all five pools; _mintFirst(alice, 1000e18) -> supply 995e18, idleImd 495e18; lift the caps; bob mint(100e18, 2000e18). Expected: minted 98e18, idle delta ceil(495e18*98e18/995e18) = 48753768844221105528. Actual on this tree: exactly that, and claim-deposit <= 2 wei. (b) _mintFirst(alice, 1000e18); pm.setShortBy(_key(tokens[0],hooks[0]), need0 - 1e15); bob mint(100e18, 2000e18). Actual: paid 102705360721442885777, minted 50994999999999, the mint succeeds. Accepted by the brief and documented.","severity":"info","snippet":"        uint256 idlePart = Math.mulDiv(idleImd, minted, supply, Math.Rounding.Ceil);","title":"Settled: idle-IMD over-charge on short fills is fixed; the no-floor sliver fill (part b of the earlier medium) stays as an accepted, documented consequence of the brief"},{"citation":"resolved","description":"Round-2 settlement of finding aee12528 (low). Still reproduces: _mintMore buys every coin with held > 0 through a direct _swap, so a leftover kept by _rebalance because its sale failed reverts every mint while its pool is dead; redeem and redeemToImd keep working. The author's dispute holds: the brief says 'KEEP EVERYTHING ELSE AS IT IS', the README already recorded 'a dead pool blocking mint (never redeem)' as accepted, and skipping the coin or pricing its fraction another way is a new feature. The README's security notes now say explicitly that the acceptance covers a leftover no oracle answer can remove while its pool is dead, and test_residualsAreRedeemedAndBlockMintWhileTheirPoolIsDead pins the behaviour. Dropped as a blocking item; kept here as an accepted trust assumption for the requester's record.","line":398,"path":"src/Imdex5.sol","reproduction":"Mocks from test/Imdex5Base.sol: _mintFirst(alice, 1000e18); _deliverList([1282,1283,737,1075]); pm.setDead(_key(tokens[4],hooks[4]), true); bob rebalance() -> coins().length 5, listCount 4, held(tokens[4]) > 0. bob mint(100e18, 2000e18) reverts (dead pool); alice redeem(10e18) succeeds. Re-run on this tree with the same result.","severity":"info","snippet":"            (uint256 amountIn, uint256 out) = _swap(coin.token, coin.hook, true, need, true, false);","title":"Settled: a leftover coin whose pool is dead blocks every mint until the pool works and a rebalance sells it; disputed by the author as the brief's documented design, now stated explicitly in the READM"},{"citation":"resolved","description":"Round-2 settlement of finding 4c473a96 (info). Still reproduces: each leaving coin whose sale is skipped stays in _coins, so coins().length == listCount + leftovers and each loop grows by one coin per unsellable leaver, bounded by five leavers per weekly rebalance with PAY_GAS per coin in redeem. No accounting error: balance == held + owed holds for leftovers in the invariant suite. Outside the brief's two changes; a mechanism to drop a leftover would be a new feature. The README's security notes now describe the growth. Informational only; no change requested.","line":464,"path":"src/Imdex5.sol","reproduction":"Mocks from test/Imdex5Base.sol: _mintFirst(alice, 1000e18); deliver a list that drops tokens[4]; pm.setDead(its key, true); rebalance() -> coins().length 5, listCount 4; with a list replacing it by launch 2000 -> coins().length 6, listCount 5. Repeating with every leaver's pool dead gives coins().length == listCount + 5*k after k such rebalances. Same on this tree.","severity":"info","snippet":"            if (!_inList(next, old[i].token) && held[old[i].token] > 0) _coins.push(old[i]);","title":"Settled: unsellable leftovers accumulate in _coins and lengthen the redeem, mint and rebalance loops; pre-existing in launch 1636, disputed by the author, documented"}],"hash":"ac1dfbfab076b7edd8dc1b088c7563007889c27e280acff71ba8f9e416ae003b","nodeId":"6ecc9764-0e70-4b6d-8190-e7f90857c4eb","outcome":"completed","summary":"The findings file is valid, every snippet matches its line, and the working tree is clean apart from the findings file itself.\n\n**Outcome: both fixes hold, nothing blocking remains.**\n\n- **Idle over-charge on short fills (medium, part a): fixed.** Line 406 now computes the idle contribution from `minted` after the buy loop with ceiling rounding. My own re-run with the taxed SwarmCity mock gave bob's idle charge as exactly ceil(495e18·98e18/995e18), with his pro-rata claim within 2 wei of his deposit and every balance equal to held plus owed. The holders' no-dilution bound still holds.\n- **Sliver fill with no shares floor (part b): accepted, not fixed.** It reproduces unchanged. The author's reading of the brief is correct: a minimum-shares argument is a new safeguard the brief forbids. The README now documents it and a test pins the bounds. Recorded as info so the requester accepts it knowingly.\n- **Stale attestation after a new ask (low): fixed.** ask() clears answerHash when it opens a request. The specialist's proof and my scratch test both pass. I also checked that an ask returning early for lack of fees keeps a live answer, and that a late delivery for the old request is ignored.\n- **Dead-pool leftover blocks mint (low) and leftover accumulation (info): disputes accepted.** Both reproduce, both are pre-existing design the brief keeps, and the README now states them explicitly. Kept as info only.\n\nVerification on this tree: forge build and the full suite pass (133 tests), runtime size is 22,662 bytes, launch.json has only the three schema keys with one no-argument contract and notes under 4,000 characters. Coverage answers all 17 entry points plus the accounting invariant and the manifest. Scratch tests were removed; only .imd-findings.json was written.","treeHash":null,"usage":{"cachedInputTokens":846670,"inputTokens":322,"model":"claude-fable-5-1","outputTokens":13776,"runtime":"claude","turns":19,"wallClockMs":417231}}],"verification":[{"checks":[{"durationMs":56166,"exitCode":0,"name":"build","output":"Compiling 58 files with Solc 0.8.26\nSolc 0.8.26 finished in 56.07s\nCompiler run successful!\n","passed":true},{"durationMs":54388,"exitCode":0,"name":"test","output":"No files changed, compilation skipped\n\nRan 2 tests for test/OracleConsumerConformance.t.sol:OracleConsumerConformanceTest\n[PASS] test_callbackSelectorIsCanonical() (gas: 4542)\n[PASS] test_digestMatchesTheProtocol() (gas: 13344)\nSuite result: ok. 2 passed; 0 failed; 0 skipped; finished in 627.90µs (193.66µs CPU time)\n\nRan 26 tests for test/Imdex5Revised.t.sol:Imdex5RevisedTest\n[PASS] testFuzz_mintFirstKeepsAPartialFillIdle(uint256,uint256) (runs: 256, μ: 1103744, ~: 1103775)\nLogs:\n  Bound result 994999999999999999999\n  Bound result 89775000000000000038\n\n[PASS] testFuzz_redeemToImdPaysADeadCoinExactlyAsRedeemDoes(uint256) (runs: 256, μ: 1989756, ~: 1995939)\nLogs:\n  Bound result 56237503\n\n[PASS] testFuzz_redeemToImdPaysAShortFillInKindUnderTheRedeemRule(uint256,uint256) (runs: 256, μ: 1827700, ~: 1828961)\nLogs:\n  Bound result 994000000000000004456\n  Bound result 56960\n\n[PASS] test_aCoinThatBurnsItsGasIsOwedAndTheIdleImdStillPaid() (gas: 1632576)\n[PASS] test_askAndCloseAtTheirExactBoundaries() (gas: 1201130)\n[PASS] test_askIsBlockedWhileAListAwaitsRebalance() (gas: 3280937)\n[PASS] test_claimThatFailsKeepsTheDebt() (gas: 1296929)\n[PASS] test_hookCannotCallSwapSelfOrTheOracleCallbacks() (gas: 3472662)\n[PASS] test_hookCannotCloseOrAnswerTheOpenRequestDuringASwap() (gas: 4124785)\n[PASS] test_lastRedeemerToImdTakesAllOfADeadCoin() (gas: 1753160)\n[PASS] test_margUsesItsOwnHookAndTheOthersShareG() (gas: 48921)\n[PASS] test_mintFirstPartialFillIsRedeemedProRataNotTwice() (gas: 1658817)\n[PASS] test_mintFirstRefusesAPoolThatReturnsNothingOnALargeAmount() (gas: 744341)\n[PASS] test_mintFirstRefusesDustThatBuysNothing() (gas: 2164385)\n[PASS] test_mintFirstRevertsWholeWhenTheHookMisbehaves() (gas: 992464196)\n[PASS] test_mintRevertsWholeWhenTheHookBurnsGasForTheIndex() (gas: 993090027)\n[PASS] test_mintRevertsWholeWhenTheHookLeavesADeltaUnsettled() (gas: 1342628)\n[PASS] test_mintSkipsAListCoinHeldAtZeroAndTheNextRebalanceBuysIt() (gas: 5525166)\n[PASS] test_onOracleResultNeedsExactlyFourAgreed() (gas: 1156026)\n[PASS] test_owedAccumulatesAcrossRedeemsAndIsPaidOnce() (gas: 2200225)\n[PASS] test_rebalanceSkipsEveryBurningSwapAndStillAdoptsTheList() (gas: 3717785)\n[PASS] test_redeemSurvivesFiveGasBurningCoinsWithOrdinaryGas() (gas: 5815698)\n[PASS] test_redeemToImdPaysInKindWhenTheHookLeavesADeltaUnsettled() (gas: 2231774)\n[PASS] test_submitRejectsALaunchWithoutAHookOrAToken() (gas: 1831635)\n[PASS] test_submitTakesAnAttestationOnce() (gas: 1455798)\n[PASS] test_submitUsesTheRegistryArtifactsNotTheStartingList() (gas: 1556962)\nSuite result: ok. 26 passed; 0 failed; 0 skipped; finished in 178.10ms (448.34ms CPU time)\n\nRan 5 tests for test/Imdex5ShortFill.t.sol:Imdex5ShortFillTest\n[PASS] testFuzz_mintUsesTheLeastFilledCoinAndChargesEveryBuy(uint256,uint16[5]) (runs: 256, μ: 1633057, ~: 1639789)\nLogs:\n  Bound result 1000000000000000002\n  Bound result 1493\n  Bound result 3908\n  Bound result 5533\n  Bound result 4780\n  Bound result 59\n\n[PASS] test_mintRevertsAndRollsBackEarlierBuysWhenACoinDeliversZero() (gas: 1284251)\n[PASS] test_mintRevertsWhenANonzeroFillRoundsSharesToZero() (gas: 1193597)\n[PASS] test_shortFillMintsTheDeliveredFraction() (gas: 866125)\n[PASS] test_shortFillStillEnforcesMaxImdInAndRollsBack() (gas: 1737074)\nSuite result: ok. 5 passed; 0 failed; 0 skipped; finished in 180.58ms (180.63ms CPU time)\n\nRan 33 tests for test/Imdex5Edges.t.sol:Imdex5EdgesTest\n[PASS] testFuzz_mintBuysExactlyTheRoundedUpShare(uint256) (runs: 512, μ: 1916173, ~: 1915999)\nLogs:\n  Bound result 4000000\n\n[PASS] testFuzz_mintFirstMintsExactlyTheRest(uint256) (runs: 512, μ: 1007952, ~: 1011589)\nLogs:\n  Bound result 3594\n\n[PASS] testFuzz_onOracleResultForAnotherRequestIsIgnored(bytes32,uint16) (runs: 256, μ: 1025502, ~: 1025617)\n[PASS] testFuzz_onOracleResultFromAStrangerChangesNothing(address,bytes32,uint16) (runs: 256, μ: 1072421, ~: 1072601)\n[PASS] testFuzz_redeemNeverPaysAboveProRata(uint256,uint256) (runs: 512, μ: 1557443, ~: 1558293)\nLogs:\n  Bound result 4999000000000000004305\n  Bound result 15850\n\n[PASS] testFuzz_splittingARedeemStaysUnderProRata(uint256,uint256) (runs: 256, μ: 1748648, ~: 1748911)\nLogs:\n  Bound result 4304\n  Bound result 15850\n\n[PASS] test_aLaterAskReplacesAnUnsubmittedAnswer() (gas: 1788380)\n[PASS] test_aReenteringCoinCannotReenterAndIsNotPaidTwice() (gas: 2668764)\n[PASS] test_aReenteringCoinCannotReenterMintOrRebalanceFromRedeem() (gas: 3857762)\n[PASS] test_askRevertsWholeWhenTheIntakeRefuses() (gas: 332004)\n[PASS] test_askThresholdIsExactlyThreeQuartersOfAnImd() (gas: 1099602)\n[PASS] test_closeRequestNeedsAnOpenOne() (gas: 1001574)\n[PASS] test_closingARequestDoesNotResetTheInterval() (gas: 1157502)\n[PASS] test_mintCannotBeFreeWhenTheIndexHoldsValue() (gas: 1764414)\n[PASS] test_onOracleResultAfterCloseIsIgnored() (gas: 1095692)\n[PASS] test_onOracleResultWithFiveEntriesFitsTheStipend() (gas: 1138426)\n[PASS] test_oneGasBurningCoinDoesNotBlockRedeemGivenGas() (gas: 1666511)\n[PASS] test_rebalanceBuyMovesAPoolAtMostTwoPercent() (gas: 3675405)\n[PASS] test_rebalanceBuyStopsAtAQuarterWeight() (gas: 4006566)\n[PASS] test_rebalanceDoesNotTrimWithFewerThanFourCoins() (gas: 3250977)\n[PASS] test_rebalanceSellMovesAPoolAtMostTwoPercent() (gas: 3277309)\n[PASS] test_rebalanceTrimsToAQuarterNotBelow() (gas: 3765711)\n[PASS] test_redeemHalfPercentStaysWithRemainingHolders() (gas: 1555481)\n[PASS] test_redeemIdleImdThatCannotBeSentIsOwed() (gas: 1393819)\n[PASS] test_redeemToATokenWithoutCodeBecomesOwedAndClaimableLater() (gas: 1265926)\n[PASS] test_residualsAreRedeemedAndBlockMintWhileTheirPoolIsDead() (gas: 5187110)\n[PASS] test_rewardsNeverDipIntoIdleImd() (gas: 2711693)\n[PASS] test_sharesTransferLikeAnyErc20AndMoveNoHoldings() (gas: 1462919)\n[PASS] test_submitAndRebalancePayNoRewardWithoutFees() (gas: 3233097)\n[PASS] test_submitRejectsATamperedAnswerEvenWithAValidSignatureElsewhere() (gas: 1133265)\n[PASS] test_submitRejectsAnAttestationSignedForAnotherChain() (gas: 1438036)\n[PASS] test_submitRejectsAnAttestationSignedForAnotherConsumer() (gas: 1103895)\n[PASS] test_submitRejectsMalformedAnswerBytes() (gas: 1341770)\nSuite result: ok. 33 passed; 0 failed; 0 skipped; finished in 197.89ms (925.53ms CPU time)\n\nRan 7 tests for test/Imdex5TaxedCoin.t.sol:Imdex5TaxedCoinTest\n[PASS] testFuzz_taxedCoinLifecycle(uint256,uint256,uint256) (runs: 256, μ: 7825993, ~: 7830766)\nLogs:\n  Bound result 499000000000000003093\n  Bound result 499000000000000001025\n  Bound result 899000000000000008856\n\n[PASS] test_firstMintCreditsOnlyWhatArrives() (gas: 1253136)\n[PASS] test_firstMintMinOutChecksTheNetReceipt() (gas: 1358483)\n[PASS] test_lastHolderCanReceiveEveryCoinAfterAnImdExit() (gas: 2639075)\n[PASS] test_outstandingOwedIsNotCountedAsANewReceiptAndRemainsClaimable() (gas: 5170057)\n[PASS] test_taxedCoinFullLifecycle() (gas: 7819529)\n[PASS] test_taxedRebalanceBuyCreditsOnlyNewReceipts() (gas: 5572349)\nSuite result: ok. 7 passed; 0 failed; 0 skipped; finished in 319.18ms (336.42ms CPU time)\n\nRan 45 tests for test/Imdex5.t.sol:Imdex5Test\n[PASS] testFuzz_mintThenRedeemNeverPaysMoreThanDeposited(uint256,uint256) (runs: 256, μ: 2401970, ~: 2410312)\nLogs:\n  Bound result 1253638085539977034323\n  Bound result 7357926\n\n[PASS] test_askPaysIntakeAndCaller() (gas: 1135679)\n[PASS] test_askReturnsWithoutFees() (gas: 155177)\n[PASS] test_askSevenDayInterval() (gas: 1185273)\n[PASS] test_bodyIsTheJsonTheBriefDescribes() (gas: 30515)\n[PASS] test_closeRequestAfterTwoDays() (gas: 1024939)\n[PASS] test_deployment() (gas: 94843)\n[PASS] test_feeImdOnlyLeavesForOracleAndRewards() (gas: 4919021)\n[PASS] test_fundAddsToFeeImd() (gas: 147774)\n[PASS] test_hookCannotReenter() (gas: 5127201)\n[PASS] test_mintBuysProportionallyAndRefunds() (gas: 1828097)\n[PASS] test_mintFirstBuysEqualPartsAndTakesFee() (gas: 1104040)\n[PASS] test_mintFirstKeepsWhatAPoolCouldNotTakeAsIdle() (gas: 1324784)\n[PASS] test_mintFirstRequiresZeroSupplyAndRightLength() (gas: 1021992)\n[PASS] test_mintFirstRevertsOnMinOut() (gas: 727125)\n[PASS] test_mintFirstRevertsWhenABuyFails() (gas: 814503)\n[PASS] test_mintFirstRevertsWhenABuyReturnsNothing() (gas: 2113144)\n[PASS] test_mintNeverIssuesSharesForNothing() (gas: 327765)\n[PASS] test_mintRequiresSupply() (gas: 40136)\n[PASS] test_mintRevertsOverMaxImdIn() (gas: 1730309)\n[PASS] test_mintRevertsWhenABuyFailsButScalesANonzeroShortFill() (gas: 2271266)\n[PASS] test_mintRoundsAgainstTheMinter() (gas: 1709386)\n[PASS] test_onOracleFailureOnlyFromIntake() (gas: 1062770)\n[PASS] test_onOracleResultStoresOnlyTheOpenRequestFromTheIntake() (gas: 1296306)\n[PASS] test_rebalanceNeedsAList() (gas: 41260)\n[PASS] test_rebalanceSellsAdoptsAndBuys() (gas: 5244826)\n[PASS] test_rebalanceSkipsADeadPool() (gas: 2973938)\n[PASS] test_rebalanceSkipsAHookThatLeavesAnUnsettledDelta() (gas: 3868662)\n[PASS] test_rebalanceSurvivesAHookThatBurnsAllGas() (gas: 5485027)\n[PASS] test_rebalanceTrimsAHoldingOverAQuarter() (gas: 3452338)\n[PASS] test_rebalanceWithNothingHeld() (gas: 2262505)\n[PASS] test_redeemCannotBeBlockedByACoin() (gas: 1575655)\n[PASS] test_redeemLastSharesPaysEverything() (gas: 2144373)\n[PASS] test_redeemPaysInKindLessHalfPercent() (gas: 1347370)\n[PASS] test_redeemRejectsZeroAndTooMany() (gas: 986018)\n[PASS] test_redeemSurvivesCoinsThatBurnAllGas() (gas: 4399571)\n[PASS] test_redeemToImdPaysAShortFillInKindLessHalfPercent() (gas: 1780752)\n[PASS] test_redeemToImdPaysInKindWhenASaleFails() (gas: 2970746)\n[PASS] test_redeemToImdRevertsBelowMinOut() (gas: 1786597)\n[PASS] test_redeemToImdSellsAndKeepsFee() (gas: 1753610)\n[PASS] test_redeemToImdSurvivesAHookThatBurnsGas() (gas: 2457667)\n[PASS] test_submitRejectsBadLists() (gas: 4557195)\n[PASS] test_submitRejectsWrongAnswerAndForgedSignature() (gas: 1635497)\n[PASS] test_submitStoresTheNextListAndRewards() (gas: 1523647)\n[PASS] test_unlockCallbackAndSwapSelfAreNotCallable() (gas: 103394)\nSuite result: ok. 45 passed; 0 failed; 0 skipped; finished in 319.25ms (277.47ms CPU time)\n\nRan 1 test for test/Imdex5.invariant.t.sol:Imdex5InvariantTest\n[PASS]\nImdex5InvariantTest invariants:\n[PASS] invariant_actorsNeverExtractMoreImdThanTheyPutIn\n[PASS] invariant_coinBalancesAreHeldPlusOwed\n[PASS] invariant_feeImdLeavesOnlyForTheOracleAndRewards\n[PASS] invariant_imdBalanceIsIdlePlusFeePlusOwed\n[PASS] invariant_listShape\n[PASS] invariant_noFreeMintWhileValueIsHeld\n[PASS] invariant_requestStateIsConsistent\n[PASS] invariant_zeroSupplyMeansNothingHeld\n Imdex5InvariantTest invariants (runs: 96, calls: 3840, reverts: 0)\n\n╭---------------+------------------+-------+---------+----------╮\n| Contract      | Selector         | Calls | Reverts | Discards |\n+===============================================================+\n| Imdex5Handler | ask              | 187   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | claim            | 201   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | closeRequest     | 187   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | deliverFailure   | 190   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | deliverResult    | 212   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | fund             | 188   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | mint             | 427   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | mintFirst        | 195   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | rebalance        | 207   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | redeem           | 221   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | redeemToImd      | 201   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setCoinFailMode  | 199   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setHookMisbehave | 218   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setPoolMaxIn     | 207   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | submit           | 206   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | togglePool       | 180   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | transferShares   | 222   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | warp             | 192   | 0       | 0        |\n╰---------------+------------------+-------+---------+----------╯\n\nLogs:\n  Bound result 63\n  Bound result 4242\n  Bound result 749999999999999999\n  Bound result 7168\n  Bound result 8736\n  Bound result 183307044961732093281\n\nSuite result: ok. 1 passed; 0 failed; 0 skipped; finished in 1.53s (1.53s CPU time)\n\nRan 1 test for test/Imdex5.invariant.t.sol:Imdex5TaxedCoinInvariantTest\n[PASS]\nImdex5TaxedCoinInvariantTest invariants:\n[PASS] invariant_actorsNeverExtractMoreImdThanTheyPutIn\n[PASS] invariant_coinBalancesAreHeldPlusOwed\n[PASS] invariant_feeImdLeavesOnlyForTheOracleAndRewards\n[PASS] invariant_imdBalanceIsIdlePlusFeePlusOwed\n[PASS] invariant_listShape\n[PASS] invariant_noFreeMintWhileValueIsHeld\n[PASS] invariant_requestStateIsConsistent\n[PASS] invariant_zeroSupplyMeansNothingHeld\n Imdex5TaxedCoinInvariantTest invariants (runs: 256, calls: 128000, reverts: 0)\n\n╭---------------+------------------+-------+---------+----------╮\n| Contract      | Selector         | Calls | Reverts | Discards |\n+===============================================================+\n| Imdex5Handler | ask              | 6674  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | claim            | 6709  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | closeRequest     | 6596  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | deliverFailure   | 6790  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | deliverResult    | 6737  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | fund             | 6740  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | mint             | 13506 | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | mintFirst        | 6723  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | rebalance        | 6694  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | redeem           | 6686  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | redeemToImd      | 6745  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setCoinFailMode  | 6719  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setHookMisbehave | 6673  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setPoolMaxIn     | 6874  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | submit           | 6821  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | togglePool       | 6846  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | transferShares   | 6783  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | warp             | 6684  | 0       | 0        |\n╰---------------+------------------+-------+---------+----------╯\n\nLogs:\n  Bound result 259200\n  Bound result 6765\n  Bound result 7\n  Bound result 499999999999999999995\n  Bound result 500000000000000000\n  Bound result 16443\n  Bound result 995000000000000000000\n  Bound result 11983\n  Bound result 17845\n  Bound result 770362672619782256389\n  Bound result 5781\n  Bound result 1\n  Bound result 9900\n  Bound result 235200\n  Bound result 15708\n  Bound result 16\n  Bound result 749999999999999999\n  Bound result 204800\n  Bound result 222809\n  Bound result 30000000\n  Bound result 86400\n  Bound result 549080\n  Bound result 32348688161332256026\n  Bound result 4087012224027472\n  Bound result 5086\n  Bound result 2989\n  Bound result 95911\n  Bound result 9\n  Bound result 20330184174085958498\n  Bound result 198000000000000000000\n  Bound result 4245\n  Bound result 15246\n  Bound result 5050\n  Bound result 18446744073709551616\n  Bound result 4746\n  Bound result 8258\n  Bound result 3451596882\n  Bound result 360952252958477371408\n  Bound result 2681\n  Bound result 10743\n  Bound result 356230389189871151643\n  Bound result 46000000000000000000\n  Bound result 35998462224112495958\n  Bound result 49999999999999999999\n  Bound result 246362405855981574245\n  Bound result 179200\n  Bound result 1000000000000000000007\n  Bound result 326073132280493232482\n  Bound result 16671\n  Bound result 262165895631560036161\n  Bound result 5777947278296771682\n  Bound result 469353047785685202333\n  Bound result 7050522208774116496\n  Bound result 3\n  Bound result 750000000000000000\n  Bound result 759350369237622786608\n  Bound result 9666\n  Bound result 267135152928642052519\n  Bound result 31242551756066888927\n  Bound result 194113\n  Bound result 50000000000000000000\n  Bound result 30146829961892664067\n  Bound result 12500\n  Bound result 31337\n  Bound result 566823\n  Bound result 300000000000000000000\n  Bound result 4149131482\n  Bound result 86699674470647\n  Bound result 400000000000000000000\n  Bound result 6863\n  Bound result 1000000000000000000000\n  Bound result 15493\n  Bound result 4\n  Bound result 282708526209578668\n  Bound result 24576\n  Bound result 18383\n  Bound result 31543972\n  Bound result 5920\n  Bound result 11\n  Bound result 499999999999999999997\n  Bound result 86400\n  Bound result 641024\n  Bound result 50000000000000000000\n  Bound result 13\n  Bound result 360\n  Bound result 7336\n  Bound result 999999999999999999994\n  Bound result 1207357094\n  Bound result 1283\n  Bound result 12322\n  Bound result 284935866042189488215\n  Bound result 499999999999999999941\n  Bound result 10\n  Bound result 254977\n  Bound result 1000000000000000000000\n  Bound result 50000000000000000000\n  Bound result 14\n  Bound result 613167\n  Bound result 2791189758\n  Bound result 561957\n  Bound result 9795\n  Bound result 17687\n  Bound result 532\n  Bound result 1250000000000000000\n\nSuite result: ok. 1 passed; 0 failed; 0 skipped; finished in 54.27s (54.26s CPU time)\n\nRan 8 test suites in 54.28s (57.00s CPU time): 120 tests passed, 0 failed, 0 skipped (120 total tests)\n","passed":true},{"durationMs":41,"exitCode":0,"name":"source-index","output":"{\"v\":1,\"entryPoints\":[\"Imdex5.approve(address,uint256)\",\"Imdex5.ask()\",\"Imdex5.claim(address)\",\"Imdex5.closeRequest()\",\"Imdex5.fund(uint256)\",\"Imdex5.mint(uint256,uint256)\",\"Imdex5.mintFirst(uint256,uint256[])\",\"Imdex5.onOracleFailure(bytes32,uint8,bytes32,uint16,uint16,bytes)\",\"Imdex5.onOracleResult(bytes32,(bytes32,uint256,bytes32,uint8,bytes,uint256,uint64,uint64,bytes32,bytes32,uint16,uint16,uint16,uint64,uint64),bytes)\",\"Imdex5.rebalance()\",\"Imdex5.redeem(uint256)\",\"Imdex5.redeemToImd(uint256,uint256)\",\"Imdex5.submit((bytes32,uint256,bytes32,uint8,bytes,uint256,uint64,uint64,bytes32,bytes32,uint16,uint16,uint16,uint64,uint64),bytes)\",\"Imdex5.swapSelf(address,address,bool,uint256,bool,bool)\",\"Imdex5.transfer(address,uint256)\",\"Imdex5.transferFrom(address,address,uint256)\",\"Imdex5.unlockCallback(bytes)\"],\"files\":{\".gitignore\":2,\"ADAPTATION.md\":106,\"README.md\":244,\"foundry.toml\":19,\"launch.json\":10,\"src/Imdex5.sol\":623,\"src/Interfaces.sol\":61,\"src/OracleAttestation.sol\":221,\"test/Imdex5.invariant.t.sol\":508,\"test/Imdex5.t.sol\":1017,\"test/Imdex5Base.sol\":174,\"test/Imdex5Edges.t.sol\":673,\"test/Imdex5Revised.t.sol\":503,\"test/Imdex5ShortFill.t.sol\":135,\"test/Imdex5TaxedCoin.t.sol\":246,\"test/OracleConsumerConformance.t.sol\":74,\"test/mocks/AttackMocks.sol\":85,\"test/mocks/Mocks.sol\":337,\"test/mocks/PoolTaxERC20.sol\":25},\"excluded\":[\"lib/\",\"node_modules/\"],\"truncated\":false}","passed":true}],"detail":"all checks passed","evaluation":"checks","profile":"foundry","status":"accepted","submissionHash":"2cdd1182e923f28dd177e0ae1812d265c8088103870ba08783a36b07eb1cbdac","verifiedTreeHash":"c5b6d7c35d354661255818ab44d769a6edee19ef","verifierVersion":"0.1.0+7129bf9d"},{"checks":[{"durationMs":94543,"exitCode":0,"name":"build","output":"Compiling 58 files with Solc 0.8.26\nSolc 0.8.26 finished in 94.29s\nCompiler run successful!\n","passed":true},{"durationMs":77796,"exitCode":0,"name":"test","output":"No files changed, compilation skipped\n\nRan 2 tests for test/OracleConsumerConformance.t.sol:OracleConsumerConformanceTest\n[PASS] test_callbackSelectorIsCanonical() (gas: 4542)\n[PASS] test_digestMatchesTheProtocol() (gas: 13344)\nSuite result: ok. 2 passed; 0 failed; 0 skipped; finished in 13.05ms (1.07ms CPU time)\n\nRan 26 tests for test/Imdex5Revised.t.sol:Imdex5RevisedTest\n[PASS] testFuzz_mintFirstKeepsAPartialFillIdle(uint256,uint256) (runs: 256, μ: 1103740, ~: 1103775)\nLogs:\n  Bound result 4000000000000000000992\n  Bound result 98000000000000000000\n\n[PASS] testFuzz_redeemToImdPaysADeadCoinExactlyAsRedeemDoes(uint256) (runs: 256, μ: 1990136, ~: 1995917)\nLogs:\n  Bound result 1250000000000000000\n\n[PASS] testFuzz_redeemToImdPaysAShortFillInKindUnderTheRedeemRule(uint256,uint256) (runs: 256, μ: 1827698, ~: 1828967)\nLogs:\n  Bound result 994000000000000004420\n  Bound result 15771\n\n[PASS] test_aCoinThatBurnsItsGasIsOwedAndTheIdleImdStillPaid() (gas: 1632576)\n[PASS] test_askAndCloseAtTheirExactBoundaries() (gas: 1205540)\n[PASS] test_askIsBlockedWhileAListAwaitsRebalance() (gas: 3285347)\n[PASS] test_claimThatFailsKeepsTheDebt() (gas: 1296929)\n[PASS] test_hookCannotCallSwapSelfOrTheOracleCallbacks() (gas: 3474867)\n[PASS] test_hookCannotCloseOrAnswerTheOpenRequestDuringASwap() (gas: 4127000)\n[PASS] test_lastRedeemerToImdTakesAllOfADeadCoin() (gas: 1753160)\n[PASS] test_margUsesItsOwnHookAndTheOthersShareG() (gas: 48921)\n[PASS] test_mintFirstPartialFillIsRedeemedProRataNotTwice() (gas: 1658817)\n[PASS] test_mintFirstRefusesAPoolThatReturnsNothingOnALargeAmount() (gas: 744341)\n[PASS] test_mintFirstRefusesDustThatBuysNothing() (gas: 2164385)\n[PASS] test_mintFirstRevertsWholeWhenTheHookMisbehaves() (gas: 992464196)\n[PASS] test_mintRevertsWholeWhenTheHookBurnsGasForTheIndex() (gas: 993090032)\n[PASS] test_mintRevertsWholeWhenTheHookLeavesADeltaUnsettled() (gas: 1342632)\n[PASS] test_mintSkipsAListCoinHeldAtZeroAndTheNextRebalanceBuysIt() (gas: 5529580)\n[PASS] test_onOracleResultNeedsExactlyFourAgreed() (gas: 1158231)\n[PASS] test_owedAccumulatesAcrossRedeemsAndIsPaidOnce() (gas: 2200225)\n[PASS] test_rebalanceSkipsEveryBurningSwapAndStillAdoptsTheList() (gas: 3719990)\n[PASS] test_redeemSurvivesFiveGasBurningCoinsWithOrdinaryGas() (gas: 5815698)\n[PASS] test_redeemToImdPaysInKindWhenTheHookLeavesADeltaUnsettled() (gas: 2231774)\n[PASS] test_submitRejectsALaunchWithoutAHookOrAToken() (gas: 1851145)\n[PASS] test_submitTakesAnAttestationOnce() (gas: 1458003)\n[PASS] test_submitUsesTheRegistryArtifactsNotTheStartingList() (gas: 1559167)\nSuite result: ok. 26 passed; 0 failed; 0 skipped; finished in 330.42ms (943.54ms CPU time)\n\nRan 7 tests for test/Imdex5ShortFill.t.sol:Imdex5ShortFillTest\n[PASS] testFuzz_mintUsesTheLeastFilledCoinAndChargesEveryBuy(uint256,uint16[5]) (runs: 256, μ: 1632734, ~: 1639454)\nLogs:\n  Bound result 1999999999999999998\n  Bound result 16\n  Bound result 9795\n  Bound result 3349\n  Bound result 6617\n  Bound result 3\n\n[PASS] test_mintRevertsAndRollsBackEarlierBuysWhenACoinDeliversZero() (gas: 1284256)\n[PASS] test_mintRevertsWhenANonzeroFillRoundsSharesToZero() (gas: 1193602)\n[PASS] test_shortFillChargesIdleImdForTheSharesIssuedOnly() (gas: 2598220)\n[PASS] test_shortFillMintsTheDeliveredFraction() (gas: 866129)\n[PASS] test_shortFillStillEnforcesMaxImdInAndRollsBack() (gas: 1737103)\n[PASS] test_sliverFillIssuesASliverAndChargesEveryBuy() (gas: 1284816)\nSuite result: ok. 7 passed; 0 failed; 0 skipped; finished in 368.32ms (361.17ms CPU time)\n\nRan 34 tests for test/Imdex5Edges.t.sol:Imdex5EdgesTest\n[PASS] testFuzz_mintBuysExactlyTheRoundedUpShare(uint256) (runs: 512, μ: 1916173, ~: 1915994)\nLogs:\n  Bound result 20796\n\n[PASS] testFuzz_mintFirstMintsExactlyTheRest(uint256) (runs: 512, μ: 1007733, ~: 1011580)\nLogs:\n  Bound result 4999999999999999999999\n\n[PASS] testFuzz_onOracleResultForAnotherRequestIsIgnored(bytes32,uint16) (runs: 256, μ: 1027733, ~: 1027844)\n[PASS] testFuzz_onOracleResultFromAStrangerChangesNothing(address,bytes32,uint16) (runs: 256, μ: 1074641, ~: 1074828)\n[PASS] testFuzz_redeemNeverPaysAboveProRata(uint256,uint256) (runs: 512, μ: 1557262, ~: 1558293)\nLogs:\n  Bound result 2660511380455133845832\n  Bound result 501212658599702984752\n\n[PASS] testFuzz_splittingARedeemStaysUnderProRata(uint256,uint256) (runs: 256, μ: 1748656, ~: 1748911)\nLogs:\n  Bound result 376929326866417176471\n  Bound result 7357926\n\n[PASS] test_aLaterAskReplacesAnUnsubmittedAnswer() (gas: 1880577)\n[PASS] test_aReenteringCoinCannotReenterAndIsNotPaidTwice() (gas: 2668786)\n[PASS] test_aReenteringCoinCannotReenterMintOrRebalanceFromRedeem() (gas: 3859967)\n[PASS] test_anUnsubmittedAnswerDoesNotSurviveAFailedLaterAsk() (gas: 1353192)\n[PASS] test_askRevertsWholeWhenTheIntakeRefuses() (gas: 334231)\n[PASS] test_askThresholdIsExactlyThreeQuartersOfAnImd() (gas: 1101807)\n[PASS] test_closeRequestNeedsAnOpenOne() (gas: 1003779)\n[PASS] test_closingARequestDoesNotResetTheInterval() (gas: 1161912)\n[PASS] test_mintCannotBeFreeWhenTheIndexHoldsValue() (gas: 1764420)\n[PASS] test_onOracleResultAfterCloseIsIgnored() (gas: 1097888)\n[PASS] test_onOracleResultWithFiveEntriesFitsTheStipend() (gas: 1140653)\n[PASS] test_oneGasBurningCoinDoesNotBlockRedeemGivenGas() (gas: 1666511)\n[PASS] test_rebalanceBuyMovesAPoolAtMostTwoPercent() (gas: 3677632)\n[PASS] test_rebalanceBuyStopsAtAQuarterWeight() (gas: 4008771)\n[PASS] test_rebalanceDoesNotTrimWithFewerThanFourCoins() (gas: 3253182)\n[PASS] test_rebalanceSellMovesAPoolAtMostTwoPercent() (gas: 3279514)\n[PASS] test_rebalanceTrimsToAQuarterNotBelow() (gas: 3767904)\n[PASS] test_redeemHalfPercentStaysWithRemainingHolders() (gas: 1555503)\n[PASS] test_redeemIdleImdThatCannotBeSentIsOwed() (gas: 1393841)\n[PASS] test_redeemToATokenWithoutCodeBecomesOwedAndClaimableLater() (gas: 1265948)\n[PASS] test_residualsAreRedeemedAndBlockMintWhileTheirPoolIsDead() (gas: 5189324)\n[PASS] test_rewardsNeverDipIntoIdleImd() (gas: 2713898)\n[PASS] test_sharesTransferLikeAnyErc20AndMoveNoHoldings() (gas: 1462919)\n[PASS] test_submitAndRebalancePayNoRewardWithoutFees() (gas: 3235302)\n[PASS] test_submitRejectsATamperedAnswerEvenWithAValidSignatureElsewhere() (gas: 1135492)\n[PASS] test_submitRejectsAnAttestationSignedForAnotherChain() (gas: 1440241)\n[PASS] test_submitRejectsAnAttestationSignedForAnotherConsumer() (gas: 1106100)\n[PASS] test_submitRejectsMalformedAnswerBytes() (gas: 1344202)\nSuite result: ok. 34 passed; 0 failed; 0 skipped; finished in 375.76ms (1.71s CPU time)\n\nRan 45 tests for test/Imdex5.t.sol:Imdex5Test\n[PASS] testFuzz_mintThenRedeemNeverPaysMoreThanDeposited(uint256,uint256) (runs: 256, μ: 2402333, ~: 2410300)\nLogs:\n  Bound result 1253638085539977034323\n  Bound result 7357926\n\n[PASS] test_askPaysIntakeAndCaller() (gas: 1137884)\n[PASS] test_askReturnsWithoutFees() (gas: 155177)\n[PASS] test_askSevenDayInterval() (gas: 1189683)\n[PASS] test_bodyIsTheJsonTheBriefDescribes() (gas: 30515)\n[PASS] test_closeRequestAfterTwoDays() (gas: 1027144)\n[PASS] test_deployment() (gas: 94843)\n[PASS] test_feeImdOnlyLeavesForOracleAndRewards() (gas: 4921231)\n[PASS] test_fundAddsToFeeImd() (gas: 147774)\n[PASS] test_hookCannotReenter() (gas: 5129411)\n[PASS] test_mintBuysProportionallyAndRefunds() (gas: 1828102)\n[PASS] test_mintFirstBuysEqualPartsAndTakesFee() (gas: 1104040)\n[PASS] test_mintFirstKeepsWhatAPoolCouldNotTakeAsIdle() (gas: 1324784)\n[PASS] test_mintFirstRequiresZeroSupplyAndRightLength() (gas: 1021992)\n[PASS] test_mintFirstRevertsOnMinOut() (gas: 727125)\n[PASS] test_mintFirstRevertsWhenABuyFails() (gas: 814503)\n[PASS] test_mintFirstRevertsWhenABuyReturnsNothing() (gas: 2113144)\n[PASS] test_mintNeverIssuesSharesForNothing() (gas: 327771)\n[PASS] test_mintRequiresSupply() (gas: 40136)\n[PASS] test_mintRevertsOverMaxImdIn() (gas: 1730313)\n[PASS] test_mintRevertsWhenABuyFailsButScalesANonzeroShortFill() (gas: 2271275)\n[PASS] test_mintRoundsAgainstTheMinter() (gas: 1709391)\n[PASS] test_onOracleFailureOnlyFromIntake() (gas: 1064975)\n[PASS] test_onOracleResultStoresOnlyTheOpenRequestFromTheIntake() (gas: 1298511)\n[PASS] test_rebalanceNeedsAList() (gas: 41260)\n[PASS] test_rebalanceSellsAdoptsAndBuys() (gas: 5249236)\n[PASS] test_rebalanceSkipsADeadPool() (gas: 2976143)\n[PASS] test_rebalanceSkipsAHookThatLeavesAnUnsettledDelta() (gas: 3873072)\n[PASS] test_rebalanceSurvivesAHookThatBurnsAllGas() (gas: 5487232)\n[PASS] test_rebalanceTrimsAHoldingOverAQuarter() (gas: 3454543)\n[PASS] test_rebalanceWithNothingHeld() (gas: 2264710)\n[PASS] test_redeemCannotBeBlockedByACoin() (gas: 1575655)\n[PASS] test_redeemLastSharesPaysEverything() (gas: 2144373)\n[PASS] test_redeemPaysInKindLessHalfPercent() (gas: 1347370)\n[PASS] test_redeemRejectsZeroAndTooMany() (gas: 986018)\n[PASS] test_redeemSurvivesCoinsThatBurnAllGas() (gas: 4399571)\n[PASS] test_redeemToImdPaysAShortFillInKindLessHalfPercent() (gas: 1780752)\n[PASS] test_redeemToImdPaysInKindWhenASaleFails() (gas: 2970746)\n[PASS] test_redeemToImdRevertsBelowMinOut() (gas: 1786597)\n[PASS] test_redeemToImdSellsAndKeepsFee() (gas: 1753610)\n[PASS] test_redeemToImdSurvivesAHookThatBurnsGas() (gas: 2457667)\n[PASS] test_submitRejectsBadLists() (gas: 4697840)\n[PASS] test_submitRejectsWrongAnswerAndForgedSignature() (gas: 1637702)\n[PASS] test_submitStoresTheNextListAndRewards() (gas: 1525852)\n[PASS] test_unlockCallbackAndSwapSelfAreNotCallable() (gas: 103394)\nSuite result: ok. 45 passed; 0 failed; 0 skipped; finished in 375.90ms (480.45ms CPU time)\n\nRan 7 tests for test/Imdex5TaxedCoin.t.sol:Imdex5TaxedCoinTest\n[PASS] testFuzz_taxedCoinLifecycle(uint256,uint256,uint256) (runs: 256, μ: 7858339, ~: 7863296)\nLogs:\n  Bound result 499000000000000003110\n  Bound result 499000000000891469776\n  Bound result 899000000000000008848\n\n[PASS] test_firstMintCreditsOnlyWhatArrives() (gas: 1253132)\n[PASS] test_firstMintMinOutChecksTheNetReceipt() (gas: 1358480)\n[PASS] test_lastHolderCanReceiveEveryCoinAfterAnImdExit() (gas: 2639071)\n[PASS] test_outstandingOwedIsNotCountedAsANewReceiptAndRemainsClaimable() (gas: 5186203)\n[PASS] test_taxedCoinFullLifecycle() (gas: 7852114)\n[PASS] test_taxedRebalanceBuyCreditsOnlyNewReceipts() (gas: 5574549)\nSuite result: ok. 7 passed; 0 failed; 0 skipped; finished in 488.93ms (498.79ms CPU time)\n\nRan 1 test for test/Imdex5.invariant.t.sol:Imdex5InvariantTest\n[PASS]\nImdex5InvariantTest invariants:\n[PASS] invariant_actorsNeverExtractMoreImdThanTheyPutIn\n[PASS] invariant_coinBalancesAreHeldPlusOwed\n[PASS] invariant_feeImdLeavesOnlyForTheOracleAndRewards\n[PASS] invariant_imdBalanceIsIdlePlusFeePlusOwed\n[PASS] invariant_listShape\n[PASS] invariant_noFreeMintWhileValueIsHeld\n[PASS] invariant_requestStateIsConsistent\n[PASS] invariant_zeroSupplyMeansNothingHeld\n Imdex5InvariantTest invariants (runs: 96, calls: 3840, reverts: 0)\n\n╭---------------+------------------+-------+---------+----------╮\n| Contract      | Selector         | Calls | Reverts | Discards |\n+===============================================================+\n| Imdex5Handler | ask              | 187   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | claim            | 201   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | closeRequest     | 187   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | deliverFailure   | 190   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | deliverResult    | 212   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | fund             | 188   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | mint             | 427   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | mintFirst        | 195   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | rebalance        | 207   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | redeem           | 221   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | redeemToImd      | 201   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setCoinFailMode  | 199   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setHookMisbehave | 218   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setPoolMaxIn     | 207   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | submit           | 206   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | togglePool       | 180   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | transferShares   | 222   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | warp             | 192   | 0       | 0        |\n╰---------------+------------------+-------+---------+----------╯\n\nLogs:\n  Bound result 63\n  Bound result 4245\n  Bound result 100000000000000000007\n  Bound result 7168\n  Bound result 8567\n  Bound result 183307044961732093281\n\nSuite result: ok. 1 passed; 0 failed; 0 skipped; finished in 2.18s (2.15s CPU time)\n\nRan 1 test for test/Imdex5.invariant.t.sol:Imdex5TaxedCoinInvariantTest\n[PASS]\nImdex5TaxedCoinInvariantTest invariants:\n[PASS] invariant_actorsNeverExtractMoreImdThanTheyPutIn\n[PASS] invariant_coinBalancesAreHeldPlusOwed\n[PASS] invariant_feeImdLeavesOnlyForTheOracleAndRewards\n[PASS] invariant_imdBalanceIsIdlePlusFeePlusOwed\n[PASS] invariant_listShape\n[PASS] invariant_noFreeMintWhileValueIsHeld\n[PASS] invariant_requestStateIsConsistent\n[PASS] invariant_zeroSupplyMeansNothingHeld\n Imdex5TaxedCoinInvariantTest invariants (runs: 256, calls: 128000, reverts: 0)\n\n╭---------------+------------------+-------+---------+----------╮\n| Contract      | Selector         | Calls | Reverts | Discards |\n+===============================================================+\n| Imdex5Handler | ask              | 6674  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | claim            | 6709  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | closeRequest     | 6596  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | deliverFailure   | 6790  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | deliverResult    | 6737  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | fund             | 6740  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | mint             | 13506 | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | mintFirst        | 6723  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | rebalance        | 6694  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | redeem           | 6686  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | redeemToImd      | 6745  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setCoinFailMode  | 6719  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setHookMisbehave | 6673  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setPoolMaxIn     | 6874  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | submit           | 6821  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | togglePool       | 6846  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | transferShares   | 6783  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | warp             | 6684  | 0       | 0        |\n╰---------------+------------------+-------+---------+----------╯\n\nLogs:\n  Bound result 9795\n  Bound result 6730\n  Bound result 2000000000000000000\n  Bound result 9950\n  Bound result 500000000000000000\n  Bound result 16586\n  Bound result 1000000000000000000000\n  Bound result 16054\n  Bound result 18601\n  Bound result 770362672619782256389\n  Bound result 6025\n  Bound result 13818\n  Bound result 1000000\n  Bound result 537600\n  Bound result 15885\n  Bound result 16\n  Bound result 5\n  Bound result 409600\n  Bound result 222809\n  Bound result 48500000000000000000\n  Bound result 2000000000000000000\n  Bound result 710\n  Bound result 32348688161332256026\n  Bound result 4087012224027472\n  Bound result 5139\n  Bound result 4242\n  Bound result 486400\n  Bound result 11\n  Bound result 20330184174085958498\n  Bound result 2500000\n  Bound result 30000000\n  Bound result 15424\n  Bound result 5022\n  Bound result 8000000\n  Bound result 5815\n  Bound result 8447\n  Bound result 3451596883\n  Bound result 360952252958477371408\n  Bound result 2681\n  Bound result 10425\n  Bound result 3182\n  Bound result 3000000\n  Bound result 35998462224112495958\n  Bound result 49999999999999999999\n  Bound result 246362405855981574245\n  Bound result 179200\n  Bound result 10205\n  Bound result 6092\n  Bound result 110234333066556236641\n  Bound result 262165895631560036161\n  Bound result 42641801433514536033\n  Bound result 469353047785685202333\n  Bound result 7050522208774116496\n  Bound result 3\n  Bound result 50000000000000000000\n  Bound result 759350369237622786608\n  Bound result 1732954822965573246594\n  Bound result 267135152928642052519\n  Bound result 31242551756066888927\n  Bound result 194113\n  Bound result 50000000000000000000\n  Bound result 19995\n  Bound result 60\n  Bound result 9795\n  Bound result 566823\n  Bound result 749999999999999999\n  Bound result 1344\n  Bound result 86699674470647\n  Bound result 400000000000000000000\n  Bound result 7147\n  Bound result 189000000000000000000\n  Bound result 2221\n  Bound result 4\n  Bound result 282708526209578668\n  Bound result 50000000000000000000\n  Bound result 18626\n  Bound result 31543972\n  Bound result 6765\n  Bound result 13\n  Bound result 500000000000000000000\n  Bound result 358400\n  Bound result 641024\n  Bound result 39000000000000000000\n  Bound result 15\n  Bound result 888\n  Bound result 6830\n  Bound result 98000000000000000000\n  Bound result 1207357094\n  Bound result 737\n  Bound result 516309571264052353882\n  Bound result 284935866042189488215\n  Bound result 8\n  Bound result 11\n  Bound result 329172\n  Bound result 2500000\n  Bound result 46000000000000000000\n  Bound result 15\n  Bound result 437092\n  Bound result 13798\n  Bound result 18288\n  Bound result 24\n  Bound result 1632\n  Bound result 532\n  Bound result 2989\n\nSuite result: ok. 1 passed; 0 failed; 0 skipped; finished in 77.58s (77.56s CPU time)\n\nRan 8 test suites in 77.59s (81.71s CPU time): 123 tests passed, 0 failed, 0 skipped (123 total tests)\n","passed":true},{"durationMs":97,"exitCode":0,"name":"source-index","output":"{\"v\":1,\"entryPoints\":[\"Imdex5.approve(address,uint256)\",\"Imdex5.ask()\",\"Imdex5.claim(address)\",\"Imdex5.closeRequest()\",\"Imdex5.fund(uint256)\",\"Imdex5.mint(uint256,uint256)\",\"Imdex5.mintFirst(uint256,uint256[])\",\"Imdex5.onOracleFailure(bytes32,uint8,bytes32,uint16,uint16,bytes)\",\"Imdex5.onOracleResult(bytes32,(bytes32,uint256,bytes32,uint8,bytes,uint256,uint64,uint64,bytes32,bytes32,uint16,uint16,uint16,uint64,uint64),bytes)\",\"Imdex5.rebalance()\",\"Imdex5.redeem(uint256)\",\"Imdex5.redeemToImd(uint256,uint256)\",\"Imdex5.submit((bytes32,uint256,bytes32,uint8,bytes,uint256,uint64,uint64,bytes32,bytes32,uint16,uint16,uint16,uint64,uint64),bytes)\",\"Imdex5.swapSelf(address,address,bool,uint256,bool,bool)\",\"Imdex5.transfer(address,uint256)\",\"Imdex5.transferFrom(address,address,uint256)\",\"Imdex5.unlockCallback(bytes)\"],\"files\":{\".gitignore\":2,\"ADAPTATION.md\":161,\"README.md\":266,\"foundry.toml\":19,\"launch.json\":10,\"src/Imdex5.sol\":625,\"src/Interfaces.sol\":61,\"src/OracleAttestation.sol\":221,\"test/Imdex5.invariant.t.sol\":513,\"test/Imdex5.t.sol\":1017,\"test/Imdex5Base.sol\":174,\"test/Imdex5Edges.t.sol\":709,\"test/Imdex5Revised.t.sol\":503,\"test/Imdex5ShortFill.t.sol\":205,\"test/Imdex5TaxedCoin.t.sol\":252,\"test/OracleConsumerConformance.t.sol\":74,\"test/mocks/AttackMocks.sol\":85,\"test/mocks/Mocks.sol\":337,\"test/mocks/PoolTaxERC20.sol\":25},\"excluded\":[\"lib/\",\"node_modules/\"],\"truncated\":false}","passed":true},{"durationMs":8328,"exitCode":0,"name":"slither","output":"[high/medium] reentrancy-balance at src/Imdex5.sol:368: Reentrancy in Imdex5._mintFirst(address,uint256,uint256[]) (src/Imdex5.sol#368-387):\n[high/medium] reentrancy-balance at src/Imdex5.sol:389: Reentrancy in Imdex5._mintMore(address,uint256,uint256) (src/Imdex5.sol#389-416):\n[medium/high] incorrect-equality at src/Imdex5.sol:418: Imdex5._redeemToImd(address,uint256,uint256,uint256) (src/Imdex5.sol#418-446) uses a dangerous strict equality:\n[medium/high] incorrect-equality at src/Imdex5.sol:567: Imdex5._value(address,uint256) (src/Imdex5.sol#567-572) uses a dangerous strict equality:\n[medium/high] incorrect-equality at src/Imdex5.sol:592: Imdex5._pay(address,address,uint256) (src/Imdex5.sol#592-604) uses a dangerous strict equality:\n[medium/high] incorrect-equality at src/Imdex5.sol:389: Imdex5._mintMore(address,uint256,uint256) (src/Imdex5.sol#389-416) uses a dangerous strict equality:\n[medium/high] incorrect-equality at src/Imdex5.sol:368: Imdex5._mintFirst(address,uint256,uint256[]) (src/Imdex5.sol#368-387) uses a dangerous strict equality:\n[medium/high] incorrect-equality at src/Imdex5.sol:592: Imdex5._pay(address,address,uint256) (src/Imdex5.sol#592-604) uses a dangerous strict equality:\n[medium/high] incorrect-equality at src/Imdex5.sol:592: Imdex5._pay(address,address,uint256) (src/Imdex5.sol#592-604) uses a dangerous strict equality:\n[medium/medium] reentrancy-no-eth at src/Imdex5.sol:200: Reentrancy in Imdex5.redeem(uint256) (src/Imdex5.sol#200-221):\n[medium/medium] reentrancy-no-eth at src/Imdex5.sol:448: Reentrancy in Imdex5._rebalance() (src/Imdex5.sol#448-494):\n[medium/medium] reentrancy-no-eth at src/Imdex5.sol:448: Reentrancy in Imdex5._rebalance() (src/Imdex5.sol#448-494):\n[medium/medium] reentrancy-no-eth at src/Imdex5.sol:368: Reentrancy in Imdex5._mintFirst(address,uint256,uint256[]) (src/Imdex5.sol#368-387):\n[medium/medium] reentrancy-no-eth at src/Imdex5.sol:448: Reentrancy in Imdex5._rebalance() (src/Imdex5.sol#448-494):\n[medium/medium] reentrancy-no-eth at src/Imdex5.sol:418: Reentrancy in Imdex5._redeemToImd(address,uint256,uint256,uint256) (src/Imdex5.sol#418-446):\n[medium/medium] uninitialized-local at src/Imdex5.sol:614: Imdex5._lookup(uint64).registry (src/Imdex5.sol#614) is a local variable never initialized\n[medium/medium] unused-return at src/Imdex5.sol:177: Imdex5.mintFirst(uint256,uint256[]) (src/Imdex5.sol#177-183) ignores return value by IPoolManager(POOL_MANAGER).unlock(abi.encode(Op.MintFirst,msg.sender,imdIn,0,0,minOut)) (src/Imdex5.sol#182)\n[medium/medium] unused-return at src/Imdex5.sol:519: Imdex5._swap(address,address,bool,uint256,bool,bool) (src/Imdex5.sol#519-554) ignores return value by IPoolManager(POOL_MANAGER).settle() (src/Imdex5.sol#544)\n[medium/medium] unused-return at src/Imdex5.sol:226: Imdex5.redeemToImd(uint256,uint256) (src/Imdex5.sol#226-232) ignores return value by IPoolManager(POOL_MANAGER).unlock(abi.encode(Op.RedeemToImd,msg.sender,shares,minImdOut,supply,new uint256[](0))) (src/Imdex5.sol#230-231)\n[medium/medium] unused-return at src/Imdex5.sol:190: Imdex5.mint(uint256,uint256) (src/Imdex5.sol#190-195) ignores return value by IPoolManager(POOL_MANAGER).unlock(abi.encode(Op.Mint,msg.sender,shares,maxImdIn,0,new uint256[](0))) (src/Imdex5.sol#194)\n[medium/medium] unused-return at src/Imdex5.sol:336: Imdex5.rebalance() (src/Imdex5.sol#336-341) ignores return value by IPoolManager(POOL_MANAGER).unlock(abi.encode(Op.Rebalance,msg.sender,0,0,0,new uint256[](0))) (src/Imdex5.sol#338)\n[low/medium] calls-loop at src/Imdex5.sol:519: Imdex5._swap(address,address,bool,uint256,bool,bool) (src/Imdex5.sol#519-554) has external calls inside a loop: before = IERC20(outCur).balanceOf(address(this)) (src/Imdex5.sol#547)\n[low/medium] calls-loop at src/Imdex5.sol:418: Imdex5._redeemToImd(address,uint256,uint256,uint256) (src/Imdex5.sol#418-446) has external calls inside a loop: (amountIn,sold) = this.swapSelf{gas: SWAP_GAS}(coin.token,coin.hook,false,amount,false,false) (src/Imdex5.sol#427-435)\n[low/medium] calls-loop at src/Imdex5.sol:561: Imdex5._sqrtPrice(IPoolManager.PoolKey) (src/Imdex5.sol#561-564) has external calls inside a loop: uint256(uint160(uint256(IPoolManager(POOL_MANAGER).extsload(slot)))) (src/Imdex5.sol#563)\n[low/medium] calls-loop at src/Imdex5.sol:519: Imdex5._swap(address,address,bool,uint256,bool,bool) (src/Imdex5.sol#519-554) has external calls inside a loop: IPoolManager(POOL_MANAGER).settle() (src/Imdex5.sol#544)\n[low/medium] calls-loop at src/Imdex5.sol:592: Imdex5._pay(address,address,uint256) (src/Imdex5.sol#592-604) has external calls inside a loop: (ok,ret) = token.call{gas: PAY_GAS}(abi.encodeCall(IERC20.transfer,(to,amount))) (src/Imdex5.sol#595)\n[low/medium] calls-loop at src/Imdex5.sol:519: Imdex5._swap(address,address,bool,uint256,bool,bool) (src/Imdex5.sol#519-554) has external calls inside a loop: amountOut = IERC20(outCur).balanceOf(address(this)) - before (src/Imdex5.sol#549)\n[low/medium] calls-loop at src/Imdex5.sol:519: Imdex5._swap(address,address,bool,uint256,bool,bool) (src/Imdex5.sol#519-554) has external calls inside a loop: IPoolManager(POOL_MANAGER).sync(inCur) (src/Imdex5.sol#542)\n[low/medium] calls-loop at src/Imdex5.sol:613: Imdex5._lookup(uint64) (src/Imdex5.sol#613-624) has external calls inside a loop: REGISTRY_B.isRecorded(launch) (src/Imdex5.sol#616)\n[low/medium] calls-loop at src/Imdex5.sol:613: Imdex5._lookup(uint64) (src/Imdex5.sol#613-624) has external calls inside a loop: REGISTRY_A.isRecorded(launch) (src/Imdex5.sol#615)\n[low/medium] calls-loop at src/Imdex5.sol:519: Imdex5._swap(address,address,bool,uint256,bool,bool) (src/Imdex5.sol#519-554) has external calls inside a loop: delta = IPoolManager(POOL_MANAGER).swap(key,IPoolManager.SwapParams(zeroForOne,int256(amount),limit),) (src/Imdex5.sol#531-532)\n[low/medium] calls-loop at src/Imdex5.sol:497: Imdex5._trySell(Imdex5.Coin,uint256) (src/Imdex5.sol#497-506) has external calls inside a loop: (amountIn,out) = this.swapSelf{gas: SWAP_GAS}(coin.token,coin.hook,false,amount,false,true) (src/Imdex5.sol#498-505)\n[low/medium] calls-loop at src/Imdex5.sol:519: Imdex5._swap(address,address,bool,uint256,bool,bool) (src/Imdex5.sol#519-554) has external calls inside a loop: IPoolManager(POOL_MANAGER).exttload(NONZERO_DELTA_COUNT_SLOT) != 0 (src/Imdex5.sol#552)\n[low/medium] calls-loop at src/Imdex5.sol:592: Imdex5._pay(address,address,uint256) (src/Imdex5.sol#592-604) has external calls inside a loop: (ok,ret) = token.call{gas: PAY_GAS}(abi.encodeCall(IERC20.transfer,(to,amount))) (src/Imdex5.sol#595)\n[low/medium] calls-loop at src/Imdex5.sol:508: Imdex5._tryBuy(Imdex5.Coin,uint256) (src/Imdex5.sol#508-517) has external calls inside a loop: (amountIn,out) = this.swapSelf{gas: SWAP_GAS}(coin.token,coin.hook,true,imdAmount,false,true) (src/Imdex5.sol#509-516)\n[low/medium] calls-loop at src/Imdex5.sol:519: Imdex5._swap(address,address,bool,uint256,bool,bool) (src/Imdex5.sol#519-554) has external calls inside a loop: IPoolManager(POOL_MANAGER).take(outCur,address(this),amountOut) (src/Imdex5.sol#548)\n[low/medium] calls-loop at src/Imdex5.sol:613: Imdex5._lookup(uint64) (src/Imdex5.sol#613-624) has external calls inside a loop: artifacts = registry.artifactsOf(launch) (src/Imdex5.sol#618)\n[low/medium] calls-loop at src/Imdex5.sol:519: Imdex5._swap(address,address,bool,uint256,bool,bool) (src/Imdex5.sol#519-554) has external calls inside a loop: delta = IPoolManager(POOL_MANAGER).swap(key,IPoolManager.SwapParams(zeroForOne,- int256(amount),limit),) (src/Imdex5.sol#531-532)\n[low/medium] reentrancy-benign at src/Imdex5.sol:336: Reentrancy in Imdex5.rebalance() (src/Imdex5.sol#336-341):\n[low/medium] reentrancy-benign at src/Imdex5.sol:497: Reentrancy in Imdex5._trySell(Imdex5.Coin,uint256) (src/Imdex5.sol#497-506):\n[low/medium] reentrancy-benign at src/Imdex5.sol:592: Reentrancy in Imdex5._pay(address,address,uint256) (src/Imdex5.sol#592-604):\n[low/medium] reentrancy-benign at src/Imdex5.sol:448: Reentrancy in Imdex5._rebalance() (src/Imdex5.sol#448-494):\n[low/medium] reentrancy-benign at src/Imdex5.sol:245: Reentrancy in Imdex5.ask() (src/Imdex5.sol#245-270):\n[low/medium] reentrancy-benign at src/Imdex5.sol:418: Reentrancy in Imdex5._redeemToImd(address,uint256,uint256,uint256) (src/Imdex5.sol#418-446):\n[low/medium] reentrancy-benign at src/Imdex5.sol:508: Reentrancy in Imdex5._tryBuy(Imdex5.Coin,uint256) (src/Imdex5.sol#508-517):\n[low/medium] reentrancy-events at src/Imdex5.sol:418: Reentrancy in Imdex5._redeemToImd(address,uint256,uint256,uint256) (src/Imdex5.sol#418-446):\n[low/medium] reentrancy-events at src/Imdex5.sol:448: Reentrancy in Imdex5._rebalance() (src/Imdex5.sol#448-494):\n[low/medium] reentrancy-events at src/Imdex5.sol:497: Reentrancy in Imdex5._trySell(Imdex5.Coin,uint256) (src/Imdex5.sol#497-506):\n[low/medium] reentrancy-events at src/Imdex5.sol:592: Reentrancy in Imdex5._pay(address,address,uint256) (src/Imdex5.sol#592-604):\n[low/medium] reentrancy-events at src/Imdex5.sol:448: Reentrancy in Imdex5._rebalance() (src/Imdex5.sol#448-494):\n[low/medium] reentrancy-events at src/Imdex5.sol:519: Reentrancy in Imdex5._swap(address,address,bool,uint256,bool,bool) (src/Imdex5.sol#519-554):\n[low/medium] reentrancy-events at src/Imdex5.sol:508: Reentrancy in Imdex5._tryBuy(Imdex5.Coin,uint256) (src/Imdex5.sol#508-517):\n[low/medium] return-bomb at src/Imdex5.sol:592: Imdex5._pay(address,address,uint256) (src/Imdex5.sol#592-604) tries to limit the gas of an external call that controls implicit decoding\n[low/medium] timestamp at src/Imdex5.sol:298: Imdex5.closeRequest() (src/Imdex5.sol#298-304) uses timestamp for comparisons\n[low/medium] timestamp at src/Imdex5.sol:274: Imdex5.onOracleResult(bytes32,OracleAttestation.Attestation,bytes) (src/Imdex5.sol#274-285) uses timestamp for comparisons\n[low/medium] timestamp at src/Imdex5.sol:288: Imdex5.onOracleFailure(bytes32,uint8,bytes32,uint16,uint16,bytes) (src/Imdex5.sol#288-295) uses timestamp for comparisons\n[low/medium] timestamp at src/Imdex5.sol:245: Imdex5.ask() (src/Imdex5.sol#245-270) uses timestamp for comparisons\n[low/medium] timestamp at src/OracleAttestation.sol:157: OracleAttestationConsumer._verifyAttestation(OracleAttestation.Attestation,bytes) (src/OracleAttestation.sol#157-165) uses timestamp for comparisons","passed":true},{"durationMs":1657,"exitCode":0,"name":"aderyn","output":"[high] abi-encode-packed-hash-collision at src/Imdex5.sol:155: `abi.encodePacked()` Hash Collision\n[high] reentrancy-state-change at src/Imdex5.sol:257: Reentrancy: State change after external call\n[low] costly-loop at src/Imdex5.sol:207: Costly operations inside loop (11 places)\n[low] internal-function-used-once at src/OracleAttestation.sol:210: Internal Function Used Only Once\n[low] large-numeric-literal at src/Imdex5.sol:35: Large Numeric Literal (3 places)\n[low] require-revert-in-loop at src/Imdex5.sol:320: Loop Contains `require`/`revert` (4 places)\n[low] unchecked-return at src/Imdex5.sol:182: Unchecked Return (5 places)\n[low] unsafe-erc20-operation at src/Imdex5.sol:595: Unsafe ERC20 Operation","passed":true}],"detail":"all checks passed","evaluation":"checks","profile":"foundry","status":"accepted","submissionHash":"390f7ad37dc4d640912ad3d1d04ca9782a69921bcbbbd0c79bc87ef67b33ac08","verifiedTreeHash":"1fba313e3e61b9b4253f3c73f8effba7b672b220","verifierVersion":"0.1.0+67c588fa"},{"checks":[{"durationMs":57162,"exitCode":0,"name":"build","output":"Compiling 58 files with Solc 0.8.26\nSolc 0.8.26 finished in 57.08s\nCompiler run successful!\n","passed":true},{"durationMs":54999,"exitCode":0,"name":"test","output":"No files changed, compilation skipped\n\nRan 2 tests for test/OracleConsumerConformance.t.sol:OracleConsumerConformanceTest\n[PASS] test_callbackSelectorIsCanonical() (gas: 4542)\n[PASS] test_digestMatchesTheProtocol() (gas: 13344)\nSuite result: ok. 2 passed; 0 failed; 0 skipped; finished in 629.77µs (193.53µs CPU time)\n\nRan 5 tests for test/Imdex5ShortFill.t.sol:Imdex5ShortFillTest\n[PASS] testFuzz_mintUsesTheLeastFilledCoinAndChargesEveryBuy(uint256,uint16[5]) (runs: 256, μ: 1633057, ~: 1639789)\nLogs:\n  Bound result 499000000000000001311\n  Bound result 3\n  Bound result 2\n  Bound result 0\n  Bound result 1016\n  Bound result 4\n\n[PASS] test_mintRevertsAndRollsBackEarlierBuysWhenACoinDeliversZero() (gas: 1284251)\n[PASS] test_mintRevertsWhenANonzeroFillRoundsSharesToZero() (gas: 1193597)\n[PASS] test_shortFillMintsTheDeliveredFraction() (gas: 866125)\n[PASS] test_shortFillStillEnforcesMaxImdInAndRollsBack() (gas: 1737074)\nSuite result: ok. 5 passed; 0 failed; 0 skipped; finished in 176.65ms (176.20ms CPU time)\n\nRan 26 tests for test/Imdex5Revised.t.sol:Imdex5RevisedTest\n[PASS] testFuzz_mintFirstKeepsAPartialFillIdle(uint256,uint256) (runs: 256, μ: 1103744, ~: 1103775)\nLogs:\n  Bound result 3345236304161853607553\n  Bound result 7357926\n\n[PASS] testFuzz_redeemToImdPaysADeadCoinExactlyAsRedeemDoes(uint256) (runs: 256, μ: 1989756, ~: 1995939)\nLogs:\n  Bound result 56237503\n\n[PASS] testFuzz_redeemToImdPaysAShortFillInKindUnderTheRedeemRule(uint256,uint256) (runs: 256, μ: 1827700, ~: 1828961)\nLogs:\n  Bound result 994000000000000004456\n  Bound result 56960\n\n[PASS] test_aCoinThatBurnsItsGasIsOwedAndTheIdleImdStillPaid() (gas: 1632576)\n[PASS] test_askAndCloseAtTheirExactBoundaries() (gas: 1201130)\n[PASS] test_askIsBlockedWhileAListAwaitsRebalance() (gas: 3280937)\n[PASS] test_claimThatFailsKeepsTheDebt() (gas: 1296929)\n[PASS] test_hookCannotCallSwapSelfOrTheOracleCallbacks() (gas: 3472662)\n[PASS] test_hookCannotCloseOrAnswerTheOpenRequestDuringASwap() (gas: 4124785)\n[PASS] test_lastRedeemerToImdTakesAllOfADeadCoin() (gas: 1753160)\n[PASS] test_margUsesItsOwnHookAndTheOthersShareG() (gas: 48921)\n[PASS] test_mintFirstPartialFillIsRedeemedProRataNotTwice() (gas: 1658817)\n[PASS] test_mintFirstRefusesAPoolThatReturnsNothingOnALargeAmount() (gas: 744341)\n[PASS] test_mintFirstRefusesDustThatBuysNothing() (gas: 2164385)\n[PASS] test_mintFirstRevertsWholeWhenTheHookMisbehaves() (gas: 992464196)\n[PASS] test_mintRevertsWholeWhenTheHookBurnsGasForTheIndex() (gas: 993090027)\n[PASS] test_mintRevertsWholeWhenTheHookLeavesADeltaUnsettled() (gas: 1342628)\n[PASS] test_mintSkipsAListCoinHeldAtZeroAndTheNextRebalanceBuysIt() (gas: 5525166)\n[PASS] test_onOracleResultNeedsExactlyFourAgreed() (gas: 1156026)\n[PASS] test_owedAccumulatesAcrossRedeemsAndIsPaidOnce() (gas: 2200225)\n[PASS] test_rebalanceSkipsEveryBurningSwapAndStillAdoptsTheList() (gas: 3717785)\n[PASS] test_redeemSurvivesFiveGasBurningCoinsWithOrdinaryGas() (gas: 5815698)\n[PASS] test_redeemToImdPaysInKindWhenTheHookLeavesADeltaUnsettled() (gas: 2231774)\n[PASS] test_submitRejectsALaunchWithoutAHookOrAToken() (gas: 1831635)\n[PASS] test_submitTakesAnAttestationOnce() (gas: 1455798)\n[PASS] test_submitUsesTheRegistryArtifactsNotTheStartingList() (gas: 1556962)\nSuite result: ok. 26 passed; 0 failed; 0 skipped; finished in 199.71ms (567.66ms CPU time)\n\nRan 33 tests for test/Imdex5Edges.t.sol:Imdex5EdgesTest\n[PASS] testFuzz_mintBuysExactlyTheRoundedUpShare(uint256) (runs: 512, μ: 1916173, ~: 1915999)\nLogs:\n  Bound result 1531009833402338654651\n\n[PASS] testFuzz_mintFirstMintsExactlyTheRest(uint256) (runs: 512, μ: 1007952, ~: 1011589)\nLogs:\n  Bound result 4999999999999999999999\n\n[PASS] testFuzz_onOracleResultForAnotherRequestIsIgnored(bytes32,uint16) (runs: 256, μ: 1025502, ~: 1025617)\n[PASS] testFuzz_onOracleResultFromAStrangerChangesNothing(address,bytes32,uint16) (runs: 256, μ: 1072421, ~: 1072601)\n[PASS] testFuzz_redeemNeverPaysAboveProRata(uint256,uint256) (runs: 512, μ: 1557443, ~: 1558293)\nLogs:\n  Bound result 2660511380455133845832\n  Bound result 501212658599702984752\n\n[PASS] testFuzz_splittingARedeemStaysUnderProRata(uint256,uint256) (runs: 256, μ: 1748648, ~: 1748911)\nLogs:\n  Bound result 376929326866417176471\n  Bound result 7357926\n\n[PASS] test_aLaterAskReplacesAnUnsubmittedAnswer() (gas: 1788380)\n[PASS] test_aReenteringCoinCannotReenterAndIsNotPaidTwice() (gas: 2668764)\n[PASS] test_aReenteringCoinCannotReenterMintOrRebalanceFromRedeem() (gas: 3857762)\n[PASS] test_askRevertsWholeWhenTheIntakeRefuses() (gas: 332004)\n[PASS] test_askThresholdIsExactlyThreeQuartersOfAnImd() (gas: 1099602)\n[PASS] test_closeRequestNeedsAnOpenOne() (gas: 1001574)\n[PASS] test_closingARequestDoesNotResetTheInterval() (gas: 1157502)\n[PASS] test_mintCannotBeFreeWhenTheIndexHoldsValue() (gas: 1764414)\n[PASS] test_onOracleResultAfterCloseIsIgnored() (gas: 1095692)\n[PASS] test_onOracleResultWithFiveEntriesFitsTheStipend() (gas: 1138426)\n[PASS] test_oneGasBurningCoinDoesNotBlockRedeemGivenGas() (gas: 1666511)\n[PASS] test_rebalanceBuyMovesAPoolAtMostTwoPercent() (gas: 3675405)\n[PASS] test_rebalanceBuyStopsAtAQuarterWeight() (gas: 4006566)\n[PASS] test_rebalanceDoesNotTrimWithFewerThanFourCoins() (gas: 3250977)\n[PASS] test_rebalanceSellMovesAPoolAtMostTwoPercent() (gas: 3277309)\n[PASS] test_rebalanceTrimsToAQuarterNotBelow() (gas: 3765711)\n[PASS] test_redeemHalfPercentStaysWithRemainingHolders() (gas: 1555481)\n[PASS] test_redeemIdleImdThatCannotBeSentIsOwed() (gas: 1393819)\n[PASS] test_redeemToATokenWithoutCodeBecomesOwedAndClaimableLater() (gas: 1265926)\n[PASS] test_residualsAreRedeemedAndBlockMintWhileTheirPoolIsDead() (gas: 5187110)\n[PASS] test_rewardsNeverDipIntoIdleImd() (gas: 2711693)\n[PASS] test_sharesTransferLikeAnyErc20AndMoveNoHoldings() (gas: 1462919)\n[PASS] test_submitAndRebalancePayNoRewardWithoutFees() (gas: 3233097)\n[PASS] test_submitRejectsATamperedAnswerEvenWithAValidSignatureElsewhere() (gas: 1133265)\n[PASS] test_submitRejectsAnAttestationSignedForAnotherChain() (gas: 1438036)\n[PASS] test_submitRejectsAnAttestationSignedForAnotherConsumer() (gas: 1103895)\n[PASS] test_submitRejectsMalformedAnswerBytes() (gas: 1341770)\nSuite result: ok. 33 passed; 0 failed; 0 skipped; finished in 201.00ms (1.11s CPU time)\n\nRan 7 tests for test/Imdex5TaxedCoin.t.sol:Imdex5TaxedCoinTest\n[PASS] testFuzz_taxedCoinLifecycle(uint256,uint256,uint256) (runs: 256, μ: 7825993, ~: 7830766)\nLogs:\n  Bound result 194552603932498180909\n  Bound result 499000000035667025439\n  Bound result 881764381235569264323\n\n[PASS] test_firstMintCreditsOnlyWhatArrives() (gas: 1253136)\n[PASS] test_firstMintMinOutChecksTheNetReceipt() (gas: 1358483)\n[PASS] test_lastHolderCanReceiveEveryCoinAfterAnImdExit() (gas: 2639075)\n[PASS] test_outstandingOwedIsNotCountedAsANewReceiptAndRemainsClaimable() (gas: 5170057)\n[PASS] test_taxedCoinFullLifecycle() (gas: 7819529)\n[PASS] test_taxedRebalanceBuyCreditsOnlyNewReceipts() (gas: 5572349)\nSuite result: ok. 7 passed; 0 failed; 0 skipped; finished in 351.64ms (363.65ms CPU time)\n\nRan 45 tests for test/Imdex5.t.sol:Imdex5Test\n[PASS] testFuzz_mintThenRedeemNeverPaysMoreThanDeposited(uint256,uint256) (runs: 256, μ: 2401970, ~: 2410312)\nLogs:\n  Bound result 994999999999999999999\n  Bound result 89775000000000000002\n\n[PASS] test_askPaysIntakeAndCaller() (gas: 1135679)\n[PASS] test_askReturnsWithoutFees() (gas: 155177)\n[PASS] test_askSevenDayInterval() (gas: 1185273)\n[PASS] test_bodyIsTheJsonTheBriefDescribes() (gas: 30515)\n[PASS] test_closeRequestAfterTwoDays() (gas: 1024939)\n[PASS] test_deployment() (gas: 94843)\n[PASS] test_feeImdOnlyLeavesForOracleAndRewards() (gas: 4919021)\n[PASS] test_fundAddsToFeeImd() (gas: 147774)\n[PASS] test_hookCannotReenter() (gas: 5127201)\n[PASS] test_mintBuysProportionallyAndRefunds() (gas: 1828097)\n[PASS] test_mintFirstBuysEqualPartsAndTakesFee() (gas: 1104040)\n[PASS] test_mintFirstKeepsWhatAPoolCouldNotTakeAsIdle() (gas: 1324784)\n[PASS] test_mintFirstRequiresZeroSupplyAndRightLength() (gas: 1021992)\n[PASS] test_mintFirstRevertsOnMinOut() (gas: 727125)\n[PASS] test_mintFirstRevertsWhenABuyFails() (gas: 814503)\n[PASS] test_mintFirstRevertsWhenABuyReturnsNothing() (gas: 2113144)\n[PASS] test_mintNeverIssuesSharesForNothing() (gas: 327765)\n[PASS] test_mintRequiresSupply() (gas: 40136)\n[PASS] test_mintRevertsOverMaxImdIn() (gas: 1730309)\n[PASS] test_mintRevertsWhenABuyFailsButScalesANonzeroShortFill() (gas: 2271266)\n[PASS] test_mintRoundsAgainstTheMinter() (gas: 1709386)\n[PASS] test_onOracleFailureOnlyFromIntake() (gas: 1062770)\n[PASS] test_onOracleResultStoresOnlyTheOpenRequestFromTheIntake() (gas: 1296306)\n[PASS] test_rebalanceNeedsAList() (gas: 41260)\n[PASS] test_rebalanceSellsAdoptsAndBuys() (gas: 5244826)\n[PASS] test_rebalanceSkipsADeadPool() (gas: 2973938)\n[PASS] test_rebalanceSkipsAHookThatLeavesAnUnsettledDelta() (gas: 3868662)\n[PASS] test_rebalanceSurvivesAHookThatBurnsAllGas() (gas: 5485027)\n[PASS] test_rebalanceTrimsAHoldingOverAQuarter() (gas: 3452338)\n[PASS] test_rebalanceWithNothingHeld() (gas: 2262505)\n[PASS] test_redeemCannotBeBlockedByACoin() (gas: 1575655)\n[PASS] test_redeemLastSharesPaysEverything() (gas: 2144373)\n[PASS] test_redeemPaysInKindLessHalfPercent() (gas: 1347370)\n[PASS] test_redeemRejectsZeroAndTooMany() (gas: 986018)\n[PASS] test_redeemSurvivesCoinsThatBurnAllGas() (gas: 4399571)\n[PASS] test_redeemToImdPaysAShortFillInKindLessHalfPercent() (gas: 1780752)\n[PASS] test_redeemToImdPaysInKindWhenASaleFails() (gas: 2970746)\n[PASS] test_redeemToImdRevertsBelowMinOut() (gas: 1786597)\n[PASS] test_redeemToImdSellsAndKeepsFee() (gas: 1753610)\n[PASS] test_redeemToImdSurvivesAHookThatBurnsGas() (gas: 2457667)\n[PASS] test_submitRejectsBadLists() (gas: 4557195)\n[PASS] test_submitRejectsWrongAnswerAndForgedSignature() (gas: 1635497)\n[PASS] test_submitStoresTheNextListAndRewards() (gas: 1523647)\n[PASS] test_unlockCallbackAndSwapSelfAreNotCallable() (gas: 103394)\nSuite result: ok. 45 passed; 0 failed; 0 skipped; finished in 351.66ms (251.89ms CPU time)\n\nRan 1 test for test/Imdex5.invariant.t.sol:Imdex5InvariantTest\n[PASS]\nImdex5InvariantTest invariants:\n[PASS] invariant_actorsNeverExtractMoreImdThanTheyPutIn\n[PASS] invariant_coinBalancesAreHeldPlusOwed\n[PASS] invariant_feeImdLeavesOnlyForTheOracleAndRewards\n[PASS] invariant_imdBalanceIsIdlePlusFeePlusOwed\n[PASS] invariant_listShape\n[PASS] invariant_noFreeMintWhileValueIsHeld\n[PASS] invariant_requestStateIsConsistent\n[PASS] invariant_zeroSupplyMeansNothingHeld\n Imdex5InvariantTest invariants (runs: 96, calls: 3840, reverts: 0)\n\n╭---------------+------------------+-------+---------+----------╮\n| Contract      | Selector         | Calls | Reverts | Discards |\n+===============================================================+\n| Imdex5Handler | ask              | 187   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | claim            | 201   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | closeRequest     | 187   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | deliverFailure   | 190   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | deliverResult    | 212   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | fund             | 188   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | mint             | 427   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | mintFirst        | 195   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | rebalance        | 207   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | redeem           | 221   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | redeemToImd      | 201   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setCoinFailMode  | 199   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setHookMisbehave | 218   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setPoolMaxIn     | 207   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | submit           | 206   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | togglePool       | 180   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | transferShares   | 222   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | warp             | 192   | 0       | 0        |\n╰---------------+------------------+-------+---------+----------╯\n\nLogs:\n  Bound result 63\n  Bound result 4242\n  Bound result 749999999999999999\n  Bound result 7168\n  Bound result 8736\n  Bound result 183307044961732093281\n\nSuite result: ok. 1 passed; 0 failed; 0 skipped; finished in 1.64s (1.63s CPU time)\n\nRan 1 test for test/Imdex5.invariant.t.sol:Imdex5TaxedCoinInvariantTest\n[PASS]\nImdex5TaxedCoinInvariantTest invariants:\n[PASS] invariant_actorsNeverExtractMoreImdThanTheyPutIn\n[PASS] invariant_coinBalancesAreHeldPlusOwed\n[PASS] invariant_feeImdLeavesOnlyForTheOracleAndRewards\n[PASS] invariant_imdBalanceIsIdlePlusFeePlusOwed\n[PASS] invariant_listShape\n[PASS] invariant_noFreeMintWhileValueIsHeld\n[PASS] invariant_requestStateIsConsistent\n[PASS] invariant_zeroSupplyMeansNothingHeld\n Imdex5TaxedCoinInvariantTest invariants (runs: 256, calls: 128000, reverts: 0)\n\n╭---------------+------------------+-------+---------+----------╮\n| Contract      | Selector         | Calls | Reverts | Discards |\n+===============================================================+\n| Imdex5Handler | ask              | 6674  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | claim            | 6709  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | closeRequest     | 6596  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | deliverFailure   | 6790  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | deliverResult    | 6737  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | fund             | 6740  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | mint             | 13506 | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | mintFirst        | 6723  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | rebalance        | 6694  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | redeem           | 6686  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | redeemToImd      | 6745  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setCoinFailMode  | 6719  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setHookMisbehave | 6673  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setPoolMaxIn     | 6874  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | submit           | 6821  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | togglePool       | 6846  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | transferShares   | 6783  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | warp             | 6684  | 0       | 0        |\n╰---------------+------------------+-------+---------+----------╯\n\nLogs:\n  Bound result 259200\n  Bound result 6765\n  Bound result 7\n  Bound result 499999999999999999995\n  Bound result 500000000000000000\n  Bound result 16443\n  Bound result 995000000000000000000\n  Bound result 11983\n  Bound result 17845\n  Bound result 770362672619782256389\n  Bound result 5781\n  Bound result 1\n  Bound result 9900\n  Bound result 235200\n  Bound result 15708\n  Bound result 16\n  Bound result 749999999999999999\n  Bound result 204800\n  Bound result 222809\n  Bound result 30000000\n  Bound result 86400\n  Bound result 549080\n  Bound result 32348688161332256026\n  Bound result 4087012224027472\n  Bound result 5086\n  Bound result 2989\n  Bound result 95911\n  Bound result 9\n  Bound result 20330184174085958498\n  Bound result 198000000000000000000\n  Bound result 4245\n  Bound result 15246\n  Bound result 5050\n  Bound result 18446744073709551616\n  Bound result 4746\n  Bound result 8258\n  Bound result 3451596882\n  Bound result 360952252958477371408\n  Bound result 2681\n  Bound result 10743\n  Bound result 356230389189871151643\n  Bound result 46000000000000000000\n  Bound result 35998462224112495958\n  Bound result 49999999999999999999\n  Bound result 246362405855981574245\n  Bound result 179200\n  Bound result 1000000000000000000007\n  Bound result 326073132280493232482\n  Bound result 16671\n  Bound result 262165895631560036161\n  Bound result 5777947278296771682\n  Bound result 469353047785685202333\n  Bound result 7050522208774116496\n  Bound result 3\n  Bound result 750000000000000000\n  Bound result 759350369237622786608\n  Bound result 9666\n  Bound result 267135152928642052519\n  Bound result 31242551756066888927\n  Bound result 194113\n  Bound result 50000000000000000000\n  Bound result 30146829961892664067\n  Bound result 12500\n  Bound result 31337\n  Bound result 566823\n  Bound result 300000000000000000000\n  Bound result 4149131482\n  Bound result 86699674470647\n  Bound result 400000000000000000000\n  Bound result 6863\n  Bound result 1000000000000000000000\n  Bound result 15493\n  Bound result 4\n  Bound result 282708526209578668\n  Bound result 24576\n  Bound result 18383\n  Bound result 31543972\n  Bound result 5920\n  Bound result 11\n  Bound result 499999999999999999997\n  Bound result 86400\n  Bound result 641024\n  Bound result 50000000000000000000\n  Bound result 13\n  Bound result 360\n  Bound result 7336\n  Bound result 999999999999999999994\n  Bound result 1207357094\n  Bound result 1283\n  Bound result 12322\n  Bound result 284935866042189488215\n  Bound result 499999999999999999941\n  Bound result 10\n  Bound result 254977\n  Bound result 1000000000000000000000\n  Bound result 50000000000000000000\n  Bound result 14\n  Bound result 520304\n  Bound result 2791189758\n  Bound result 561957\n  Bound result 9795\n  Bound result 17687\n  Bound result 532\n  Bound result 1250000000000000000\n\nSuite result: ok. 1 passed; 0 failed; 0 skipped; finished in 54.89s (54.88s CPU time)\n\nRan 8 test suites in 54.90s (57.81s CPU time): 120 tests passed, 0 failed, 0 skipped (120 total tests)\n","passed":true},{"durationMs":46,"exitCode":0,"name":"source-index","output":"{\"v\":1,\"entryPoints\":[\"Imdex5.approve(address,uint256)\",\"Imdex5.ask()\",\"Imdex5.claim(address)\",\"Imdex5.closeRequest()\",\"Imdex5.fund(uint256)\",\"Imdex5.mint(uint256,uint256)\",\"Imdex5.mintFirst(uint256,uint256[])\",\"Imdex5.onOracleFailure(bytes32,uint8,bytes32,uint16,uint16,bytes)\",\"Imdex5.onOracleResult(bytes32,(bytes32,uint256,bytes32,uint8,bytes,uint256,uint64,uint64,bytes32,bytes32,uint16,uint16,uint16,uint64,uint64),bytes)\",\"Imdex5.rebalance()\",\"Imdex5.redeem(uint256)\",\"Imdex5.redeemToImd(uint256,uint256)\",\"Imdex5.submit((bytes32,uint256,bytes32,uint8,bytes,uint256,uint64,uint64,bytes32,bytes32,uint16,uint16,uint16,uint64,uint64),bytes)\",\"Imdex5.swapSelf(address,address,bool,uint256,bool,bool)\",\"Imdex5.transfer(address,uint256)\",\"Imdex5.transferFrom(address,address,uint256)\",\"Imdex5.unlockCallback(bytes)\"],\"files\":{\".gitignore\":2,\"ADAPTATION.md\":106,\"README.md\":244,\"foundry.toml\":19,\"launch.json\":10,\"src/Imdex5.sol\":623,\"src/Interfaces.sol\":61,\"src/OracleAttestation.sol\":221,\"test/Imdex5.invariant.t.sol\":508,\"test/Imdex5.t.sol\":1017,\"test/Imdex5Base.sol\":174,\"test/Imdex5Edges.t.sol\":673,\"test/Imdex5Revised.t.sol\":503,\"test/Imdex5ShortFill.t.sol\":135,\"test/Imdex5TaxedCoin.t.sol\":246,\"test/OracleConsumerConformance.t.sol\":74,\"test/mocks/AttackMocks.sol\":85,\"test/mocks/Mocks.sol\":337,\"test/mocks/PoolTaxERC20.sol\":25},\"excluded\":[\"lib/\",\"node_modules/\"],\"truncated\":false}","passed":true},{"durationMs":5072,"exitCode":0,"name":"slither","output":"[high/medium] reentrancy-balance at src/Imdex5.sol:366: Reentrancy in Imdex5._mintFirst(address,uint256,uint256[]) (src/Imdex5.sol#366-385):\n[high/medium] reentrancy-balance at src/Imdex5.sol:387: Reentrancy in Imdex5._mintMore(address,uint256,uint256) (src/Imdex5.sol#387-414):\n[medium/high] incorrect-equality at src/Imdex5.sol:590: Imdex5._pay(address,address,uint256) (src/Imdex5.sol#590-602) uses a dangerous strict equality:\n[medium/high] incorrect-equality at src/Imdex5.sol:387: Imdex5._mintMore(address,uint256,uint256) (src/Imdex5.sol#387-414) uses a dangerous strict equality:\n[medium/high] incorrect-equality at src/Imdex5.sol:565: Imdex5._value(address,uint256) (src/Imdex5.sol#565-570) uses a dangerous strict equality:\n[medium/high] incorrect-equality at src/Imdex5.sol:590: Imdex5._pay(address,address,uint256) (src/Imdex5.sol#590-602) uses a dangerous strict equality:\n[medium/high] incorrect-equality at src/Imdex5.sol:590: Imdex5._pay(address,address,uint256) (src/Imdex5.sol#590-602) uses a dangerous strict equality:\n[medium/high] incorrect-equality at src/Imdex5.sol:416: Imdex5._redeemToImd(address,uint256,uint256,uint256) (src/Imdex5.sol#416-444) uses a dangerous strict equality:\n[medium/high] incorrect-equality at src/Imdex5.sol:366: Imdex5._mintFirst(address,uint256,uint256[]) (src/Imdex5.sol#366-385) uses a dangerous strict equality:\n[medium/medium] reentrancy-no-eth at src/Imdex5.sol:416: Reentrancy in Imdex5._redeemToImd(address,uint256,uint256,uint256) (src/Imdex5.sol#416-444):\n[medium/medium] reentrancy-no-eth at src/Imdex5.sol:446: Reentrancy in Imdex5._rebalance() (src/Imdex5.sol#446-492):\n[medium/medium] reentrancy-no-eth at src/Imdex5.sol:446: Reentrancy in Imdex5._rebalance() (src/Imdex5.sol#446-492):\n[medium/medium] reentrancy-no-eth at src/Imdex5.sol:446: Reentrancy in Imdex5._rebalance() (src/Imdex5.sol#446-492):\n[medium/medium] reentrancy-no-eth at src/Imdex5.sol:366: Reentrancy in Imdex5._mintFirst(address,uint256,uint256[]) (src/Imdex5.sol#366-385):\n[medium/medium] reentrancy-no-eth at src/Imdex5.sol:200: Reentrancy in Imdex5.redeem(uint256) (src/Imdex5.sol#200-221):\n[medium/medium] uninitialized-local at src/Imdex5.sol:612: Imdex5._lookup(uint64).registry (src/Imdex5.sol#612) is a local variable never initialized\n[medium/medium] unused-return at src/Imdex5.sol:177: Imdex5.mintFirst(uint256,uint256[]) (src/Imdex5.sol#177-183) ignores return value by IPoolManager(POOL_MANAGER).unlock(abi.encode(Op.MintFirst,msg.sender,imdIn,0,0,minOut)) (src/Imdex5.sol#182)\n[medium/medium] unused-return at src/Imdex5.sol:517: Imdex5._swap(address,address,bool,uint256,bool,bool) (src/Imdex5.sol#517-552) ignores return value by IPoolManager(POOL_MANAGER).settle() (src/Imdex5.sol#542)\n[medium/medium] unused-return at src/Imdex5.sol:226: Imdex5.redeemToImd(uint256,uint256) (src/Imdex5.sol#226-232) ignores return value by IPoolManager(POOL_MANAGER).unlock(abi.encode(Op.RedeemToImd,msg.sender,shares,minImdOut,supply,new uint256[](0))) (src/Imdex5.sol#230-231)\n[medium/medium] unused-return at src/Imdex5.sol:334: Imdex5.rebalance() (src/Imdex5.sol#334-339) ignores return value by IPoolManager(POOL_MANAGER).unlock(abi.encode(Op.Rebalance,msg.sender,0,0,0,new uint256[](0))) (src/Imdex5.sol#336)\n[medium/medium] unused-return at src/Imdex5.sol:190: Imdex5.mint(uint256,uint256) (src/Imdex5.sol#190-195) ignores return value by IPoolManager(POOL_MANAGER).unlock(abi.encode(Op.Mint,msg.sender,shares,maxImdIn,0,new uint256[](0))) (src/Imdex5.sol#194)\n[low/medium] calls-loop at src/Imdex5.sol:611: Imdex5._lookup(uint64) (src/Imdex5.sol#611-622) has external calls inside a loop: REGISTRY_A.isRecorded(launch) (src/Imdex5.sol#613)\n[low/medium] calls-loop at src/Imdex5.sol:416: Imdex5._redeemToImd(address,uint256,uint256,uint256) (src/Imdex5.sol#416-444) has external calls inside a loop: (amountIn,sold) = this.swapSelf{gas: SWAP_GAS}(coin.token,coin.hook,false,amount,false,false) (src/Imdex5.sol#425-433)\n[low/medium] calls-loop at src/Imdex5.sol:517: Imdex5._swap(address,address,bool,uint256,bool,bool) (src/Imdex5.sol#517-552) has external calls inside a loop: IPoolManager(POOL_MANAGER).settle() (src/Imdex5.sol#542)\n[low/medium] calls-loop at src/Imdex5.sol:590: Imdex5._pay(address,address,uint256) (src/Imdex5.sol#590-602) has external calls inside a loop: (ok,ret) = token.call{gas: PAY_GAS}(abi.encodeCall(IERC20.transfer,(to,amount))) (src/Imdex5.sol#593)\n[low/medium] calls-loop at src/Imdex5.sol:495: Imdex5._trySell(Imdex5.Coin,uint256) (src/Imdex5.sol#495-504) has external calls inside a loop: (amountIn,out) = this.swapSelf{gas: SWAP_GAS}(coin.token,coin.hook,false,amount,false,true) (src/Imdex5.sol#496-503)\n[low/medium] calls-loop at src/Imdex5.sol:517: Imdex5._swap(address,address,bool,uint256,bool,bool) (src/Imdex5.sol#517-552) has external calls inside a loop: before = IERC20(outCur).balanceOf(address(this)) (src/Imdex5.sol#545)\n[low/medium] calls-loop at src/Imdex5.sol:611: Imdex5._lookup(uint64) (src/Imdex5.sol#611-622) has external calls inside a loop: REGISTRY_B.isRecorded(launch) (src/Imdex5.sol#614)\n[low/medium] calls-loop at src/Imdex5.sol:559: Imdex5._sqrtPrice(IPoolManager.PoolKey) (src/Imdex5.sol#559-562) has external calls inside a loop: uint256(uint160(uint256(IPoolManager(POOL_MANAGER).extsload(slot)))) (src/Imdex5.sol#561)\n[low/medium] calls-loop at src/Imdex5.sol:517: Imdex5._swap(address,address,bool,uint256,bool,bool) (src/Imdex5.sol#517-552) has external calls inside a loop: IPoolManager(POOL_MANAGER).take(outCur,address(this),amountOut) (src/Imdex5.sol#546)\n[low/medium] calls-loop at src/Imdex5.sol:611: Imdex5._lookup(uint64) (src/Imdex5.sol#611-622) has external calls inside a loop: artifacts = registry.artifactsOf(launch) (src/Imdex5.sol#616)\n[low/medium] calls-loop at src/Imdex5.sol:517: Imdex5._swap(address,address,bool,uint256,bool,bool) (src/Imdex5.sol#517-552) has external calls inside a loop: delta = IPoolManager(POOL_MANAGER).swap(key,IPoolManager.SwapParams(zeroForOne,int256(amount),limit),) (src/Imdex5.sol#529-530)\n[low/medium] calls-loop at src/Imdex5.sol:506: Imdex5._tryBuy(Imdex5.Coin,uint256) (src/Imdex5.sol#506-515) has external calls inside a loop: (amountIn,out) = this.swapSelf{gas: SWAP_GAS}(coin.token,coin.hook,true,imdAmount,false,true) (src/Imdex5.sol#507-514)\n[low/medium] calls-loop at src/Imdex5.sol:517: Imdex5._swap(address,address,bool,uint256,bool,bool) (src/Imdex5.sol#517-552) has external calls inside a loop: delta = IPoolManager(POOL_MANAGER).swap(key,IPoolManager.SwapParams(zeroForOne,- int256(amount),limit),) (src/Imdex5.sol#529-530)\n[low/medium] calls-loop at src/Imdex5.sol:590: Imdex5._pay(address,address,uint256) (src/Imdex5.sol#590-602) has external calls inside a loop: (ok,ret) = token.call{gas: PAY_GAS}(abi.encodeCall(IERC20.transfer,(to,amount))) (src/Imdex5.sol#593)\n[low/medium] calls-loop at src/Imdex5.sol:517: Imdex5._swap(address,address,bool,uint256,bool,bool) (src/Imdex5.sol#517-552) has external calls inside a loop: IPoolManager(POOL_MANAGER).exttload(NONZERO_DELTA_COUNT_SLOT) != 0 (src/Imdex5.sol#550)\n[low/medium] calls-loop at src/Imdex5.sol:517: Imdex5._swap(address,address,bool,uint256,bool,bool) (src/Imdex5.sol#517-552) has external calls inside a loop: IPoolManager(POOL_MANAGER).sync(inCur) (src/Imdex5.sol#540)\n[low/medium] calls-loop at src/Imdex5.sol:517: Imdex5._swap(address,address,bool,uint256,bool,bool) (src/Imdex5.sol#517-552) has external calls inside a loop: amountOut = IERC20(outCur).balanceOf(address(this)) - before (src/Imdex5.sol#547)\n[low/medium] reentrancy-benign at src/Imdex5.sol:416: Reentrancy in Imdex5._redeemToImd(address,uint256,uint256,uint256) (src/Imdex5.sol#416-444):\n[low/medium] reentrancy-benign at src/Imdex5.sol:495: Reentrancy in Imdex5._trySell(Imdex5.Coin,uint256) (src/Imdex5.sol#495-504):\n[low/medium] reentrancy-benign at src/Imdex5.sol:334: Reentrancy in Imdex5.rebalance() (src/Imdex5.sol#334-339):\n[low/medium] reentrancy-benign at src/Imdex5.sol:245: Reentrancy in Imdex5.ask() (src/Imdex5.sol#245-268):\n[low/medium] reentrancy-benign at src/Imdex5.sol:506: Reentrancy in Imdex5._tryBuy(Imdex5.Coin,uint256) (src/Imdex5.sol#506-515):\n[low/medium] reentrancy-benign at src/Imdex5.sol:446: Reentrancy in Imdex5._rebalance() (src/Imdex5.sol#446-492):\n[low/medium] reentrancy-benign at src/Imdex5.sol:590: Reentrancy in Imdex5._pay(address,address,uint256) (src/Imdex5.sol#590-602):\n[low/medium] reentrancy-events at src/Imdex5.sol:517: Reentrancy in Imdex5._swap(address,address,bool,uint256,bool,bool) (src/Imdex5.sol#517-552):\n[low/medium] reentrancy-events at src/Imdex5.sol:416: Reentrancy in Imdex5._redeemToImd(address,uint256,uint256,uint256) (src/Imdex5.sol#416-444):\n[low/medium] reentrancy-events at src/Imdex5.sol:446: Reentrancy in Imdex5._rebalance() (src/Imdex5.sol#446-492):\n[low/medium] reentrancy-events at src/Imdex5.sol:495: Reentrancy in Imdex5._trySell(Imdex5.Coin,uint256) (src/Imdex5.sol#495-504):\n[low/medium] reentrancy-events at src/Imdex5.sol:590: Reentrancy in Imdex5._pay(address,address,uint256) (src/Imdex5.sol#590-602):\n[low/medium] reentrancy-events at src/Imdex5.sol:506: Reentrancy in Imdex5._tryBuy(Imdex5.Coin,uint256) (src/Imdex5.sol#506-515):\n[low/medium] reentrancy-events at src/Imdex5.sol:446: Reentrancy in Imdex5._rebalance() (src/Imdex5.sol#446-492):\n[low/medium] return-bomb at src/Imdex5.sol:590: Imdex5._pay(address,address,uint256) (src/Imdex5.sol#590-602) tries to limit the gas of an external call that controls implicit decoding\n[low/medium] timestamp at src/Imdex5.sol:296: Imdex5.closeRequest() (src/Imdex5.sol#296-302) uses timestamp for comparisons\n[low/medium] timestamp at src/Imdex5.sol:245: Imdex5.ask() (src/Imdex5.sol#245-268) uses timestamp for comparisons\n[low/medium] timestamp at src/Imdex5.sol:272: Imdex5.onOracleResult(bytes32,OracleAttestation.Attestation,bytes) (src/Imdex5.sol#272-283) uses timestamp for comparisons\n[low/medium] timestamp at src/Imdex5.sol:286: Imdex5.onOracleFailure(bytes32,uint8,bytes32,uint16,uint16,bytes) (src/Imdex5.sol#286-293) uses timestamp for comparisons\n[low/medium] timestamp at src/OracleAttestation.sol:157: OracleAttestationConsumer._verifyAttestation(OracleAttestation.Attestation,bytes) (src/OracleAttestation.sol#157-165) uses timestamp for comparisons","passed":true},{"durationMs":573,"exitCode":0,"name":"aderyn","output":"[high] abi-encode-packed-hash-collision at src/Imdex5.sol:155: `abi.encodePacked()` Hash Collision\n[high] reentrancy-state-change at src/Imdex5.sol:255: Reentrancy: State change after external call\n[low] costly-loop at src/Imdex5.sol:207: Costly operations inside loop (11 places)\n[low] internal-function-used-once at src/OracleAttestation.sol:210: Internal Function Used Only Once\n[low] large-numeric-literal at src/Imdex5.sol:35: Large Numeric Literal (3 places)\n[low] require-revert-in-loop at src/Imdex5.sol:318: Loop Contains `require`/`revert` (4 places)\n[low] unchecked-return at src/Imdex5.sol:182: Unchecked Return (5 places)\n[low] unsafe-erc20-operation at src/Imdex5.sol:593: Unsafe ERC20 Operation","passed":true}],"detail":"all checks passed","evaluation":"checks","profile":"foundry","status":"accepted","submissionHash":"3e74723ed21c1db7264b55dd741658ff36363954c2b85651a97b64f7c17062b3","verifiedTreeHash":"c53321be6f9d9948dfe574559b75cf7c451c054f","verifierVersion":"0.1.0+7129bf9d"},{"checks":[{"durationMs":100191,"exitCode":0,"name":"build","output":"Compiling 58 files with Solc 0.8.26\nSolc 0.8.26 finished in 100.04s\nCompiler run successful!\n","passed":true},{"durationMs":89905,"exitCode":0,"name":"test","output":"No files changed, compilation skipped\n\nRan 2 tests for test/OracleConsumerConformance.t.sol:OracleConsumerConformanceTest\n[PASS] test_callbackSelectorIsCanonical() (gas: 4542)\n[PASS] test_digestMatchesTheProtocol() (gas: 13344)\nSuite result: ok. 2 passed; 0 failed; 0 skipped; finished in 1.29ms (219.08µs CPU time)\n\nRan 7 tests for test/Imdex5ShortFill.t.sol:Imdex5ShortFillTest\n[PASS] testFuzz_mintUsesTheLeastFilledCoinAndChargesEveryBuy(uint256,uint16[5]) (runs: 256, μ: 1632734, ~: 1639454)\nLogs:\n  Bound result 1999999999999999998\n  Bound result 16\n  Bound result 9795\n  Bound result 3349\n  Bound result 6617\n  Bound result 3\n\n[PASS] test_mintRevertsAndRollsBackEarlierBuysWhenACoinDeliversZero() (gas: 1284256)\n[PASS] test_mintRevertsWhenANonzeroFillRoundsSharesToZero() (gas: 1193602)\n[PASS] test_shortFillChargesIdleImdForTheSharesIssuedOnly() (gas: 2598220)\n[PASS] test_shortFillMintsTheDeliveredFraction() (gas: 866129)\n[PASS] test_shortFillStillEnforcesMaxImdInAndRollsBack() (gas: 1737103)\n[PASS] test_sliverFillIssuesASliverAndChargesEveryBuy() (gas: 1284816)\nSuite result: ok. 7 passed; 0 failed; 0 skipped; finished in 319.47ms (329.10ms CPU time)\n\nRan 45 tests for test/Imdex5.t.sol:Imdex5Test\n[PASS] testFuzz_mintThenRedeemNeverPaysMoreThanDeposited(uint256,uint256) (runs: 256, μ: 2402333, ~: 2410300)\nLogs:\n  Bound result 1253638085539977034323\n  Bound result 7357926\n\n[PASS] test_askPaysIntakeAndCaller() (gas: 1137884)\n[PASS] test_askReturnsWithoutFees() (gas: 155177)\n[PASS] test_askSevenDayInterval() (gas: 1189683)\n[PASS] test_bodyIsTheJsonTheBriefDescribes() (gas: 30515)\n[PASS] test_closeRequestAfterTwoDays() (gas: 1027144)\n[PASS] test_deployment() (gas: 94843)\n[PASS] test_feeImdOnlyLeavesForOracleAndRewards() (gas: 4921231)\n[PASS] test_fundAddsToFeeImd() (gas: 147774)\n[PASS] test_hookCannotReenter() (gas: 5129411)\n[PASS] test_mintBuysProportionallyAndRefunds() (gas: 1828102)\n[PASS] test_mintFirstBuysEqualPartsAndTakesFee() (gas: 1104040)\n[PASS] test_mintFirstKeepsWhatAPoolCouldNotTakeAsIdle() (gas: 1324784)\n[PASS] test_mintFirstRequiresZeroSupplyAndRightLength() (gas: 1021992)\n[PASS] test_mintFirstRevertsOnMinOut() (gas: 727125)\n[PASS] test_mintFirstRevertsWhenABuyFails() (gas: 814503)\n[PASS] test_mintFirstRevertsWhenABuyReturnsNothing() (gas: 2113144)\n[PASS] test_mintNeverIssuesSharesForNothing() (gas: 327771)\n[PASS] test_mintRequiresSupply() (gas: 40136)\n[PASS] test_mintRevertsOverMaxImdIn() (gas: 1730313)\n[PASS] test_mintRevertsWhenABuyFailsButScalesANonzeroShortFill() (gas: 2271275)\n[PASS] test_mintRoundsAgainstTheMinter() (gas: 1709391)\n[PASS] test_onOracleFailureOnlyFromIntake() (gas: 1064975)\n[PASS] test_onOracleResultStoresOnlyTheOpenRequestFromTheIntake() (gas: 1298511)\n[PASS] test_rebalanceNeedsAList() (gas: 41260)\n[PASS] test_rebalanceSellsAdoptsAndBuys() (gas: 5249236)\n[PASS] test_rebalanceSkipsADeadPool() (gas: 2976143)\n[PASS] test_rebalanceSkipsAHookThatLeavesAnUnsettledDelta() (gas: 3873072)\n[PASS] test_rebalanceSurvivesAHookThatBurnsAllGas() (gas: 5487232)\n[PASS] test_rebalanceTrimsAHoldingOverAQuarter() (gas: 3454543)\n[PASS] test_rebalanceWithNothingHeld() (gas: 2264710)\n[PASS] test_redeemCannotBeBlockedByACoin() (gas: 1575655)\n[PASS] test_redeemLastSharesPaysEverything() (gas: 2144373)\n[PASS] test_redeemPaysInKindLessHalfPercent() (gas: 1347370)\n[PASS] test_redeemRejectsZeroAndTooMany() (gas: 986018)\n[PASS] test_redeemSurvivesCoinsThatBurnAllGas() (gas: 4399571)\n[PASS] test_redeemToImdPaysAShortFillInKindLessHalfPercent() (gas: 1780752)\n[PASS] test_redeemToImdPaysInKindWhenASaleFails() (gas: 2970746)\n[PASS] test_redeemToImdRevertsBelowMinOut() (gas: 1786597)\n[PASS] test_redeemToImdSellsAndKeepsFee() (gas: 1753610)\n[PASS] test_redeemToImdSurvivesAHookThatBurnsGas() (gas: 2457667)\n[PASS] test_submitRejectsBadLists() (gas: 4697840)\n[PASS] test_submitRejectsWrongAnswerAndForgedSignature() (gas: 1637702)\n[PASS] test_submitStoresTheNextListAndRewards() (gas: 1525852)\n[PASS] test_unlockCallbackAndSwapSelfAreNotCallable() (gas: 103394)\nSuite result: ok. 45 passed; 0 failed; 0 skipped; finished in 351.66ms (418.89ms CPU time)\n\nRan 34 tests for test/Imdex5Edges.t.sol:Imdex5EdgesTest\n[PASS] testFuzz_mintBuysExactlyTheRoundedUpShare(uint256) (runs: 512, μ: 1916173, ~: 1915994)\nLogs:\n  Bound result 20817\n\n[PASS] testFuzz_mintFirstMintsExactlyTheRest(uint256) (runs: 512, μ: 1007733, ~: 1011580)\nLogs:\n  Bound result 6\n\n[PASS] testFuzz_onOracleResultForAnotherRequestIsIgnored(bytes32,uint16) (runs: 256, μ: 1027733, ~: 1027844)\n[PASS] testFuzz_onOracleResultFromAStrangerChangesNothing(address,bytes32,uint16) (runs: 256, μ: 1074641, ~: 1074828)\n[PASS] testFuzz_redeemNeverPaysAboveProRata(uint256,uint256) (runs: 512, μ: 1557262, ~: 1558293)\nLogs:\n  Bound result 3041781815232718207844\n  Bound result 1691716474837272096310\n\n[PASS] testFuzz_splittingARedeemStaysUnderProRata(uint256,uint256) (runs: 256, μ: 1748656, ~: 1748911)\nLogs:\n  Bound result 376929326866417176471\n  Bound result 7357926\n\n[PASS] test_aLaterAskReplacesAnUnsubmittedAnswer() (gas: 1880577)\n[PASS] test_aReenteringCoinCannotReenterAndIsNotPaidTwice() (gas: 2668786)\n[PASS] test_aReenteringCoinCannotReenterMintOrRebalanceFromRedeem() (gas: 3859967)\n[PASS] test_anUnsubmittedAnswerDoesNotSurviveAFailedLaterAsk() (gas: 1353192)\n[PASS] test_askRevertsWholeWhenTheIntakeRefuses() (gas: 334231)\n[PASS] test_askThresholdIsExactlyThreeQuartersOfAnImd() (gas: 1101807)\n[PASS] test_closeRequestNeedsAnOpenOne() (gas: 1003779)\n[PASS] test_closingARequestDoesNotResetTheInterval() (gas: 1161912)\n[PASS] test_mintCannotBeFreeWhenTheIndexHoldsValue() (gas: 1764420)\n[PASS] test_onOracleResultAfterCloseIsIgnored() (gas: 1097888)\n[PASS] test_onOracleResultWithFiveEntriesFitsTheStipend() (gas: 1140653)\n[PASS] test_oneGasBurningCoinDoesNotBlockRedeemGivenGas() (gas: 1666511)\n[PASS] test_rebalanceBuyMovesAPoolAtMostTwoPercent() (gas: 3677632)\n[PASS] test_rebalanceBuyStopsAtAQuarterWeight() (gas: 4008771)\n[PASS] test_rebalanceDoesNotTrimWithFewerThanFourCoins() (gas: 3253182)\n[PASS] test_rebalanceSellMovesAPoolAtMostTwoPercent() (gas: 3279514)\n[PASS] test_rebalanceTrimsToAQuarterNotBelow() (gas: 3767904)\n[PASS] test_redeemHalfPercentStaysWithRemainingHolders() (gas: 1555503)\n[PASS] test_redeemIdleImdThatCannotBeSentIsOwed() (gas: 1393841)\n[PASS] test_redeemToATokenWithoutCodeBecomesOwedAndClaimableLater() (gas: 1265948)\n[PASS] test_residualsAreRedeemedAndBlockMintWhileTheirPoolIsDead() (gas: 5189324)\n[PASS] test_rewardsNeverDipIntoIdleImd() (gas: 2713898)\n[PASS] test_sharesTransferLikeAnyErc20AndMoveNoHoldings() (gas: 1462919)\n[PASS] test_submitAndRebalancePayNoRewardWithoutFees() (gas: 3235302)\n[PASS] test_submitRejectsATamperedAnswerEvenWithAValidSignatureElsewhere() (gas: 1135492)\n[PASS] test_submitRejectsAnAttestationSignedForAnotherChain() (gas: 1440241)\n[PASS] test_submitRejectsAnAttestationSignedForAnotherConsumer() (gas: 1106100)\n[PASS] test_submitRejectsMalformedAnswerBytes() (gas: 1344202)\nSuite result: ok. 34 passed; 0 failed; 0 skipped; finished in 380.93ms (1.75s CPU time)\n\nRan 26 tests for test/Imdex5Revised.t.sol:Imdex5RevisedTest\n[PASS] testFuzz_mintFirstKeepsAPartialFillIdle(uint256,uint256) (runs: 256, μ: 1103740, ~: 1103775)\nLogs:\n  Bound result 4420\n  Bound result 828\n\n[PASS] testFuzz_redeemToImdPaysADeadCoinExactlyAsRedeemDoes(uint256) (runs: 256, μ: 1990136, ~: 1995917)\nLogs:\n  Bound result 56237503\n\n[PASS] testFuzz_redeemToImdPaysAShortFillInKindUnderTheRedeemRule(uint256,uint256) (runs: 256, μ: 1827698, ~: 1828967)\nLogs:\n  Bound result 53999999999999999993\n  Bound result 98000000000000000000\n\n[PASS] test_aCoinThatBurnsItsGasIsOwedAndTheIdleImdStillPaid() (gas: 1632576)\n[PASS] test_askAndCloseAtTheirExactBoundaries() (gas: 1205540)\n[PASS] test_askIsBlockedWhileAListAwaitsRebalance() (gas: 3285347)\n[PASS] test_claimThatFailsKeepsTheDebt() (gas: 1296929)\n[PASS] test_hookCannotCallSwapSelfOrTheOracleCallbacks() (gas: 3474867)\n[PASS] test_hookCannotCloseOrAnswerTheOpenRequestDuringASwap() (gas: 4127000)\n[PASS] test_lastRedeemerToImdTakesAllOfADeadCoin() (gas: 1753160)\n[PASS] test_margUsesItsOwnHookAndTheOthersShareG() (gas: 48921)\n[PASS] test_mintFirstPartialFillIsRedeemedProRataNotTwice() (gas: 1658817)\n[PASS] test_mintFirstRefusesAPoolThatReturnsNothingOnALargeAmount() (gas: 744341)\n[PASS] test_mintFirstRefusesDustThatBuysNothing() (gas: 2164385)\n[PASS] test_mintFirstRevertsWholeWhenTheHookMisbehaves() (gas: 992464196)\n[PASS] test_mintRevertsWholeWhenTheHookBurnsGasForTheIndex() (gas: 993090032)\n[PASS] test_mintRevertsWholeWhenTheHookLeavesADeltaUnsettled() (gas: 1342632)\n[PASS] test_mintSkipsAListCoinHeldAtZeroAndTheNextRebalanceBuysIt() (gas: 5529580)\n[PASS] test_onOracleResultNeedsExactlyFourAgreed() (gas: 1158231)\n[PASS] test_owedAccumulatesAcrossRedeemsAndIsPaidOnce() (gas: 2200225)\n[PASS] test_rebalanceSkipsEveryBurningSwapAndStillAdoptsTheList() (gas: 3719990)\n[PASS] test_redeemSurvivesFiveGasBurningCoinsWithOrdinaryGas() (gas: 5815698)\n[PASS] test_redeemToImdPaysInKindWhenTheHookLeavesADeltaUnsettled() (gas: 2231774)\n[PASS] test_submitRejectsALaunchWithoutAHookOrAToken() (gas: 1851145)\n[PASS] test_submitTakesAnAttestationOnce() (gas: 1458003)\n[PASS] test_submitUsesTheRegistryArtifactsNotTheStartingList() (gas: 1559167)\nSuite result: ok. 26 passed; 0 failed; 0 skipped; finished in 512.44ms (972.60ms CPU time)\n\nRan 7 tests for test/Imdex5TaxedCoin.t.sol:Imdex5TaxedCoinTest\n[PASS] testFuzz_taxedCoinLifecycle(uint256,uint256,uint256) (runs: 256, μ: 7858339, ~: 7863296)\nLogs:\n  Bound result 499000003714468338621\n  Bound result 474684018020590170568\n  Bound result 704887156143207119770\n\n[PASS] test_firstMintCreditsOnlyWhatArrives() (gas: 1253132)\n[PASS] test_firstMintMinOutChecksTheNetReceipt() (gas: 1358480)\n[PASS] test_lastHolderCanReceiveEveryCoinAfterAnImdExit() (gas: 2639071)\n[PASS] test_outstandingOwedIsNotCountedAsANewReceiptAndRemainsClaimable() (gas: 5186203)\n[PASS] test_taxedCoinFullLifecycle() (gas: 7852114)\n[PASS] test_taxedRebalanceBuyCreditsOnlyNewReceipts() (gas: 5574549)\nSuite result: ok. 7 passed; 0 failed; 0 skipped; finished in 553.99ms (575.34ms CPU time)\n\nRan 1 test for test/Imdex5.invariant.t.sol:Imdex5InvariantTest\n[PASS]\nImdex5InvariantTest invariants:\n[PASS] invariant_actorsNeverExtractMoreImdThanTheyPutIn\n[PASS] invariant_coinBalancesAreHeldPlusOwed\n[PASS] invariant_feeImdLeavesOnlyForTheOracleAndRewards\n[PASS] invariant_imdBalanceIsIdlePlusFeePlusOwed\n[PASS] invariant_listShape\n[PASS] invariant_noFreeMintWhileValueIsHeld\n[PASS] invariant_requestStateIsConsistent\n[PASS] invariant_zeroSupplyMeansNothingHeld\n Imdex5InvariantTest invariants (runs: 96, calls: 3840, reverts: 0)\n\n╭---------------+------------------+-------+---------+----------╮\n| Contract      | Selector         | Calls | Reverts | Discards |\n+===============================================================+\n| Imdex5Handler | ask              | 187   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | claim            | 201   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | closeRequest     | 187   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | deliverFailure   | 190   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | deliverResult    | 212   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | fund             | 188   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | mint             | 427   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | mintFirst        | 195   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | rebalance        | 207   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | redeem           | 221   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | redeemToImd      | 201   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setCoinFailMode  | 199   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setHookMisbehave | 218   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setPoolMaxIn     | 207   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | submit           | 206   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | togglePool       | 180   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | transferShares   | 222   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | warp             | 192   | 0       | 0        |\n╰---------------+------------------+-------+---------+----------╯\n\nLogs:\n  Bound result 63\n  Bound result 4245\n  Bound result 100000000000000000007\n  Bound result 7168\n  Bound result 8567\n  Bound result 183307044961732093281\n\nSuite result: ok. 1 passed; 0 failed; 0 skipped; finished in 2.60s (2.59s CPU time)\n\nRan 1 test for test/Imdex5.invariant.t.sol:Imdex5TaxedCoinInvariantTest\n[PASS]\nImdex5TaxedCoinInvariantTest invariants:\n[PASS] invariant_actorsNeverExtractMoreImdThanTheyPutIn\n[PASS] invariant_coinBalancesAreHeldPlusOwed\n[PASS] invariant_feeImdLeavesOnlyForTheOracleAndRewards\n[PASS] invariant_imdBalanceIsIdlePlusFeePlusOwed\n[PASS] invariant_listShape\n[PASS] invariant_noFreeMintWhileValueIsHeld\n[PASS] invariant_requestStateIsConsistent\n[PASS] invariant_zeroSupplyMeansNothingHeld\n Imdex5TaxedCoinInvariantTest invariants (runs: 256, calls: 128000, reverts: 0)\n\n╭---------------+------------------+-------+---------+----------╮\n| Contract      | Selector         | Calls | Reverts | Discards |\n+===============================================================+\n| Imdex5Handler | ask              | 6674  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | claim            | 6709  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | closeRequest     | 6596  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | deliverFailure   | 6790  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | deliverResult    | 6737  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | fund             | 6740  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | mint             | 13506 | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | mintFirst        | 6723  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | rebalance        | 6694  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | redeem           | 6686  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | redeemToImd      | 6745  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setCoinFailMode  | 6719  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setHookMisbehave | 6673  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setPoolMaxIn     | 6874  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | submit           | 6821  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | togglePool       | 6846  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | transferShares   | 6783  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | warp             | 6684  | 0       | 0        |\n╰---------------+------------------+-------+---------+----------╯\n\nLogs:\n  Bound result 9795\n  Bound result 6730\n  Bound result 2000000000000000000\n  Bound result 9950\n  Bound result 500000000000000000\n  Bound result 16586\n  Bound result 1000000000000000000000\n  Bound result 16054\n  Bound result 18601\n  Bound result 770362672619782256389\n  Bound result 6025\n  Bound result 13818\n  Bound result 1000000\n  Bound result 537600\n  Bound result 15885\n  Bound result 16\n  Bound result 5\n  Bound result 409600\n  Bound result 222809\n  Bound result 48500000000000000000\n  Bound result 2000000000000000000\n  Bound result 710\n  Bound result 32348688161332256026\n  Bound result 4087012224027472\n  Bound result 5139\n  Bound result 4242\n  Bound result 486400\n  Bound result 11\n  Bound result 20330184174085958498\n  Bound result 2500000\n  Bound result 30000000\n  Bound result 15424\n  Bound result 5022\n  Bound result 8000000\n  Bound result 5815\n  Bound result 8447\n  Bound result 3451596883\n  Bound result 360952252958477371408\n  Bound result 2681\n  Bound result 10425\n  Bound result 3182\n  Bound result 3000000\n  Bound result 35998462224112495958\n  Bound result 49999999999999999999\n  Bound result 246362405855981574245\n  Bound result 179200\n  Bound result 10205\n  Bound result 6092\n  Bound result 110234333066556236641\n  Bound result 262165895631560036161\n  Bound result 38160603865210761570\n  Bound result 469353047785685202333\n  Bound result 7050522208774116496\n  Bound result 3\n  Bound result 50000000000000000000\n  Bound result 759350369237622786608\n  Bound result 1732954822965573246594\n  Bound result 267135152928642052519\n  Bound result 31242551756066888927\n  Bound result 194113\n  Bound result 50000000000000000000\n  Bound result 19993\n  Bound result 60\n  Bound result 9795\n  Bound result 566823\n  Bound result 749999999999999999\n  Bound result 1344\n  Bound result 86699674470647\n  Bound result 400000000000000000000\n  Bound result 7147\n  Bound result 189000000000000000000\n  Bound result 2222\n  Bound result 4\n  Bound result 282708526209578668\n  Bound result 50000000000000000000\n  Bound result 18725\n  Bound result 31543972\n  Bound result 545744\n  Bound result 13\n  Bound result 500000000000000000000\n  Bound result 358400\n  Bound result 641024\n  Bound result 39000000000000000000\n  Bound result 15\n  Bound result 888\n  Bound result 6830\n  Bound result 98000000000000000000\n  Bound result 1207357094\n  Bound result 737\n  Bound result 516309571264052353880\n  Bound result 284935866042189488215\n  Bound result 8\n  Bound result 11\n  Bound result 640924\n  Bound result 2500000\n  Bound result 46000000000000000000\n  Bound result 15\n  Bound result 552033\n  Bound result 44878156\n  Bound result 18288\n  Bound result 24\n  Bound result 1632\n  Bound result 532\n  Bound result 2989\n\nSuite result: ok. 1 passed; 0 failed; 0 skipped; finished in 89.75s (89.74s CPU time)\n\nRan 8 test suites in 89.76s (94.47s CPU time): 123 tests passed, 0 failed, 0 skipped (123 total tests)\n","passed":true},{"durationMs":96,"exitCode":0,"name":"source-index","output":"{\"v\":1,\"entryPoints\":[\"Imdex5.approve(address,uint256)\",\"Imdex5.ask()\",\"Imdex5.claim(address)\",\"Imdex5.closeRequest()\",\"Imdex5.fund(uint256)\",\"Imdex5.mint(uint256,uint256)\",\"Imdex5.mintFirst(uint256,uint256[])\",\"Imdex5.onOracleFailure(bytes32,uint8,bytes32,uint16,uint16,bytes)\",\"Imdex5.onOracleResult(bytes32,(bytes32,uint256,bytes32,uint8,bytes,uint256,uint64,uint64,bytes32,bytes32,uint16,uint16,uint16,uint64,uint64),bytes)\",\"Imdex5.rebalance()\",\"Imdex5.redeem(uint256)\",\"Imdex5.redeemToImd(uint256,uint256)\",\"Imdex5.submit((bytes32,uint256,bytes32,uint8,bytes,uint256,uint64,uint64,bytes32,bytes32,uint16,uint16,uint16,uint64,uint64),bytes)\",\"Imdex5.swapSelf(address,address,bool,uint256,bool,bool)\",\"Imdex5.transfer(address,uint256)\",\"Imdex5.transferFrom(address,address,uint256)\",\"Imdex5.unlockCallback(bytes)\"],\"files\":{\".gitignore\":2,\"ADAPTATION.md\":161,\"README.md\":266,\"foundry.toml\":19,\"launch.json\":10,\"src/Imdex5.sol\":625,\"src/Interfaces.sol\":61,\"src/OracleAttestation.sol\":221,\"test/Imdex5.invariant.t.sol\":513,\"test/Imdex5.t.sol\":1017,\"test/Imdex5Base.sol\":174,\"test/Imdex5Edges.t.sol\":709,\"test/Imdex5Revised.t.sol\":503,\"test/Imdex5ShortFill.t.sol\":205,\"test/Imdex5TaxedCoin.t.sol\":252,\"test/OracleConsumerConformance.t.sol\":74,\"test/mocks/AttackMocks.sol\":85,\"test/mocks/Mocks.sol\":337,\"test/mocks/PoolTaxERC20.sol\":25},\"excluded\":[\"lib/\",\"node_modules/\"],\"truncated\":false}","passed":true}],"detail":"all checks passed","evaluation":"checks","profile":"foundry","status":"accepted","submissionHash":"420d3232e0f7bf83815cb2b8fdfc24b2ae758c1cb799d291212f7c3b89bda20e","verifiedTreeHash":"b10237c1cf7a820579c25b92456fc4b068e238a1","verifierVersion":"0.1.0+67c588fa"},{"checks":[{"durationMs":60661,"exitCode":0,"name":"build","output":"Compiling 60 files with Solc 0.8.26\nSolc 0.8.26 finished in 60.57s\nCompiler run successful!\n","passed":true},{"durationMs":53714,"exitCode":0,"name":"test","output":"No files changed, compilation skipped\n\nRan 2 tests for test/OracleConsumerConformance.t.sol:OracleConsumerConformanceTest\n[PASS] test_callbackSelectorIsCanonical() (gas: 4542)\n[PASS] test_digestMatchesTheProtocol() (gas: 13344)\nSuite result: ok. 2 passed; 0 failed; 0 skipped; finished in 800.38µs (181.45µs CPU time)\n\nRan 45 tests for test/Imdex5.t.sol:Imdex5Test\n[PASS] testFuzz_mintThenRedeemNeverPaysMoreThanDeposited(uint256,uint256) (runs: 256, μ: 2402130, ~: 2410317)\nLogs:\n  Bound result 1253638085539977034323\n  Bound result 7357926\n\n[PASS] test_askPaysIntakeAndCaller() (gas: 1135679)\n[PASS] test_askReturnsWithoutFees() (gas: 155177)\n[PASS] test_askSevenDayInterval() (gas: 1185273)\n[PASS] test_bodyIsTheJsonTheBriefDescribes() (gas: 30515)\n[PASS] test_closeRequestAfterTwoDays() (gas: 1024939)\n[PASS] test_deployment() (gas: 94843)\n[PASS] test_feeImdOnlyLeavesForOracleAndRewards() (gas: 4919021)\n[PASS] test_fundAddsToFeeImd() (gas: 147774)\n[PASS] test_hookCannotReenter() (gas: 5127201)\n[PASS] test_mintBuysProportionallyAndRefunds() (gas: 1828097)\n[PASS] test_mintFirstBuysEqualPartsAndTakesFee() (gas: 1104040)\n[PASS] test_mintFirstKeepsWhatAPoolCouldNotTakeAsIdle() (gas: 1324784)\n[PASS] test_mintFirstRequiresZeroSupplyAndRightLength() (gas: 1021992)\n[PASS] test_mintFirstRevertsOnMinOut() (gas: 727125)\n[PASS] test_mintFirstRevertsWhenABuyFails() (gas: 814503)\n[PASS] test_mintFirstRevertsWhenABuyReturnsNothing() (gas: 2113144)\n[PASS] test_mintNeverIssuesSharesForNothing() (gas: 327765)\n[PASS] test_mintRequiresSupply() (gas: 40136)\n[PASS] test_mintRevertsOverMaxImdIn() (gas: 1730309)\n[PASS] test_mintRevertsWhenABuyFailsButScalesANonzeroShortFill() (gas: 2271266)\n[PASS] test_mintRoundsAgainstTheMinter() (gas: 1709386)\n[PASS] test_onOracleFailureOnlyFromIntake() (gas: 1062770)\n[PASS] test_onOracleResultStoresOnlyTheOpenRequestFromTheIntake() (gas: 1296306)\n[PASS] test_rebalanceNeedsAList() (gas: 41260)\n[PASS] test_rebalanceSellsAdoptsAndBuys() (gas: 5244826)\n[PASS] test_rebalanceSkipsADeadPool() (gas: 2973938)\n[PASS] test_rebalanceSkipsAHookThatLeavesAnUnsettledDelta() (gas: 3868662)\n[PASS] test_rebalanceSurvivesAHookThatBurnsAllGas() (gas: 5485027)\n[PASS] test_rebalanceTrimsAHoldingOverAQuarter() (gas: 3452338)\n[PASS] test_rebalanceWithNothingHeld() (gas: 2262505)\n[PASS] test_redeemCannotBeBlockedByACoin() (gas: 1575655)\n[PASS] test_redeemLastSharesPaysEverything() (gas: 2144373)\n[PASS] test_redeemPaysInKindLessHalfPercent() (gas: 1347370)\n[PASS] test_redeemRejectsZeroAndTooMany() (gas: 986018)\n[PASS] test_redeemSurvivesCoinsThatBurnAllGas() (gas: 4399571)\n[PASS] test_redeemToImdPaysAShortFillInKindLessHalfPercent() (gas: 1780752)\n[PASS] test_redeemToImdPaysInKindWhenASaleFails() (gas: 2970746)\n[PASS] test_redeemToImdRevertsBelowMinOut() (gas: 1786597)\n[PASS] test_redeemToImdSellsAndKeepsFee() (gas: 1753610)\n[PASS] test_redeemToImdSurvivesAHookThatBurnsGas() (gas: 2457667)\n[PASS] test_submitRejectsBadLists() (gas: 4557195)\n[PASS] test_submitRejectsWrongAnswerAndForgedSignature() (gas: 1635497)\n[PASS] test_submitStoresTheNextListAndRewards() (gas: 1523647)\n[PASS] test_unlockCallbackAndSwapSelfAreNotCallable() (gas: 103394)\nSuite result: ok. 45 passed; 0 failed; 0 skipped; finished in 183.36ms (226.00ms CPU time)\n\nRan 5 tests for test/Imdex5ShortFill.t.sol:Imdex5ShortFillTest\n[PASS] testFuzz_mintUsesTheLeastFilledCoinAndChargesEveryBuy(uint256,uint16[5]) (runs: 256, μ: 1632909, ~: 1639789)\nLogs:\n  Bound result 5000000000000000000\n  Bound result 18\n  Bound result 3000\n  Bound result 100\n  Bound result 3829\n  Bound result 3\n\n[PASS] test_mintRevertsAndRollsBackEarlierBuysWhenACoinDeliversZero() (gas: 1284251)\n[PASS] test_mintRevertsWhenANonzeroFillRoundsSharesToZero() (gas: 1193597)\n[PASS] test_shortFillMintsTheDeliveredFraction() (gas: 866125)\n[PASS] test_shortFillStillEnforcesMaxImdInAndRollsBack() (gas: 1737074)\nSuite result: ok. 5 passed; 0 failed; 0 skipped; finished in 194.52ms (195.40ms CPU time)\n\nRan 26 tests for test/Imdex5Revised.t.sol:Imdex5RevisedTest\n[PASS] testFuzz_mintFirstKeepsAPartialFillIdle(uint256,uint256) (runs: 256, μ: 1103740, ~: 1103771)\nLogs:\n  Bound result 3345236304161853607553\n  Bound result 7357926\n\n[PASS] testFuzz_redeemToImdPaysADeadCoinExactlyAsRedeemDoes(uint256) (runs: 256, μ: 1990151, ~: 1995939)\nLogs:\n  Bound result 2989\n\n[PASS] testFuzz_redeemToImdPaysAShortFillInKindUnderTheRedeemRule(uint256,uint256) (runs: 256, μ: 1827526, ~: 1828967)\nLogs:\n  Bound result 994000000000000003001\n  Bound result 20000000000000000\n\n[PASS] test_aCoinThatBurnsItsGasIsOwedAndTheIdleImdStillPaid() (gas: 1632576)\n[PASS] test_askAndCloseAtTheirExactBoundaries() (gas: 1201130)\n[PASS] test_askIsBlockedWhileAListAwaitsRebalance() (gas: 3280937)\n[PASS] test_claimThatFailsKeepsTheDebt() (gas: 1296929)\n[PASS] test_hookCannotCallSwapSelfOrTheOracleCallbacks() (gas: 3472662)\n[PASS] test_hookCannotCloseOrAnswerTheOpenRequestDuringASwap() (gas: 4124785)\n[PASS] test_lastRedeemerToImdTakesAllOfADeadCoin() (gas: 1753160)\n[PASS] test_margUsesItsOwnHookAndTheOthersShareG() (gas: 48921)\n[PASS] test_mintFirstPartialFillIsRedeemedProRataNotTwice() (gas: 1658817)\n[PASS] test_mintFirstRefusesAPoolThatReturnsNothingOnALargeAmount() (gas: 744341)\n[PASS] test_mintFirstRefusesDustThatBuysNothing() (gas: 2164385)\n[PASS] test_mintFirstRevertsWholeWhenTheHookMisbehaves() (gas: 992464196)\n[PASS] test_mintRevertsWholeWhenTheHookBurnsGasForTheIndex() (gas: 993090027)\n[PASS] test_mintRevertsWholeWhenTheHookLeavesADeltaUnsettled() (gas: 1342628)\n[PASS] test_mintSkipsAListCoinHeldAtZeroAndTheNextRebalanceBuysIt() (gas: 5525166)\n[PASS] test_onOracleResultNeedsExactlyFourAgreed() (gas: 1156026)\n[PASS] test_owedAccumulatesAcrossRedeemsAndIsPaidOnce() (gas: 2200225)\n[PASS] test_rebalanceSkipsEveryBurningSwapAndStillAdoptsTheList() (gas: 3717785)\n[PASS] test_redeemSurvivesFiveGasBurningCoinsWithOrdinaryGas() (gas: 5815698)\n[PASS] test_redeemToImdPaysInKindWhenTheHookLeavesADeltaUnsettled() (gas: 2231774)\n[PASS] test_submitRejectsALaunchWithoutAHookOrAToken() (gas: 1831635)\n[PASS] test_submitTakesAnAttestationOnce() (gas: 1455798)\n[PASS] test_submitUsesTheRegistryArtifactsNotTheStartingList() (gas: 1556962)\nSuite result: ok. 26 passed; 0 failed; 0 skipped; finished in 248.82ms (530.44ms CPU time)\n\nRan 9 tests for test/Imdex5TaxEverywhere.t.sol:Imdex5TaxEverywhereTest\n[PASS] testFuzz_everyCoinTaxedLifecycle(uint16[5],uint256,uint256,uint256) (runs: 200, μ: 9108783, ~: 9113210)\nLogs:\n  Bound result 17\n  Bound result 0\n  Bound result 1677\n  Bound result 15\n  Bound result 2\n  Bound result 20738322355387579127\n  Bound result 101673218719243085500\n  Bound result 763861319919290707570\n\n[PASS] testFuzz_theMostTaxedCoinDecidesTheMint(uint8,uint16,uint16,uint256) (runs: 200, μ: 2665382, ~: 2694947)\nLogs:\n  Bound result 0\n  Bound result 384\n  Bound result 2\n  Bound result 480881522103116803108\n\n[PASS] test_aCoinTaxingItsOwnSettlementIsNeverSoldAndIsPaidInKind() (gas: 6623970)\n[PASS] test_aCoinTaxingItsOwnSettlementStaysAResidualThroughARebalance() (gas: 7396767)\n[PASS] test_aCoinThatKeepsEverythingFailsALaterMintWholeAndRedeemsStillPay() (gas: 6558722)\n[PASS] test_aCoinThatKeepsEverythingFailsTheFirstMintWhole() (gas: 1464794)\n[PASS] test_aCoinThatKeepsEverythingFailsTheOneWeiMint() (gas: 3400010)\n[PASS] test_aDonationNeitherChangesHeldNorInflatesAMintOrARedeem() (gas: 2472300)\n[PASS] test_taxOnTopOfAPartialFillCreditsTheNetAndMintsThatFraction() (gas: 5224672)\nSuite result: ok. 9 passed; 0 failed; 0 skipped; finished in 381.60ms (554.25ms CPU time)\n\nRan 7 tests for test/Imdex5TaxedCoin.t.sol:Imdex5TaxedCoinTest\n[PASS] testFuzz_taxedCoinLifecycle(uint256,uint256,uint256) (runs: 256, μ: 7826152, ~: 7830766)\nLogs:\n  Bound result 336964905097790544767\n  Bound result 499000000000000031447\n  Bound result 899999999999999999999\n\n[PASS] test_firstMintCreditsOnlyWhatArrives() (gas: 1253136)\n[PASS] test_firstMintMinOutChecksTheNetReceipt() (gas: 1358483)\n[PASS] test_lastHolderCanReceiveEveryCoinAfterAnImdExit() (gas: 2639075)\n[PASS] test_outstandingOwedIsNotCountedAsANewReceiptAndRemainsClaimable() (gas: 5170057)\n[PASS] test_taxedCoinFullLifecycle() (gas: 7819529)\n[PASS] test_taxedRebalanceBuyCreditsOnlyNewReceipts() (gas: 5572349)\nSuite result: ok. 7 passed; 0 failed; 0 skipped; finished in 381.69ms (397.28ms CPU time)\n\nRan 33 tests for test/Imdex5Edges.t.sol:Imdex5EdgesTest\n[PASS] testFuzz_mintBuysExactlyTheRoundedUpShare(uint256) (runs: 512, μ: 1916172, ~: 1915989)\nLogs:\n  Bound result 944140059013086026251\n\n[PASS] testFuzz_mintFirstMintsExactlyTheRest(uint256) (runs: 512, μ: 1007704, ~: 1011584)\nLogs:\n  Bound result 2966009833412329144496\n\n[PASS] testFuzz_onOracleResultForAnotherRequestIsIgnored(bytes32,uint16) (runs: 256, μ: 1025505, ~: 1025617)\n[PASS] testFuzz_onOracleResultFromAStrangerChangesNothing(address,bytes32,uint16) (runs: 256, μ: 1072422, ~: 1072601)\n[PASS] testFuzz_redeemNeverPaysAboveProRata(uint256,uint256) (runs: 512, μ: 1557361, ~: 1558293)\nLogs:\n  Bound result 2660511380455133845832\n  Bound result 501212658599702984752\n\n[PASS] testFuzz_splittingARedeemStaysUnderProRata(uint256,uint256) (runs: 256, μ: 1748648, ~: 1748911)\nLogs:\n  Bound result 4304\n  Bound result 15850\n\n[PASS] test_aLaterAskReplacesAnUnsubmittedAnswer() (gas: 1788380)\n[PASS] test_aReenteringCoinCannotReenterAndIsNotPaidTwice() (gas: 2668764)\n[PASS] test_aReenteringCoinCannotReenterMintOrRebalanceFromRedeem() (gas: 3857762)\n[PASS] test_askRevertsWholeWhenTheIntakeRefuses() (gas: 332004)\n[PASS] test_askThresholdIsExactlyThreeQuartersOfAnImd() (gas: 1099602)\n[PASS] test_closeRequestNeedsAnOpenOne() (gas: 1001574)\n[PASS] test_closingARequestDoesNotResetTheInterval() (gas: 1157502)\n[PASS] test_mintCannotBeFreeWhenTheIndexHoldsValue() (gas: 1764414)\n[PASS] test_onOracleResultAfterCloseIsIgnored() (gas: 1095692)\n[PASS] test_onOracleResultWithFiveEntriesFitsTheStipend() (gas: 1138426)\n[PASS] test_oneGasBurningCoinDoesNotBlockRedeemGivenGas() (gas: 1666511)\n[PASS] test_rebalanceBuyMovesAPoolAtMostTwoPercent() (gas: 3675405)\n[PASS] test_rebalanceBuyStopsAtAQuarterWeight() (gas: 4006566)\n[PASS] test_rebalanceDoesNotTrimWithFewerThanFourCoins() (gas: 3250977)\n[PASS] test_rebalanceSellMovesAPoolAtMostTwoPercent() (gas: 3277309)\n[PASS] test_rebalanceTrimsToAQuarterNotBelow() (gas: 3765711)\n[PASS] test_redeemHalfPercentStaysWithRemainingHolders() (gas: 1555481)\n[PASS] test_redeemIdleImdThatCannotBeSentIsOwed() (gas: 1393819)\n[PASS] test_redeemToATokenWithoutCodeBecomesOwedAndClaimableLater() (gas: 1265926)\n[PASS] test_residualsAreRedeemedAndBlockMintWhileTheirPoolIsDead() (gas: 5187110)\n[PASS] test_rewardsNeverDipIntoIdleImd() (gas: 2711693)\n[PASS] test_sharesTransferLikeAnyErc20AndMoveNoHoldings() (gas: 1462919)\n[PASS] test_submitAndRebalancePayNoRewardWithoutFees() (gas: 3233097)\n[PASS] test_submitRejectsATamperedAnswerEvenWithAValidSignatureElsewhere() (gas: 1133265)\n[PASS] test_submitRejectsAnAttestationSignedForAnotherChain() (gas: 1438036)\n[PASS] test_submitRejectsAnAttestationSignedForAnotherConsumer() (gas: 1103895)\n[PASS] test_submitRejectsMalformedAnswerBytes() (gas: 1341770)\nSuite result: ok. 33 passed; 0 failed; 0 skipped; finished in 381.85ms (1.52s CPU time)\n\nRan 1 test for test/Imdex5TaxEverywhere.t.sol:Imdex5AllCoinsTaxedInvariantTest\n[PASS]\nImdex5AllCoinsTaxedInvariantTest invariants:\n[PASS] invariant_taxed_actorsNeverExtractMoreImdThanTheyPutIn\n[PASS] invariant_taxed_coinBalancesAreHeldPlusOwed\n[PASS] invariant_taxed_everyHoldingIsListed\n[PASS] invariant_taxed_imdBalanceIsIdlePlusFeePlusOwed\n[PASS] invariant_taxed_zeroSupplyMeansNothingHeld\n Imdex5AllCoinsTaxedInvariantTest invariants (runs: 96, calls: 3840, reverts: 0)\n\n╭---------------+------------------+-------+---------+----------╮\n| Contract      | Selector         | Calls | Reverts | Discards |\n+===============================================================+\n| Imdex5Handler | ask              | 191   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | claim            | 197   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | deliverResult    | 173   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | fund             | 230   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | mint             | 419   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | mintFirst        | 224   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | rebalance        | 218   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | redeem           | 214   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | redeemToImd      | 217   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setCoinFailMode  | 229   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setHookMisbehave | 225   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setPoolMaxIn     | 225   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | submit           | 232   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | togglePool       | 216   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | transferShares   | 213   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | warp             | 213   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| TaxKnobs      | setTax           | 204   | 0       | 0        |\n╰---------------+------------------+-------+---------+----------╯\n\nLogs:\n  Bound result 19005\n  Bound result 281878948113154373683\n  Bound result 8283\n  Bound result 179200\n  Bound result 11851\n  Bound result 10000\n\nSuite result: ok. 1 passed; 0 failed; 0 skipped; finished in 1.28s (1.27s CPU time)\n\nRan 1 test for test/Imdex5.invariant.t.sol:Imdex5InvariantTest\n[PASS]\nImdex5InvariantTest invariants:\n[PASS] invariant_actorsNeverExtractMoreImdThanTheyPutIn\n[PASS] invariant_coinBalancesAreHeldPlusOwed\n[PASS] invariant_feeImdLeavesOnlyForTheOracleAndRewards\n[PASS] invariant_imdBalanceIsIdlePlusFeePlusOwed\n[PASS] invariant_listShape\n[PASS] invariant_noFreeMintWhileValueIsHeld\n[PASS] invariant_requestStateIsConsistent\n[PASS] invariant_zeroSupplyMeansNothingHeld\n Imdex5InvariantTest invariants (runs: 96, calls: 3840, reverts: 0)\n\n╭---------------+------------------+-------+---------+----------╮\n| Contract      | Selector         | Calls | Reverts | Discards |\n+===============================================================+\n| Imdex5Handler | ask              | 187   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | claim            | 201   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | closeRequest     | 187   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | deliverFailure   | 190   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | deliverResult    | 212   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | fund             | 188   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | mint             | 427   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | mintFirst        | 195   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | rebalance        | 207   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | redeem           | 221   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | redeemToImd      | 201   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setCoinFailMode  | 199   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setHookMisbehave | 218   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setPoolMaxIn     | 207   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | submit           | 206   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | togglePool       | 180   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | transferShares   | 222   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | warp             | 192   | 0       | 0        |\n╰---------------+------------------+-------+---------+----------╯\n\nLogs:\n  Bound result 63\n  Bound result 18446744073709551616\n  Bound result 9795\n  Bound result 7168\n  Bound result 8793\n  Bound result 183307044961732093281\n\nSuite result: ok. 1 passed; 0 failed; 0 skipped; finished in 1.54s (1.53s CPU time)\n\nRan 1 test for test/Imdex5.invariant.t.sol:Imdex5TaxedCoinInvariantTest\n[PASS]\nImdex5TaxedCoinInvariantTest invariants:\n[PASS] invariant_actorsNeverExtractMoreImdThanTheyPutIn\n[PASS] invariant_coinBalancesAreHeldPlusOwed\n[PASS] invariant_feeImdLeavesOnlyForTheOracleAndRewards\n[PASS] invariant_imdBalanceIsIdlePlusFeePlusOwed\n[PASS] invariant_listShape\n[PASS] invariant_noFreeMintWhileValueIsHeld\n[PASS] invariant_requestStateIsConsistent\n[PASS] invariant_zeroSupplyMeansNothingHeld\n Imdex5TaxedCoinInvariantTest invariants (runs: 256, calls: 128000, reverts: 0)\n\n╭---------------+------------------+-------+---------+----------╮\n| Contract      | Selector         | Calls | Reverts | Discards |\n+===============================================================+\n| Imdex5Handler | ask              | 6674  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | claim            | 6709  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | closeRequest     | 6596  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | deliverFailure   | 6790  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | deliverResult    | 6737  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | fund             | 6740  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | mint             | 13506 | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | mintFirst        | 6723  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | rebalance        | 6694  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | redeem           | 6686  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | redeemToImd      | 6745  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setCoinFailMode  | 6719  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setHookMisbehave | 6673  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setPoolMaxIn     | 6874  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | submit           | 6821  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | togglePool       | 6846  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | transferShares   | 6783  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | warp             | 6684  | 0       | 0        |\n╰---------------+------------------+-------+---------+----------╯\n\nLogs:\n  Bound result 9805\n  Bound result 6765\n  Bound result 2000000000000000000\n  Bound result 499999999999999980101\n  Bound result 500000000000000000\n  Bound result 16457\n  Bound result 10000000000000000000\n  Bound result 16054\n  Bound result 18266\n  Bound result 770362672619782256389\n  Bound result 5794\n  Bound result 13817\n  Bound result 1000000\n  Bound result 544000\n  Bound result 15709\n  Bound result 16\n  Bound result 9795\n  Bound result 230400\n  Bound result 222809\n  Bound result 50000000000000000000\n  Bound result 50000000000000000000\n  Bound result 549082\n  Bound result 32348688161332256026\n  Bound result 4087012224027472\n  Bound result 4562\n  Bound result 4244\n  Bound result 486400\n  Bound result 12\n  Bound result 20330184174085958498\n  Bound result 999999999999999999993\n  Bound result 300000000000000000000\n  Bound result 15329\n  Bound result 5035\n  Bound result 300000000000000000000\n  Bound result 5814\n  Bound result 7145\n  Bound result 3451596881\n  Bound result 360952252958477371408\n  Bound result 2681\n  Bound result 10442\n  Bound result 3204\n  Bound result 50000000000000000000\n  Bound result 35998462224112495958\n  Bound result 49999999999999999999\n  Bound result 246362405855981574245\n  Bound result 500\n  Bound result 24\n  Bound result 326073132280493232483\n  Bound result 16670\n  Bound result 262165895631560036161\n  Bound result 37891794204391860257\n  Bound result 469353047785685202333\n  Bound result 7050522208774116496\n  Bound result 4\n  Bound result 19\n  Bound result 759350369237622786608\n  Bound result 9666\n  Bound result 267135152928642052519\n  Bound result 31242551756066888927\n  Bound result 194113\n  Bound result 50000000000000000000\n  Bound result 10234333066556236645\n  Bound result 60\n  Bound result 10205\n  Bound result 3\n  Bound result 566823\n  Bound result 259200\n  Bound result 1344\n  Bound result 86699674470647\n  Bound result 400000000000000000000\n  Bound result 8169\n  Bound result 1189000000000000000000\n  Bound result 2223\n  Bound result 4\n  Bound result 282708526209578668\n  Bound result 5000000000000000000\n  Bound result 18787\n  Bound result 31543972\n  Bound result 6732\n  Bound result 14\n  Bound result 691200\n  Bound result 665600\n  Bound result 641024\n  Bound result 50000000000000000000\n  Bound result 16\n  Bound result 444\n  Bound result 6778\n  Bound result 5000\n  Bound result 1207357094\n  Bound result 1075\n  Bound result 12455\n  Bound result 284935866042189488215\n  Bound result 9\n  Bound result 12\n  Bound result 6489\n  Bound result 999999999999999999993\n  Bound result 9950000000000000000\n  Bound result 16\n  Bound result 373760\n  Bound result 1413082648\n  Bound result 18274\n  Bound result 344999999999999999999\n  Bound result 1715\n  Bound result 532\n  Bound result 4242\n\nSuite result: ok. 1 passed; 0 failed; 0 skipped; finished in 53.61s (53.60s CPU time)\n\nRan 10 test suites in 53.61s (58.20s CPU time): 130 tests passed, 0 failed, 0 skipped (130 total tests)\n","passed":true},{"durationMs":42,"exitCode":0,"name":"source-index","output":"{\"v\":1,\"entryPoints\":[\"Imdex5.approve(address,uint256)\",\"Imdex5.ask()\",\"Imdex5.claim(address)\",\"Imdex5.closeRequest()\",\"Imdex5.fund(uint256)\",\"Imdex5.mint(uint256,uint256)\",\"Imdex5.mintFirst(uint256,uint256[])\",\"Imdex5.onOracleFailure(bytes32,uint8,bytes32,uint16,uint16,bytes)\",\"Imdex5.onOracleResult(bytes32,(bytes32,uint256,bytes32,uint8,bytes,uint256,uint64,uint64,bytes32,bytes32,uint16,uint16,uint16,uint64,uint64),bytes)\",\"Imdex5.rebalance()\",\"Imdex5.redeem(uint256)\",\"Imdex5.redeemToImd(uint256,uint256)\",\"Imdex5.submit((bytes32,uint256,bytes32,uint8,bytes,uint256,uint64,uint64,bytes32,bytes32,uint16,uint16,uint16,uint64,uint64),bytes)\",\"Imdex5.swapSelf(address,address,bool,uint256,bool,bool)\",\"Imdex5.transfer(address,uint256)\",\"Imdex5.transferFrom(address,address,uint256)\",\"Imdex5.unlockCallback(bytes)\"],\"files\":{\".gitignore\":2,\"ADAPTATION.md\":106,\"README.md\":244,\"foundry.toml\":19,\"launch.json\":10,\"src/Imdex5.sol\":623,\"src/Interfaces.sol\":61,\"src/OracleAttestation.sol\":221,\"test/Imdex5.invariant.t.sol\":508,\"test/Imdex5.t.sol\":1017,\"test/Imdex5Base.sol\":174,\"test/Imdex5Edges.t.sol\":673,\"test/Imdex5Revised.t.sol\":503,\"test/Imdex5ShortFill.t.sol\":135,\"test/Imdex5TaxEverywhere.t.sol\":517,\"test/Imdex5TaxedCoin.t.sol\":246,\"test/OracleConsumerConformance.t.sol\":74,\"test/mocks/AttackMocks.sol\":85,\"test/mocks/Mocks.sol\":337,\"test/mocks/PoolTaxERC20.sol\":25,\"test/mocks/TaxERC20.sol\":36},\"excluded\":[\"lib/\",\"node_modules/\"],\"truncated\":false}","passed":true}],"detail":"all checks passed","evaluation":"checks","profile":"foundry","status":"accepted","submissionHash":"5c123d2cbeaf26fa2c0df01d81defeadca0fe972fe18d55ae69740a67c01d23f","verifiedTreeHash":"a299084c9de4090c9fcd017e47971699a34f7531","verifierVersion":"0.1.0+7129bf9d"},{"checks":[{"durationMs":64569,"exitCode":0,"name":"build","output":"Compiling 60 files with Solc 0.8.26\nSolc 0.8.26 finished in 64.47s\nCompiler run successful!\n","passed":true},{"durationMs":55335,"exitCode":0,"name":"test","output":"No files changed, compilation skipped\n\nRan 2 tests for test/OracleConsumerConformance.t.sol:OracleConsumerConformanceTest\n[PASS] test_callbackSelectorIsCanonical() (gas: 4542)\n[PASS] test_digestMatchesTheProtocol() (gas: 13344)\nSuite result: ok. 2 passed; 0 failed; 0 skipped; finished in 530.09µs (79.49µs CPU time)\n\nRan 7 tests for test/Imdex5TaxedCoin.t.sol:Imdex5TaxedCoinTest\n[PASS] testFuzz_taxedCoinLifecycle(uint256,uint256,uint256) (runs: 256, μ: 7857815, ~: 7863207)\nLogs:\n  Bound result 336964905097790544767\n  Bound result 499000000000000031447\n  Bound result 899999999999999999999\n\n[PASS] test_firstMintCreditsOnlyWhatArrives() (gas: 1253132)\n[PASS] test_firstMintMinOutChecksTheNetReceipt() (gas: 1358480)\n[PASS] test_lastHolderCanReceiveEveryCoinAfterAnImdExit() (gas: 2639071)\n[PASS] test_outstandingOwedIsNotCountedAsANewReceiptAndRemainsClaimable() (gas: 5186203)\n[PASS] test_taxedCoinFullLifecycle() (gas: 7852114)\n[PASS] test_taxedRebalanceBuyCreditsOnlyNewReceipts() (gas: 5574549)\nSuite result: ok. 7 passed; 0 failed; 0 skipped; finished in 352.46ms (370.74ms CPU time)\n\nRan 9 tests for test/Imdex5TaxEverywhere.t.sol:Imdex5TaxEverywhereTest\n[PASS] testFuzz_everyCoinTaxedLifecycle(uint16[5],uint256,uint256,uint256) (runs: 200, μ: 9128778, ~: 9134276)\nLogs:\n  Bound result 0\n  Bound result 1652\n  Bound result 39\n  Bound result 17\n  Bound result 226\n  Bound result 499000000000124316582\n  Bound result 189718207048716987548\n  Bound result 103649605817155240501\n\n[PASS] testFuzz_theMostTaxedCoinDecidesTheMint(uint8,uint16,uint16,uint256) (runs: 200, μ: 2676640, ~: 2705489)\nLogs:\n  Bound result 4\n  Bound result 11\n  Bound result 3\n  Bound result 499000000000000000008\n\n[PASS] test_aCoinTaxingItsOwnSettlementIsNeverSoldAndIsPaidInKind() (gas: 6634770)\n[PASS] test_aCoinTaxingItsOwnSettlementStaysAResidualThroughARebalance() (gas: 7409774)\n[PASS] test_aCoinThatKeepsEverythingFailsALaterMintWholeAndRedeemsStillPay() (gas: 6560926)\n[PASS] test_aCoinThatKeepsEverythingFailsTheFirstMintWhole() (gas: 1464791)\n[PASS] test_aCoinThatKeepsEverythingFailsTheOneWeiMint() (gas: 3410807)\n[PASS] test_aDonationNeitherChangesHeldNorInflatesAMintOrARedeem() (gas: 2472301)\n[PASS] test_taxOnTopOfAPartialFillCreditsTheNetAndMintsThatFraction() (gas: 5235471)\nSuite result: ok. 9 passed; 0 failed; 0 skipped; finished in 406.02ms (595.28ms CPU time)\n\nRan 7 tests for test/Imdex5ShortFill.t.sol:Imdex5ShortFillTest\n[PASS] testFuzz_mintUsesTheLeastFilledCoinAndChargesEveryBuy(uint256,uint16[5]) (runs: 256, μ: 1632581, ~: 1639454)\nLogs:\n  Bound result 1000000000000000002\n  Bound result 1493\n  Bound result 3908\n  Bound result 5533\n  Bound result 4780\n  Bound result 59\n\n[PASS] test_mintRevertsAndRollsBackEarlierBuysWhenACoinDeliversZero() (gas: 1284256)\n[PASS] test_mintRevertsWhenANonzeroFillRoundsSharesToZero() (gas: 1193602)\n[PASS] test_shortFillChargesIdleImdForTheSharesIssuedOnly() (gas: 2598220)\n[PASS] test_shortFillMintsTheDeliveredFraction() (gas: 866129)\n[PASS] test_shortFillStillEnforcesMaxImdInAndRollsBack() (gas: 1737103)\n[PASS] test_sliverFillIssuesASliverAndChargesEveryBuy() (gas: 1284816)\nSuite result: ok. 7 passed; 0 failed; 0 skipped; finished in 406.00ms (407.63ms CPU time)\n\nRan 26 tests for test/Imdex5Revised.t.sol:Imdex5RevisedTest\n[PASS] testFuzz_mintFirstKeepsAPartialFillIdle(uint256,uint256) (runs: 256, μ: 1103677, ~: 1103772)\nLogs:\n  Bound result 100000000000000\n  Bound result 500000000000\n\n[PASS] testFuzz_redeemToImdPaysADeadCoinExactlyAsRedeemDoes(uint256) (runs: 256, μ: 1990135, ~: 1995917)\nLogs:\n  Bound result 4\n\n[PASS] testFuzz_redeemToImdPaysAShortFillInKindUnderTheRedeemRule(uint256,uint256) (runs: 256, μ: 1827517, ~: 1828973)\nLogs:\n  Bound result 994000000000000004420\n  Bound result 15771\n\n[PASS] test_aCoinThatBurnsItsGasIsOwedAndTheIdleImdStillPaid() (gas: 1632576)\n[PASS] test_askAndCloseAtTheirExactBoundaries() (gas: 1205540)\n[PASS] test_askIsBlockedWhileAListAwaitsRebalance() (gas: 3285347)\n[PASS] test_claimThatFailsKeepsTheDebt() (gas: 1296929)\n[PASS] test_hookCannotCallSwapSelfOrTheOracleCallbacks() (gas: 3474867)\n[PASS] test_hookCannotCloseOrAnswerTheOpenRequestDuringASwap() (gas: 4127000)\n[PASS] test_lastRedeemerToImdTakesAllOfADeadCoin() (gas: 1753160)\n[PASS] test_margUsesItsOwnHookAndTheOthersShareG() (gas: 48921)\n[PASS] test_mintFirstPartialFillIsRedeemedProRataNotTwice() (gas: 1658817)\n[PASS] test_mintFirstRefusesAPoolThatReturnsNothingOnALargeAmount() (gas: 744341)\n[PASS] test_mintFirstRefusesDustThatBuysNothing() (gas: 2164385)\n[PASS] test_mintFirstRevertsWholeWhenTheHookMisbehaves() (gas: 992464196)\n[PASS] test_mintRevertsWholeWhenTheHookBurnsGasForTheIndex() (gas: 993090032)\n[PASS] test_mintRevertsWholeWhenTheHookLeavesADeltaUnsettled() (gas: 1342632)\n[PASS] test_mintSkipsAListCoinHeldAtZeroAndTheNextRebalanceBuysIt() (gas: 5529580)\n[PASS] test_onOracleResultNeedsExactlyFourAgreed() (gas: 1158231)\n[PASS] test_owedAccumulatesAcrossRedeemsAndIsPaidOnce() (gas: 2200225)\n[PASS] test_rebalanceSkipsEveryBurningSwapAndStillAdoptsTheList() (gas: 3719990)\n[PASS] test_redeemSurvivesFiveGasBurningCoinsWithOrdinaryGas() (gas: 5815698)\n[PASS] test_redeemToImdPaysInKindWhenTheHookLeavesADeltaUnsettled() (gas: 2231774)\n[PASS] test_submitRejectsALaunchWithoutAHookOrAToken() (gas: 1851145)\n[PASS] test_submitTakesAnAttestationOnce() (gas: 1458003)\n[PASS] test_submitUsesTheRegistryArtifactsNotTheStartingList() (gas: 1559167)\nSuite result: ok. 26 passed; 0 failed; 0 skipped; finished in 406.06ms (732.59ms CPU time)\n\nRan 45 tests for test/Imdex5.t.sol:Imdex5Test\n[PASS] testFuzz_mintThenRedeemNeverPaysMoreThanDeposited(uint256,uint256) (runs: 256, μ: 2402269, ~: 2410296)\nLogs:\n  Bound result 1253638085539977034323\n  Bound result 7357926\n\n[PASS] test_askPaysIntakeAndCaller() (gas: 1137884)\n[PASS] test_askReturnsWithoutFees() (gas: 155177)\n[PASS] test_askSevenDayInterval() (gas: 1189683)\n[PASS] test_bodyIsTheJsonTheBriefDescribes() (gas: 30515)\n[PASS] test_closeRequestAfterTwoDays() (gas: 1027144)\n[PASS] test_deployment() (gas: 94843)\n[PASS] test_feeImdOnlyLeavesForOracleAndRewards() (gas: 4921231)\n[PASS] test_fundAddsToFeeImd() (gas: 147774)\n[PASS] test_hookCannotReenter() (gas: 5129411)\n[PASS] test_mintBuysProportionallyAndRefunds() (gas: 1828102)\n[PASS] test_mintFirstBuysEqualPartsAndTakesFee() (gas: 1104040)\n[PASS] test_mintFirstKeepsWhatAPoolCouldNotTakeAsIdle() (gas: 1324784)\n[PASS] test_mintFirstRequiresZeroSupplyAndRightLength() (gas: 1021992)\n[PASS] test_mintFirstRevertsOnMinOut() (gas: 727125)\n[PASS] test_mintFirstRevertsWhenABuyFails() (gas: 814503)\n[PASS] test_mintFirstRevertsWhenABuyReturnsNothing() (gas: 2113144)\n[PASS] test_mintNeverIssuesSharesForNothing() (gas: 327771)\n[PASS] test_mintRequiresSupply() (gas: 40136)\n[PASS] test_mintRevertsOverMaxImdIn() (gas: 1730313)\n[PASS] test_mintRevertsWhenABuyFailsButScalesANonzeroShortFill() (gas: 2271275)\n[PASS] test_mintRoundsAgainstTheMinter() (gas: 1709391)\n[PASS] test_onOracleFailureOnlyFromIntake() (gas: 1064975)\n[PASS] test_onOracleResultStoresOnlyTheOpenRequestFromTheIntake() (gas: 1298511)\n[PASS] test_rebalanceNeedsAList() (gas: 41260)\n[PASS] test_rebalanceSellsAdoptsAndBuys() (gas: 5249236)\n[PASS] test_rebalanceSkipsADeadPool() (gas: 2976143)\n[PASS] test_rebalanceSkipsAHookThatLeavesAnUnsettledDelta() (gas: 3873072)\n[PASS] test_rebalanceSurvivesAHookThatBurnsAllGas() (gas: 5487232)\n[PASS] test_rebalanceTrimsAHoldingOverAQuarter() (gas: 3454543)\n[PASS] test_rebalanceWithNothingHeld() (gas: 2264710)\n[PASS] test_redeemCannotBeBlockedByACoin() (gas: 1575655)\n[PASS] test_redeemLastSharesPaysEverything() (gas: 2144373)\n[PASS] test_redeemPaysInKindLessHalfPercent() (gas: 1347370)\n[PASS] test_redeemRejectsZeroAndTooMany() (gas: 986018)\n[PASS] test_redeemSurvivesCoinsThatBurnAllGas() (gas: 4399571)\n[PASS] test_redeemToImdPaysAShortFillInKindLessHalfPercent() (gas: 1780752)\n[PASS] test_redeemToImdPaysInKindWhenASaleFails() (gas: 2970746)\n[PASS] test_redeemToImdRevertsBelowMinOut() (gas: 1786597)\n[PASS] test_redeemToImdSellsAndKeepsFee() (gas: 1753610)\n[PASS] test_redeemToImdSurvivesAHookThatBurnsGas() (gas: 2457667)\n[PASS] test_submitRejectsBadLists() (gas: 4697840)\n[PASS] test_submitRejectsWrongAnswerAndForgedSignature() (gas: 1637702)\n[PASS] test_submitStoresTheNextListAndRewards() (gas: 1525852)\n[PASS] test_unlockCallbackAndSwapSelfAreNotCallable() (gas: 103394)\nSuite result: ok. 45 passed; 0 failed; 0 skipped; finished in 406.13ms (267.31ms CPU time)\n\nRan 34 tests for test/Imdex5Edges.t.sol:Imdex5EdgesTest\n[PASS] testFuzz_mintBuysExactlyTheRoundedUpShare(uint256) (runs: 512, μ: 1916172, ~: 1915994)\nLogs:\n  Bound result 1531009833402338654651\n\n[PASS] testFuzz_mintFirstMintsExactlyTheRest(uint256) (runs: 512, μ: 1007639, ~: 1011589)\nLogs:\n  Bound result 1499772400236456902926\n\n[PASS] testFuzz_onOracleResultForAnotherRequestIsIgnored(bytes32,uint16) (runs: 256, μ: 1027731, ~: 1027844)\n[PASS] testFuzz_onOracleResultFromAStrangerChangesNothing(address,bytes32,uint16) (runs: 256, μ: 1074641, ~: 1074828)\n[PASS] testFuzz_redeemNeverPaysAboveProRata(uint256,uint256) (runs: 512, μ: 1557049, ~: 1558293)\nLogs:\n  Bound result 703447278057658377141\n  Bound result 15692\n\n[PASS] testFuzz_splittingARedeemStaysUnderProRata(uint256,uint256) (runs: 256, μ: 1748662, ~: 1748911)\nLogs:\n  Bound result 100000000000000\n  Bound result 20000000000000000\n\n[PASS] test_aLaterAskReplacesAnUnsubmittedAnswer() (gas: 1880577)\n[PASS] test_aReenteringCoinCannotReenterAndIsNotPaidTwice() (gas: 2668786)\n[PASS] test_aReenteringCoinCannotReenterMintOrRebalanceFromRedeem() (gas: 3859967)\n[PASS] test_anUnsubmittedAnswerDoesNotSurviveAFailedLaterAsk() (gas: 1353192)\n[PASS] test_askRevertsWholeWhenTheIntakeRefuses() (gas: 334231)\n[PASS] test_askThresholdIsExactlyThreeQuartersOfAnImd() (gas: 1101807)\n[PASS] test_closeRequestNeedsAnOpenOne() (gas: 1003779)\n[PASS] test_closingARequestDoesNotResetTheInterval() (gas: 1161912)\n[PASS] test_mintCannotBeFreeWhenTheIndexHoldsValue() (gas: 1764420)\n[PASS] test_onOracleResultAfterCloseIsIgnored() (gas: 1097888)\n[PASS] test_onOracleResultWithFiveEntriesFitsTheStipend() (gas: 1140653)\n[PASS] test_oneGasBurningCoinDoesNotBlockRedeemGivenGas() (gas: 1666511)\n[PASS] test_rebalanceBuyMovesAPoolAtMostTwoPercent() (gas: 3677632)\n[PASS] test_rebalanceBuyStopsAtAQuarterWeight() (gas: 4008771)\n[PASS] test_rebalanceDoesNotTrimWithFewerThanFourCoins() (gas: 3253182)\n[PASS] test_rebalanceSellMovesAPoolAtMostTwoPercent() (gas: 3279514)\n[PASS] test_rebalanceTrimsToAQuarterNotBelow() (gas: 3767904)\n[PASS] test_redeemHalfPercentStaysWithRemainingHolders() (gas: 1555503)\n[PASS] test_redeemIdleImdThatCannotBeSentIsOwed() (gas: 1393841)\n[PASS] test_redeemToATokenWithoutCodeBecomesOwedAndClaimableLater() (gas: 1265948)\n[PASS] test_residualsAreRedeemedAndBlockMintWhileTheirPoolIsDead() (gas: 5189324)\n[PASS] test_rewardsNeverDipIntoIdleImd() (gas: 2713898)\n[PASS] test_sharesTransferLikeAnyErc20AndMoveNoHoldings() (gas: 1462919)\n[PASS] test_submitAndRebalancePayNoRewardWithoutFees() (gas: 3235302)\n[PASS] test_submitRejectsATamperedAnswerEvenWithAValidSignatureElsewhere() (gas: 1135492)\n[PASS] test_submitRejectsAnAttestationSignedForAnotherChain() (gas: 1440241)\n[PASS] test_submitRejectsAnAttestationSignedForAnotherConsumer() (gas: 1106100)\n[PASS] test_submitRejectsMalformedAnswerBytes() (gas: 1344202)\nSuite result: ok. 34 passed; 0 failed; 0 skipped; finished in 406.25ms (1.31s CPU time)\n\nRan 1 test for test/Imdex5TaxEverywhere.t.sol:Imdex5AllCoinsTaxedInvariantTest\n[PASS]\nImdex5AllCoinsTaxedInvariantTest invariants:\n[PASS] invariant_taxed_actorsNeverExtractMoreImdThanTheyPutIn\n[PASS] invariant_taxed_coinBalancesAreHeldPlusOwed\n[PASS] invariant_taxed_everyHoldingIsListed\n[PASS] invariant_taxed_imdBalanceIsIdlePlusFeePlusOwed\n[PASS] invariant_taxed_zeroSupplyMeansNothingHeld\n Imdex5AllCoinsTaxedInvariantTest invariants (runs: 96, calls: 3840, reverts: 0)\n\n╭---------------+------------------+-------+---------+----------╮\n| Contract      | Selector         | Calls | Reverts | Discards |\n+===============================================================+\n| Imdex5Handler | ask              | 191   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | claim            | 197   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | deliverResult    | 173   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | fund             | 230   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | mint             | 419   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | mintFirst        | 224   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | rebalance        | 218   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | redeem           | 214   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | redeemToImd      | 217   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setCoinFailMode  | 229   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setHookMisbehave | 225   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setPoolMaxIn     | 225   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | submit           | 232   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | togglePool       | 216   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | transferShares   | 213   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | warp             | 213   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| TaxKnobs      | setTax           | 204   | 0       | 0        |\n╰---------------+------------------+-------+---------+----------╯\n\nLogs:\n  Bound result 19320\n  Bound result 281878948113154373683\n  Bound result 7879\n  Bound result 200\n  Bound result 299999\n  Bound result 12500\n\nSuite result: ok. 1 passed; 0 failed; 0 skipped; finished in 1.29s (1.28s CPU time)\n\nRan 1 test for test/Imdex5.invariant.t.sol:Imdex5InvariantTest\n[PASS]\nImdex5InvariantTest invariants:\n[PASS] invariant_actorsNeverExtractMoreImdThanTheyPutIn\n[PASS] invariant_coinBalancesAreHeldPlusOwed\n[PASS] invariant_feeImdLeavesOnlyForTheOracleAndRewards\n[PASS] invariant_imdBalanceIsIdlePlusFeePlusOwed\n[PASS] invariant_listShape\n[PASS] invariant_noFreeMintWhileValueIsHeld\n[PASS] invariant_requestStateIsConsistent\n[PASS] invariant_zeroSupplyMeansNothingHeld\n Imdex5InvariantTest invariants (runs: 96, calls: 3840, reverts: 0)\n\n╭---------------+------------------+-------+---------+----------╮\n| Contract      | Selector         | Calls | Reverts | Discards |\n+===============================================================+\n| Imdex5Handler | ask              | 187   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | claim            | 201   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | closeRequest     | 187   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | deliverFailure   | 190   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | deliverResult    | 212   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | fund             | 188   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | mint             | 427   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | mintFirst        | 195   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | rebalance        | 207   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | redeem           | 221   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | redeemToImd      | 201   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setCoinFailMode  | 199   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setHookMisbehave | 218   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setPoolMaxIn     | 207   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | submit           | 206   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | togglePool       | 180   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | transferShares   | 222   | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | warp             | 192   | 0       | 0        |\n╰---------------+------------------+-------+---------+----------╯\n\nLogs:\n  Bound result 63\n  Bound result 8000000\n  Bound result 100000\n  Bound result 118800\n  Bound result 8567\n  Bound result 183307044961732093281\n\nSuite result: ok. 1 passed; 0 failed; 0 skipped; finished in 1.54s (1.53s CPU time)\n\nRan 1 test for test/Imdex5.invariant.t.sol:Imdex5TaxedCoinInvariantTest\n[PASS]\nImdex5TaxedCoinInvariantTest invariants:\n[PASS] invariant_actorsNeverExtractMoreImdThanTheyPutIn\n[PASS] invariant_coinBalancesAreHeldPlusOwed\n[PASS] invariant_feeImdLeavesOnlyForTheOracleAndRewards\n[PASS] invariant_imdBalanceIsIdlePlusFeePlusOwed\n[PASS] invariant_listShape\n[PASS] invariant_noFreeMintWhileValueIsHeld\n[PASS] invariant_requestStateIsConsistent\n[PASS] invariant_zeroSupplyMeansNothingHeld\n Imdex5TaxedCoinInvariantTest invariants (runs: 256, calls: 128000, reverts: 0)\n\n╭---------------+------------------+-------+---------+----------╮\n| Contract      | Selector         | Calls | Reverts | Discards |\n+===============================================================+\n| Imdex5Handler | ask              | 6674  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | claim            | 6709  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | closeRequest     | 6596  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | deliverFailure   | 6790  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | deliverResult    | 6737  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | fund             | 6740  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | mint             | 13506 | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | mintFirst        | 6723  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | rebalance        | 6694  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | redeem           | 6686  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | redeemToImd      | 6745  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setCoinFailMode  | 6719  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setHookMisbehave | 6673  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | setPoolMaxIn     | 6874  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | submit           | 6821  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | togglePool       | 6846  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | transferShares   | 6783  | 0       | 0        |\n|---------------+------------------+-------+---------+----------|\n| Imdex5Handler | warp             | 6684  | 0       | 0        |\n╰---------------+------------------+-------+---------+----------╯\n\nLogs:\n  Bound result 24\n  Bound result 6731\n  Bound result 2000000000000000000000\n  Bound result 9950000000000000000\n  Bound result 500000000000000000\n  Bound result 16652\n  Bound result 1189000000000000000000\n  Bound result 16055\n  Bound result 18622\n  Bound result 770362672619782256389\n  Bound result 6025\n  Bound result 13818\n  Bound result 1000000\n  Bound result 153600\n  Bound result 15885\n  Bound result 16\n  Bound result 100000\n  Bound result 691200\n  Bound result 222809\n  Bound result 31337\n  Bound result 499999999999999999997\n  Bound result 710\n  Bound result 32348688161332256026\n  Bound result 4087012224027472\n  Bound result 4390\n  Bound result 18446744073709551616\n  Bound result 486400\n  Bound result 13\n  Bound result 20330184174085958498\n  Bound result 98000000000000000000\n  Bound result 1000000000000000000000\n  Bound result 15425\n  Bound result 5101\n  Bound result 749999999999999999\n  Bound result 5808\n  Bound result 7279\n  Bound result 3451596883\n  Bound result 360952252958477371408\n  Bound result 2681\n  Bound result 10424\n  Bound result 3261\n  Bound result 4000000\n  Bound result 35998462224112495958\n  Bound result 49999999999999999999\n  Bound result 246362405855981574245\n  Bound result 10001\n  Bound result 198000000000000000000\n  Bound result 6066\n  Bound result 19518\n  Bound result 262165895631560036161\n  Bound result 21215745534546502515\n  Bound result 469353047785685202333\n  Bound result 7050522208774116496\n  Bound result 4\n  Bound result 8\n  Bound result 759350369237622786608\n  Bound result 1412505429\n  Bound result 267135152928642052519\n  Bound result 31242551756066888927\n  Bound result 194113\n  Bound result 50000000000000000000\n  Bound result 19591\n  Bound result 60\n  Bound result 344999999999999999999\n  Bound result 1\n  Bound result 566823\n  Bound result 1000000000000000000007\n  Bound result 1344\n  Bound result 86699674470647\n  Bound result 400000000000000000000\n  Bound result 6374\n  Bound result 9999\n  Bound result 2157\n  Bound result 4\n  Bound result 282708526209578668\n  Bound result 49000000000000000000\n  Bound result 1218\n  Bound result 31543972\n  Bound result 6369\n  Bound result 16\n  Bound result 750000000000000000\n  Bound result 358400\n  Bound result 641024\n  Bound result 50000000000000000000\n  Bound result 17\n  Bound result 444\n  Bound result 6782\n  Bound result 5000\n  Bound result 1207357094\n  Bound result 1075\n  Bound result 12210\n  Bound result 284935866042189488215\n  Bound result 10\n  Bound result 14\n  Bound result 20477\n  Bound result 49748743718592964825\n  Bound result 45000000000000000000\n  Bound result 18\n  Bound result 514685\n  Bound result 3276341860\n  Bound result 18160\n  Bound result 499999999999999999961\n  Bound result 1279\n  Bound result 532\n  Bound result 4244\n\nSuite result: ok. 1 passed; 0 failed; 0 skipped; finished in 55.24s (55.23s CPU time)\n\nRan 10 test suites in 55.24s (60.44s CPU time): 133 tests passed, 0 failed, 0 skipped (133 total tests)\n","passed":true},{"durationMs":76,"exitCode":0,"name":"source-index","output":"{\"v\":1,\"entryPoints\":[\"Imdex5.approve(address,uint256)\",\"Imdex5.ask()\",\"Imdex5.claim(address)\",\"Imdex5.closeRequest()\",\"Imdex5.fund(uint256)\",\"Imdex5.mint(uint256,uint256)\",\"Imdex5.mintFirst(uint256,uint256[])\",\"Imdex5.onOracleFailure(bytes32,uint8,bytes32,uint16,uint16,bytes)\",\"Imdex5.onOracleResult(bytes32,(bytes32,uint256,bytes32,uint8,bytes,uint256,uint64,uint64,bytes32,bytes32,uint16,uint16,uint16,uint64,uint64),bytes)\",\"Imdex5.rebalance()\",\"Imdex5.redeem(uint256)\",\"Imdex5.redeemToImd(uint256,uint256)\",\"Imdex5.submit((bytes32,uint256,bytes32,uint8,bytes,uint256,uint64,uint64,bytes32,bytes32,uint16,uint16,uint16,uint64,uint64),bytes)\",\"Imdex5.swapSelf(address,address,bool,uint256,bool,bool)\",\"Imdex5.transfer(address,uint256)\",\"Imdex5.transferFrom(address,address,uint256)\",\"Imdex5.unlockCallback(bytes)\"],\"files\":{\".gitignore\":2,\"ADAPTATION.md\":161,\"README.md\":266,\"foundry.toml\":19,\"launch.json\":10,\"src/Imdex5.sol\":625,\"src/Interfaces.sol\":61,\"src/OracleAttestation.sol\":221,\"test/Imdex5.invariant.t.sol\":513,\"test/Imdex5.t.sol\":1017,\"test/Imdex5Base.sol\":174,\"test/Imdex5Edges.t.sol\":709,\"test/Imdex5Revised.t.sol\":503,\"test/Imdex5ShortFill.t.sol\":205,\"test/Imdex5TaxEverywhere.t.sol\":527,\"test/Imdex5TaxedCoin.t.sol\":252,\"test/OracleConsumerConformance.t.sol\":74,\"test/mocks/AttackMocks.sol\":85,\"test/mocks/Mocks.sol\":337,\"test/mocks/PoolTaxERC20.sol\":25,\"test/mocks/TaxERC20.sol\":36},\"excluded\":[\"lib/\",\"node_modules/\"],\"truncated\":false}","passed":true}],"detail":"all checks passed","evaluation":"checks","profile":"foundry","status":"accepted","submissionHash":"80d172752ce04d7eac1374ac7a374ac22a7a76e3e6549a3c9eecf2de2ad19982","verifiedTreeHash":"c6fa28bd1ae6e0e58bd5fd98d7b5a78a7768dec0","verifierVersion":"0.1.0+67c588fa"}]}