# Merge 03: imdUSD v2 day 1, house and fixed-loan items Commit: `ff1c192b3798542997f600091f2dc73ff05e4c40` (https://github.com/imdusd/imdusd-v2-audit). Source: the 10 item results under `.imd/reads/artifacts/`. This merge invents nothing and ran no new tests. Each finding, test, result and line reference below is copied from the item that reported it. Long fields are cut short, marked `[…]`. Test sources are cut at 550 characters, and the full sources are in each item's result.json. ## Items | item | forge / compiler (as reported) | verdict | findings | |---|---|---|---| | house-edge-first-loss | forge 1.8.3 (cae51ad458f6abb64852b7709eb784352429825d, 2026-09-15); older than 1.9, solc 0.8.38 not installed: no test compiled or ran; every answer below is re […] | findings | 2 | | house-backstop-sleeve | 1.8.3 (older than 1.9: --use solar unavailable; used the installed solc 0.8.38 via FOUNDRY_SOLC, a minimal project with Backstop.sol + the repo's own mocks from […] | holds | 0 | | house-pricer-liquidation | forge 1.8.3 (older than 1.9: no --use solar; solc 0.8.38 from svm). Repo profile (via_ir + full optimizer) did not finish compiling in 580 s here, so tests ran […] | findings | 2 | | house-swarmfeed | 1.8.3 (older than 1.9: --use solar unavailable; ran with solc 0.8.38 from svm, in a feeds-only side project) | findings | 2 | | house-proven-pool-feeds | forge 1.8.3 (cae51ad, 2026-09-15), older than 1.9: no --use solar. solc 0.8.38 is not installed (only 0.8.24/0.8.26), so tests ran in a scratch copy of src/ at […] | findings | 3 | | house-seats | forge 1.8.3 (cae51ad, 2026-09-15): --use solar NOT available; compiled with solc 0.8.38 (official binary) via --use, via_ir per foundry.toml | findings | 3 | | fixed-extensions | forge Version: 1.9.0, run with --use solar (solc 0.8.38 via solar), only test/scratch/FxExt.t.sol compiled (--match-path) | holds | 0 | | fixed-affirm-config | forge Version: 1.9.0 (run with --use solar) | holds | 0 | | fixed-limits-fees | forge 1.9.0 (--use solar, solc 0.8.38) | holds | 0 | | fixed-forfeit-take | forge 1.8.3 (older than 1.9): `--use solar` answers `solc "solar" does not exist`; solc 0.8.38 is not installed, and installing a newer forge was declined on th […] | holds | 0 | **Missing:** none. All 10 inputs are present and parse as JSON. Several items did **not** run under forge 1.9 with `--use solar`: house-edge-first-loss ran nothing, and backstop-sleeve, pricer-liquidation, proven-pool-feeds, seats, swarmfeed and fixed-forfeit-take used forge 1.8.3. Each of those items gives its compiler workaround in the table above. Only these items report forge 1.9 with `--use solar`: fixed-affirm-config, fixed-extensions and fixed-limits-fees. ## Summary (ranked by severity at deploy config) | # | severity | id (item) | title | reachable at deploy | test | |---|---|---|---|---|---| | 1 | low | HPL-F1 (house-pricer-liquidation) + F1 (house-swarmfeed) same root cause | NHI leaf (mat) moves two caps in one direction inside one maxAge: 0.85 -> 0.5667, mat 1.7 -> 2.0 between reads 86,399 s apart | true | ran, fails as reported | | 2 | low | F2 (house-swarmfeed) | P2 (honest price re-accepted within two epochs after any push sequence) fails: a relayer landing first in each epoch slows an honest reversa […] | true | ran, fails as reported | | 3 | low | F2 (house-proven-pool-feeds) | P2 as framed does not hold: honestly attested pushed reads + one pushed proof put sIMD low at 0.64 x market, not within skew (5%) | true | ran, fails as reported | | 4 | low | HS-1 (house-seats) | Auction clock counts a SeatFeed==0 stretch that starts and ends between two ticks inside the old median window as priced time: the sale reac […] | true | ran, fails as reported | | 5 | low | HS-2 (house-seats) | SeatFeed fall cap is bypassed after an unpoked rise: the next attestation is capped against the older recorded value, so the accepted median […] | true | ran, fails as reported | | 6 | low | HEFL-1 (house-edge-first-loss) | Any landed report of a type with bad debt (including the liquidation's own same-tx report, when no FirstLossOwed wait ever happened) moves t […] | true | **unverified** (not run) | | 7 | low | HEFL-2 (house-edge-first-loss) | A FirstLossOwed wait on a priced held token turns into a permanent skip once its median (or NHI) leg goes stale: the in-kind first loss pass […] | true | **unverified** (not run) | | 8 | low | F1 (house-proven-pool-feeds) | One signed future-dated window locks a remote leaf out of honest windows for up to days: the wave-3 cap limits clockBlock but lastToBlock ta […] | false | ran, fails as reported | | 9 | low | HS-3 (house-seats) | A reward the seat's account earned under the borrower but not yet claimed reaches the auction buyer: take, re-deposit the same tokenId (same […] | false | ran, fails as reported | | 10 | info | HPL-F2 (house-pricer-liquidation) | setGenesisDepthRule bounds otherLines but not the posted depth: with no ImdDepth a large depth makes depthLine()/depthRule() panic, so risk( […] | false | ran (demonstration test PASSes, asserting the panic) | | 11 | info | F3 (house-proven-pool-feeds) | FeedTraits.attesterFree treats 'answers no converged()' as attester-free, but the core composites src/feeds/ProductFeed.sol and src/feeds/Ra […] | false | ran, fails as reported | No item reported a high or medium finding. Five items report **holds** with no findings: fixed-affirm-config, fixed-extensions, fixed-limits-fees, fixed-forfeit-take and house-backstop-sleeve. ### Deduplication and disagreements - **One root cause, two items:** HPL-F1 (house-pricer-liquidation) and F1 (house-swarmfeed). SwarmFeed bounds each epoch to one cap around that epoch's anchor, but it does not bound a sliding window of maxAge. On the NHI leaf the carry is skipped at exactly maxAge (`>=` at SwarmFeed.sol:584). On the price, spot, seat and depth leaves there is no carry at all. Both items ran tests that fail. The swarmfeed test shows +44% in 1 s and +101.6% after a silence. The pricer test shows -33.3% within 86,399 s on NHI. Both items rate it low and both say it is reachable at deploy. Both tests are listed below. Both items name this in their claims: swarmfeed C4 is refuted (no sliding-window bound) and pricer-liquidation C3 is refuted. - **Related but separate root cause:** F2 (house-proven-pool-feeds) concerns the Pricer twin rule (TWIN_STEP), which puts low at 0.64× market. The item says README:1525 documents this, but the sheet does not name that line. The item therefore treats it as the sheet misdescribing the code (P2 refuted), not as a defect worse than written. - **house-edge-first-loss findings are unverified.** HEFL-1 and HEFL-2 have test sources, but those tests were never compiled or run (forge 1.8.3, no solc 0.8.38). They are kept and marked unverified, as the merge rules require. - **Toolchain caveat:** The proven-pool-feeds results come from a pragma-relaxed copy compiled with solc 0.8.26, with Parameters stubbed. The fixed-forfeit-take results come from solc 0.8.30. Neither item ran on the pinned compiler, and each says so. ## Findings ### 1. [low] HPL-F1: NHI leaf (mat) moves two caps in one direction inside one maxAge: 0.85 -> 0.5667, mat 1.7 -> 2.0 between reads 86,399 s apart - **item:** house-pricer-liquidation **severity:** low **reachableAtDeploy:** true **status:** test ran - **property / claim:** P4 (and the SwarmNhiFeed's own 'ONE CAP PER WINDOW OF TIME, NOT PER EPOCH' rule, src/house/feeds/SwarmFeeds.sol:97-100) / C3 - **files:** `src/house/feeds/SwarmFeed.sol:584`, `src/house/feeds/SwarmFeed.sol:739`, `src/house/feeds/SwarmFeed.sol:740`, `src/house/feeds/SwarmFeeds.sol:97`, `src/house/Pricer.sol:93` - **sequence:** NHI held at v0=0.590278 for >1 day. T: attest 1e24 -> epoch E1 opens, stored v0*1.2, _movedAt=T. T+1d (exactly maxAge after the move, so _carryNow()=0 at SwarmFeed.sol:584 because it uses >=): attest 1e24 -> E2 opens at v0*1.2, no carry, stored v0*1.44=0.8500003 (mat 1.7). T+1d+2: attest 1 -> inside E2 the range rule lets it fall to hi*0.8=0.68. T+2d: attest 1 -> E3 opens at 0.68 with carry = E2's anchor v0*1.2=0.7083, lower edge max(0.68*0.8, 0.7083*0.8)=0.5667 (mat 2.0). The value 0.85 was held at T+1d+1; 0.5667 […] - **expected:** Per SwarmFeeds.sol:97 'ONE CAP PER WINDOW OF TIME': any two NHI values held less than maxAge apart are within one cap (20%) of each other, so mat moves at most one cap's worth inside a day. - **actual:** Two values held 86,399 s apart differ by -33.3% (and +44% upward). The code bounds each window to one cap around SOME earlier value X (spread X*0.8..X*1.2), i.e. two caps pairwise, and the carry is skipped for an epoch opened exactly maxAge after the last move (>= at SwarmFeed.sol:584). Who can do it: the swarm attester key (or a wrong majority) signing within each per-epoch cap; README:1186 bounds a wrong NHI 'by its feed's per-epoch cap and lif […] - **fix (item's proposal):** Bound against the whole previous window, not one anchor: keep the min and max of values held in the last maxAge (or the previous epoch's range) and clamp a new value into [max_prev*(1-c), min_prev*(1+c)]; and make the carry condition `block.timestamp - _movedAt <= maxAge` (include the edge). Or state the true bound ((1-c)^2 down / (1+c)^2 up per window of maxAge) in SwarmFeeds.sol:97 and the W5 te […] - **test ran:** true - **result:** [FAIL: moved more than one cap inside one maxAge: 566666880000000000 < 680000256000000000] test_F1_twoCapsDownInsideMaxAge() (gas: 669982) -- both mat asserts (1.7e18 then 2e18) passed before it. [FAIL: two values < maxAge apart more than one cap apart: 576000000000320002 < 663552000000368640; counterexample: args=[500000, 15866]] testFuzz_P4_pairwiseWithinOneCapUnderMaxAge. ```solidity // test/goal/HPL.t.sol (contract HPLTest is System, test/house/utils/System.sol harness; sIMD = MockFeed median=spot, NHI = DoorNhiLeaf from test/house/unit/PricerTwin.t.sol (SwarmNhiPolicy, maxAge 1 day, cap 2000 bps)) function setUp() public { vm.chainId(1); vm.warp(1_800_000_000); vm.roll(26_000_000); nhi = new DoorNhiLeaf(); nhi.set(0.98e18); price = new MockFeed(100e18); price.setMaxAge(type(uint64).max); med = new MockFeed(100e18); med.setMaxAge(type(uint64).max); […] ``` #### 1b. Same root cause, from house-swarmfeed: F1: One attestation (and one second) can put the feed two caps from a value a consumer held: no per-window bound on the price/spot/seat/depth leaves - **item:** house-swarmfeed **severity:** low **reachableAtDeploy:** true **status:** test ran - **property / claim:** P1 (measured from any value held in the window) and P3 (never two caps from what it held while every step is within the cap of its reference) / P1,P3 - **files:** `src/house/feeds/SwarmFeed.sol:583-587`, `src/house/feeds/SwarmFeed.sol:597-608`, `src/house/feeds/SwarmFeed.sol:723-757`, `src/house/feeds/SwarmFeeds.sol:83-107` - **sequence:** c=2000, maxAge=3600. t0: first value 1.0 (epoch 1 opens, anchor 1.0). t0+maxAge-1: target 1.2 -> stored 1.2 (in cap). t0+maxAge: epoch 2 opens anchored at stored 1.2, target 3.0 -> stored 1.44. A consumer that held 1.0 one second earlier reads 1.44 (+44%). After a >=maxAge+1h silence on a leaf with the 2x stale base (spot, seat legs, depth; the price and NHI leaves override _staleMultiple to 1): 1.0 -> 1.4 (wide step) -> 1.68 (same epoch, one cap from anchor) -> 2.016 at the next epoch's first second = +101.6% with […] - **expected:** <= 1.2 x held (one cap) for every single attestation relative to any value held in the preceding window - **actual:** 1.44e18 from 1.0e18 held 1 s earlier; 2.016e18 after a silence. The code comment (SwarmFeed.sol:61-65) states this bound as (1+c)^2-1 / (1+2c)(1+c)^2-1, so it is written, but it is not in README known issues and contradicts the sheet's P1/P3 wording. - **fix (item's proposal):** Carry the previous anchor on every leaf (_carriesAnchor true, as NHI), or replace epochs with a time-based slew bucket (see C4). Otherwise change P1/P3 to the (1+c)^2 statement and size consumer margins on it. - **test ran:** RAN locally (no fork), forge 1.8.3 (no --use solar); solc 0.8.38 from local svm, via_ir off, mini project (feeds only); harness H/H1 call internal _accept(target, now) = submitAttestation after the checks; relayer=self - **result:** [FAIL: P3: value two caps from one held 1 second earlier: 1440000000000000000 > 1200000000000000000] test_P3_twoCapsAcrossEpochBoundary; [FAIL: value two caps+ from held within one lifetime: 2016000000000000000 > 1200000000000000000] test_P3_afterSilence ```solidity contract H1 is SwarmFeed { // price/NHI-like: no widening constructor(uint256 age, uint256 c) SwarmFeed(address(1), address(this), 1, 3, age, c) {} function acc(uint256 t) external { _accept(t, uint64(block.timestamp)); } function _staleMultiple() internal pure override returns (uint256) { return 1; } } contract SF is Test { uint256 constant AGE=3600; uint256 constant E18=1e18; function test_P3_twoCapsAcrossEpochBoundary() public { vm.warp(1_000_000); H1 f = new H1(AGE, 2000); f.acc(E18); […] ``` ### 2. [low] F2: P2 (honest price re-accepted within two epochs after any push sequence) fails: a relayer landing first in each epoch slows an honest reversal to 0.96x per epoch - **item:** house-swarmfeed **severity:** low **reachableAtDeploy:** true **status:** test ran - **property / claim:** P2 / P2 - **files:** `src/house/feeds/SwarmFeed.sol:559-567`, `src/house/feeds/SwarmFeed.sol:753-755` - **sequence:** Stored 1.0, honest level 0.5, c=20%. Each epoch (spaced maxAge): first relay is a target 5.0 (a pushed level, attested honestly, or any in-cap attester value) -> stored +20%; then the honest 0.5 relays, but _clampRange floors it at high x (1-c) = 1.2 x 0.8 = 0.96 x anchor. Net 0.96x per epoch. After 4 epochs stored = 0.849 (honest-only reaches 0.41 < 0.5 in 4); about 17 epochs are needed to reach 0.5. - **expected:** honest 0.5 reached (or the stored value within one cap of it) in a bounded, short number of epochs; no sequence of earlier attestations can slow it - **actual:** 0.849346e18 after 4 epochs. The residual is written in SwarmFeed.sol:83-89 (0.96x per epoch) but is not in the README and contradicts the sheet's P2 and the in-code P2 ('no lock-out: no sequence of earlier attestations can ... move the value away from its target'). - **fix (item's proposal):** Drop the range clamp (it is what gives a first relayer the lever) and rely on the carry/slew bucket in C4; or let a later attestation with a higher issuedAt/toBlock re-clamp from the epoch anchor only when it is in the direction of the last target. - **test ran:** RAN locally, forge 1.8.3 (no --use solar); solc 0.8.38 from local svm, via_ir off, mini project (feeds only); harness H/H1 call internal _accept(target, now) = submitAttestation after the checks; relayer=self - **result:** [FAIL: P2: honest price not reached in 2-4 epochs: 849346560000000000 > 600000000000000000] test_P2_firstRelayerSlowsHonest() ```solidity contract H1 is SwarmFeed { // price/NHI-like: no widening constructor(uint256 age, uint256 c) SwarmFeed(address(1), address(this), 1, 3, age, c) {} function acc(uint256 t) external { _accept(t, uint64(block.timestamp)); } function _staleMultiple() internal pure override returns (uint256) { return 1; } } // in contract SF: function test_P2_firstRelayerSlowsHonest() public { vm.warp(1_000_000); H1 f = new H1(AGE, 2000); f.acc(E18); uint256 H = 0.5e18; uint256 honestAfterAge; for (uint256 i; i < […] ``` ### 3. [low] F2: P2 as framed does not hold: honestly attested pushed reads + one pushed proof put sIMD low at 0.64 x market, not within skew (5%) - **item:** house-proven-pool-feeds **severity:** low **reachableAtDeploy:** true **status:** test ran - **property / claim:** P2 / C2 - **files:** `src/house/Pricer.sol:75`, `src/house/Pricer.sol:115`, `src/house/Pricer.sol:116`, `script/house/DeployConfig.sol:659`, `script/house/DeployConfig.sol:480`, `README.md:1525` - **sequence:** Same epoch, no key: (1) the median leaf holds the market M0 (epoch anchor). (2) An honest panel attests a window of pushed pool reads at P < 0.8 M0: the leaf stores clamp(P) = 0.8 M0, attested() = P, converged() false. (3) One pushed proof puts the proven spot at P. Pricer: legs disagree, spot proven, so the twin rule runs: low = max(P, min(m, max(att, m(1-TWIN_STEP)))) = 0.8 x 0.8 M0. - **expected:** Sheet P2: a wrong median cannot push low below the market by more than skew (sIMD skew 0.05e18, DeployConfig:659), by any coalition of honestly attested pushed reads + one pushed proof, no key. - **actual:** low / market = 0.640000 for every pushed price in [1%, 64%] of M0 (fuzz, 2000 runs). The bound in code is (1 - TWIN_STEP)^2 = 0.64 at the first delivery (TWIN_STEP 0.2e18, Pricer:75; the clamped median itself moves one cap). It is documented in README:1525 ('Honest attestations of PUSHED pool reads plus one pushed proof, with no key, move `low` one allowance below the stored median at once'), a known-issue line the sheet does NOT name (it names R […] - **fix (item's proposal):** Either restate P2 as 'low >= held median x (1 - c)^2 per epoch' (what the code and README:1525 give), or, to meet skew, set TWIN_STEP = skew (the twin then leads the median by at most skew under the stored value, and by (1-c)(1-skew) under the held one). - **test ran:** RAN: forge 1.8.3, solc 0.8.26 via_ir, scratch copy (see forge field), fuzz runs 2000 - **result:** [FAIL: P2: low pushed below market by more than skew: 7680000000000000000 < 11400000000000000000; counterexample: args=[5000000000000000000000]] testFuzz_P2_lowBelowMarketBySkew(uint256); log: low / market: 0.640000000000000000 ```solidity // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; import {Test} from "forge-std/Test.sol"; import {IFeed} from "../src/house/interfaces/IFeed.sol"; import {SwarmFeed} from "../src/house/feeds/SwarmFeed.sol"; import {SwarmPricePolicy} from "../src/house/feeds/SwarmFeeds.sol"; import {ProductFeed} from "../src/house/feeds/ProductFeed.sol"; import {ProductFeed as CoreProductFeed} from "../src/feeds/ProductFeed.sol"; import {IFeed as IFeedCore} from "../src/interfaces/IFeed.sol"; import {Pricer} from "../src/house/Pricer.sol"; import {Parame […] ``` ### 4. [low] HS-1: Auction clock counts a SeatFeed==0 stretch that starts and ends between two ticks inside the old median window as priced time: the sale reaches its 70% floor while no take could settle - **item:** house-seats **severity:** low **reachableAtDeploy:** true **status:** test ran - **property / claim:** P2 / P2 (README:1313 'also stopped while SeatFeed reads 0') - **files:** `src/house/seats/SeatJoin.sol:496`, `src/house/seats/SeatJoin.sol:501`, `src/house/seats/SeatJoin.sol:512`, `src/house/seats/SeatJoin.sol:526`, `src/house/feeds/SeatFeed.sol:144`, `src/house/feeds/SeatFeed.sol:285` - **sequence:** Auction opens at T0 (figure 1). T0+1h: a median attestation with figure 0 lands and is poked (1->0 passes the 20% cap): SeatFeed reads 0, Pricer.priced=false, Liquidator.settle reverts NotPriced. Nobody ticks. T0+6h: an attestation with figure 1 (0->1 passes the +25%+1 cap) lands. _elapsed: v!=0 now, zeroAtTick false, opened(T0+6h) <= attestedAt+26h, so [lastTick, now) is counted whole. A taker relays/waits for the lifting attestation and takes at the floor in the same block. - **expected:** elapsed <= priced seconds (3600 s); price > 0.7 x start - **actual:** elapsed 21600 s; price 2100e18 = 70% floor of 3000e18 after only 1 h in which a take could settle - **fix (item's proposal):** Slow-never-fast for zeros: when a newer median attestation landed since lastTick (newAt != a.attestedAt), count priced time only from `opened` (the newest arrival) on, not from lastTick through the old window; or have the median leaf's accept path call a SeatFeed/SeatJoin checkpoint so every 0/non-0 transition is recorded on chain. README:1313 should state the residual (today only the SeatJoin Nat […] - **test ran:** forge 1.8.3 (cae51ad), solc 0.8.38 binary (binaries.soliditylang.org) via --use; forge test --use solc-0.8.38 --match-path test/scratch/ --match-contract HouseSeats --fuzz-runs 512 - **result:** [FAIL: the clock counted the zero stretch as priced time: 21600 > 3600; args=[zeroAt->1, zeroLen->5]] testFuzz_zeroStretchBetweenTicksCounted. Logs: priced seconds (truth): 3600; elapsed counted: 21600; price (start 3000e18): 2100000000000000000000 ```solidity // SPDX-License-Identifier: MIT pragma solidity 0.8.38; import {Test} from "forge-std/Test.sol"; import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import {SeatJoin} from "src/house/seats/SeatJoin.sol"; import {IImdAgentAdapter} from "src/house/seats/SeatAccount.sol"; import {SeatFeed} from "src/house/feeds/SeatFeed.sol"; import {IFeed} from "src/house/interfaces/IFeed.sol"; import {Leaf, P, L} from "test/house/unit/AuditW3SeatClockUnpriced.t.sol"; /// P2: the clock runs only while a take can settle (SeatFeed != 0, legs […] ``` ### 5. [low] HS-2: SeatFeed fall cap is bypassed after an unpoked rise: the next attestation is capped against the older recorded value, so the accepted median can fall 50% (bounded only by the leaf's own cap) in one new attestation - **item:** house-seats **severity:** low **reachableAtDeploy:** true **status:** test ran - **property / claim:** C3 / C3; SeatFeed NatSpec :57-58 'so an unpoked fall is capped harder (the leg falls slower), never looser' - **files:** `src/house/feeds/SeatFeed.sol:134`, `src/house/feeds/SeatFeed.sol:138`, `src/house/feeds/SeatFeed.sol:179`, `src/house/seats/SeatJoin.sol:410` - **sequence:** Recorded state raw=base=1e18. Block n: attestation A1=2e18 (honest rally or wash pump within the leaf cap) is relayed; acceptedMedian=2e18 (rises pass 1:1), positions are valued/opened at it. Block n+1, ordered by a builder ahead of the keeper's poke: A2=1e18 relayed. acceptedMedian = _capped(A2, _capped(c.raw=1e18, c.base)) = 1e18. - **expected:** >= 0.8 x 2e18 = 1.6e18 (20% per new attestation) - **actual:** 1e18 (-50% in one new attestation); liquidations and the auction start (medianUsd) read it - **fix (item's proposal):** Record every attestation atomically: the seat median leaf's accept path calls SeatFeed.poke() (or SeatFeed stores the live accepted value whenever it is read in a state-changing path: Liquidator/Ledger/SeatJoin.open), or cap against max(capped(c.raw,c.base), the live accepted value at the time the newer attestation replaced it) by having the leaf expose the previous value. - **test ran:** forge 1.8.3 (cae51ad), solc 0.8.38 binary (binaries.soliditylang.org) via --use; forge test --use solc-0.8.38 --match-path test/scratch/ --match-contract HouseSeats --fuzz-runs 512 - **result:** [FAIL: accepted median fell more than 20% in one new attestation: 1000000000000000000 < 1600000000000000000] test_unpokedRiseThenFallBypassesCap() (gas: 124983). Logs: accepted after A1: 2e18; accepted after A2: 1e18 ```solidity // SPDX-License-Identifier: MIT pragma solidity 0.8.38; import {Test} from "forge-std/Test.sol"; import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import {SeatJoin} from "src/house/seats/SeatJoin.sol"; import {IImdAgentAdapter} from "src/house/seats/SeatAccount.sol"; import {SeatFeed} from "src/house/feeds/SeatFeed.sol"; import {IFeed} from "src/house/interfaces/IFeed.sol"; import {Leaf, P, L} from "test/house/unit/AuditW3SeatClockUnpriced.t.sol"; /// P2: the clock runs only while a take can settle (SeatFeed != 0, legs […] ``` ### 6. [low] HEFL-1: Any landed report of a type with bad debt (including the liquidation's own same-tx report, when no FirstLossOwed wait ever happened) moves the global owedEndedAt and revives every lapsed withdrawal request for CLAIM_WINDOW - **item:** house-edge-first-loss **severity:** low **reachableAtDeploy:** true **status:** UNVERIFIED (test not run) - **property / claim:** P3 (claim-window gate of the first-loss wait); C3 / C3: 'A zero-loss report no longer extends a claim window: find another call that does.' Found: Liquidator.bite/settle -> _cover -> Ledger.reportLoss -> Treasury.coverBadDebt -> Backstop.coverBadDebt with bad != 0. - **files:** `src/house/backstop/Backstop.sol:638`, `src/house/backstop/Backstop.sol:517`, `src/house/backstop/Backstop.sol:518`, `src/house/Liquidator.sol:216`, `src/house/Ledger.sol:402` - **sequence:** 1) carol requests withdraw of all shares; 2) she lets it lapse (at+QUEUE+CLAIM_WINDOW passes; withdraw reverts Expired); 3) any edge-type liquidation that books bad debt (any size, any type of the sleeve) reports in the same tx: Backstop.coverBadDebt reads bad != 0 on entry and sets owedEndedAt = now although owedBadDebt() was never non-zero at any block; 4) withdraw: ended >= r.at+QUEUE and ended+CLAIM_WINDOW > end, so end = now+2d: carol exits with no new 7-day queue. owedEndedAt is one global slot, so one report […] - **expected:** Per the FR1 comment at Backstop.sol:634-637 ('a zero-loss report ... ended no wait, so it never extends a matured request's window or revives a lapsed one') and README:729 ('a request that matured during the wait stays claimable for 2 days after the report lands'): only a request that was blocked by a real FirstLossOwed wait gets a window from the […] - **actual:** The gate is 'this type had bad debt booked on entry', not 'a wait happened'. A report that lands in the very transaction that booked the loss ended no wait, yet revives lapsed requests (weeks old) for 2 days: a standing option for lapsed requesters to skip the 7-day queue after any bad-debt liquidation, i.e. exactly when the next loss is likeliest. - **fix (item's proposal):** Record when a wait began: e.g. in Backstop.withdraw, on FirstLossOwed revert is not storable, so instead store waitStartedAt = block.timestamp the first time owedBadDebt() != 0 is observed by a liquidation that could not report (Liquidator: when the try reportLoss fails, call backstop.noteWait()), and in withdraw extend only if waitStartedAt != 0 && ended >= waitStartedAt && r.at + QUEUE + CLAIM_W […] - **test ran:** false - **result:** NOT RUN: forge 1.8.3 (cae51ad) on this machine is older than 1.9 (no --use solar); foundry.toml and every source pin solc 0.8.38, not installed (only 0.8.26-0.8.30). Reasoned from code per the brief. Expected by reading: assertFalse fails (withdraw succeeds) because Backstop.sol:638 sets owedEndedAt inside the liquidation's own report and Backstop.sol:518 extends end to owedEndedAt+2d. ```solidity // test/house/unit/ScratchHouseEdgeFL.t.sol (HouseRig, same helpers as test/house/unit/FixReviewW7House.t.sol) pragma solidity 0.8.38; import "forge-std/Test.sol"; import {HouseRig} from "../utils/HouseRig.sol"; import {Backstop} from "../../../src/house/backstop/Backstop.sol"; contract ScratchHouseEdgeFL is HouseRig { function setUp() public { _setUpHouse(); } /// No FirstLossOwed wait ever happens: the liquidation reports its own bad debt in the same tx (Liquidator._cover), /// yet owedEndedAt moves and a request that LAPSED weeks […] ``` ### 7. [low] HEFL-2: A FirstLossOwed wait on a priced held token turns into a permanent skip once its median (or NHI) leg goes stale: the in-kind first loss passes to the Treasury and the hub for good - **item:** house-edge-first-loss **severity:** low **reachableAtDeploy:** true **status:** UNVERIFIED (test not run) - **property / claim:** P1 / C1: show pusher + prover (or a report held until a leg is stale) reach the skip. - **files:** `src/house/backstop/Backstop.sol:662`, `src/house/backstop/Backstop.sol:663`, `src/house/backstop/PricerOracle.sol:55`, `src/house/Pricer.sol:87`, `src/house/Pricer.sol:92`, `src/house/Pricer.sol:96` - **sequence:** 1) edge-type liquidation books bad debt while a pool pusher + prover holds a proven spot one leg above median*(1+skew): PricerOracle.priceOf -> (low!=0, ok=false), the in-kind loop reverts FirstLossOwed, Treasury reverts EdgeCoverFailed, Liquidator's try swallows it: bad debt stays booked (README:729, as written); 2) the stranger re-pushes to keep the legs apart (README: 'at the manipulation cost each time'); 3) the median leg (ProductFeed of swarm IMD/ETH x Chainlink ETH/USD for sIMD) or the NHI leg turns stale (C […] - **expected:** README:729: for a token whose type is priced 'the first loss is paid or waits, never skipped'; P1: 'never skipped while a HELD token's type is priced'. - **actual:** The wait does not keep the obligation: it only defers the moment the price is read. Whoever can hold the wait until a leg stalls converts it into the skip README:738 allows only for tokens 'with no price'. Worse than written: neither README:729 nor README:738 says a priced-and-refused token can be made skippable by holding the wait across a feed stall. - **fix (item's proposal):** Make the obligation survive the read: when the in-kind leg cannot pay (refused OR stale/unpriced while the type is configured), record owedInKind += rest instead of skipping or reverting, keep withdrawals/conversions locked on owedInKind != 0, and let anyone settle it later at a good price (see C6). At minimum: treat low==0 from a configured, non-retired type like a refusal (revert FirstLossOwed) […] - **test ran:** false - **result:** NOT RUN: forge 1.8.3 (cae51ad) on this machine is older than 1.9 (no --use solar); foundry.toml and every source pin solc 0.8.38, not installed (only 0.8.26-0.8.30). Reasoned from code per the brief. Expected by reading: assertLt fails (coll unchanged) since Backstop.sol:663 continues on low==0 and Ledger._report clears the bad debt. ```solidity // same contract as above (imports PricerOracle, IMinterHub as in FixReviewW7House.t.sol) /// A refused priced token makes the report wait (README:729); hold it (re-push) until the median leg goes stale: /// PricerOracle.priceOf then returns (0,0,false) (Pricer.quote returns q unpriced, low 0) and the next report SKIPS it. function testFuzz_waitTurnsIntoSkipWhenMedianStales(uint256 waitLen) public { _fund(dave, 20_000e18); _fund(eve, 20_000e18); _fund(carol, 6_000e18); vm.prank(carol); edge.deposit(6_000e18, carol); […] ``` ### 8. [low] F1: One signed future-dated window locks a remote leaf out of honest windows for up to days: the wave-3 cap limits clockBlock but lastToBlock takes the uncapped toBlock - **item:** house-proven-pool-feeds **severity:** low **reachableAtDeploy:** false **status:** test ran - **property / claim:** P3 / C4 - **files:** `src/house/feeds/SwarmFeed.sol:437`, `src/house/feeds/SwarmFeed.sol:452`, `src/house/feeds/SwarmFeed.sol:474`, `src/house/feeds/SwarmFeed.sol:488`, `README.md:1355` - **sequence:** Remote leaf (data chain 1, consumer chain with no block clock, e.g. Base 8453). First value relayed by the deployer at (b0,t0). After the feed has run N days, the attester key signs ONE window with toBlock = most = originBlock + (issuedAt-originAt)/12 + PARENT_SLACK (accepted: _tickClock:474 only refuses toBlock > most). Line 488 caps clockBlock at projected+300, but line 452 stores lastToBlock = toBlock; every honest window with toBlock <= lastToBlock reverts WindowNotAdvancing (:437) until the real Ethereum head […] - **expected:** P3: a remote clock never outruns the head; the wave-3 note (SwarmFeed.sol:484-487) says one window moves the clock at most PARENT_SLACK past the projection, so honest windows keep landing. README:1355 states only 'k validly signed, future-dated windows can still step a remote feed's clock k x PARENT_SLACK (bounded by the slow projection's most)'. - **actual:** The clock is capped (assert holds) but the window order is not: with 1% of slots missed, honest windows are refused for 4,800 s at a 1-day-old feed (> maxAge 1 h, the leaf goes stale) and 322,200 s (~3.7 days) at 365 days. That is one window, not k, and a lock-out that grows with the feed's age, so it is worse than README:1355 says. The leaf reads stale for that long, so a type priced by it is unpriced: no liquidation, no borrowing. - **fix (item's proposal):** Cap the window order the same way as the clock: refuse toBlock > projectedHead(issuedAt) + PARENT_SLACK once clockAt != 0 (instead of the origin bound), or store lastToBlock = min(toBlock, clockBlock) and compare honest windows against that. - **test ran:** RAN: forge 1.8.3, solc 0.8.26 via_ir, scratch copy (see forge field), fuzz runs 2000 - **result:** [FAIL: remote leaf locked out past maxAge by one future-dated window: 48300 > 3600] testFuzz_P3_remoteFutureWindowLocksOut(uint256) (first run; the age was not logged then). A later fuzz run shrank to feed age (days): 1 with honest windows refused for (s): 4800. [FAIL: remote leaf locked out past maxAge by one future-dated window: 322200 > 3600] test_P3_age365() (feed age (days): 365, honest windows refused for (s): 322200). The asserts 'clock capped (wave-3 fix holds)' and 'lastToBlock is NOT capped' passed before the failure. ```solidity /// P3 / C4: remote time clock (a feed whose data chain is not this chain and has no block clock: Base attesting /// Ethereum). ONE validly signed window dated at the origin bound `most` (accepted: toBlock <= most) caps the CLOCK at /// projection + PARENT_SLACK, but lastToBlock takes the uncapped toBlock: honest windows are refused (WindowNotAdvancing) /// until the honest head passes it. Fuzzed over the feed's age; property: no lock-out past the leaf's maxAge. function testFuzz_P3_remoteFutureWindowLocksOut(uint256 ageDays […] ``` ### 9. [low] HS-3: A reward the seat's account earned under the borrower but not yet claimed reaches the auction buyer: take, re-deposit the same tokenId (same deterministic account), claim; credited to the buyer - **item:** house-seats **severity:** low **reachableAtDeploy:** false **status:** test ran - **property / claim:** C4/P3 / C4 - **files:** `src/house/seats/SeatJoin.sol:566`, `src/house/seats/SeatJoin.sol:288`, `src/house/seats/SeatJoin.sol:313`, `src/house/seats/SeatJoin.sol:689`, `src/house/seats/SeatAccount.sol:186` - **sequence:** Claim rule for the distributor set (SET_SEAT_CLAIM). alice pledges seat 1; the distributor owes 100 IMD to accountOf(1). Position unhealthy, liquidate opens the auction. bob in one bundle: take (NFT to bob, holderOf deleted, lastHolder=alice), deposit(1) (same Clones address, holderOf=bob), SeatAccount.claim(dist, claim(acct,IMD,100), [IMD]) -> onRewards credits holderOf=bob. Same with takeFloor (Treasury becomes holder) and the Treasury's later transfer. - **expected:** owed[1][IMD][alice] == 100e18 (earned during her tenure) - **actual:** owed[1][IMD][alice] == 0; owed[1][IMD][bob] == 100e18 - **fix (item's proposal):** Make the buyer unable to inherit pre-sale arrivals: on deposit of a tokenId whose account already exists, keep crediting lastHolder for a claim window (e.g. arrivals reported before the new holder's first `sync` after `depositedAt + window`), or key accounts by (tokenId, custody epoch) so a re-deposit gets a fresh account; and document it in README Known issues (today only the SeatJoin NatSpec :68 […] - **test ran:** forge 1.8.3 (cae51ad), solc 0.8.38 binary (binaries.soliditylang.org) via --use; forge test --use solc-0.8.38 --match-path test/scratch/ --match-contract HouseSeats --fuzz-runs 512 - **result:** [FAIL: the pending claim reached the buyer: 0 != 100000000000000000000] test_C4_pendingClaimReachesBuyer() (gas: 4378130). Logs: owed to bob (buyer): 100e18; owed to alice (earner): 0 ```solidity // SPDX-License-Identifier: MIT pragma solidity 0.8.38; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {SeatsTest} from "test/house/unit/Seats.t.sol"; import {MockDistributor} from "test/house/utils/SeatMocks.sol"; import {SeatAccount} from "src/house/seats/SeatAccount.sol"; import {SeatJoin} from "src/house/seats/SeatJoin.sol"; import {Adjust} from "src/house/interfaces/IPositions.sol"; import {_pid} from "test/house/utils/Pid.sol"; contract HouseSeatsRoutes is SeatsTest { function test_C4_pendingClaimReachesBu […] ``` ### 10. [info] HPL-F2: setGenesisDepthRule bounds otherLines but not the posted depth: with no ImdDepth a large depth makes depthLine()/depthRule() panic, so risk(depthIlk), lowerLine/lowerDepthLine/lowerDepthK revert until postLowerDepth - **item:** house-pricer-liquidation **severity:** info **reachableAtDeploy:** false **status:** test ran - **property / claim:** P2 / C2 / C2 - **files:** `src/house/Parameters.sol:99`, `src/house/Parameters.sol:100`, `src/house/ParametersBase.sol:477`, `src/house/ParametersBase.sol:480`, `src/house/ParametersRules.sol:317` - **sequence:** Deployer (an attacker until sealed) calls setGenesisDepthRule(SIMD, k=1e18, depth=2**200, 0, 0) before setGenesisImdDepth (or on a chain with no ImdDepth). depthIMD() returns depthCap; room = depthK * depthIMD() overflows -> Panic in depthLine(), depthRule(), Parameters.risk(SIMD) (every line check), and in _flagDepth inside lowerLine(SIMD,..)/lowerDepthLine/lowerDepthK. The same unbounded value can arrive by SET_DEPTH (validate only decodes it, ParametersRules.sol:317 stores any value; then its own _flagDepth pani […] - **expected:** The FR5 comment at Parameters.sol:97-98 says a wrong genesis value cannot make depthLine() and the applies panic. - **actual:** otherLines is bounded, depth is not; depthLine() panics (test). Only borrowing on the depth type and the instant lowers fail (no funds move; liquidation reads storedRisk). The governor's postLowerDepth restores it at once. In the shipped house order (_stageDepth before setGenesisDepthRule, StageHouse.sol:105-107) depthIMD = min(measured, cap), so not reachable with the shipped script. - **fix (item's proposal):** In setGenesisDepthRule and SET_DEPTH validate depth <= type(uint128).max (as otherLines). - **test ran:** true - **result:** [PASS] test_C2_genesisDepthUnbounded() (gas: 346481): the OutOfBounds on otherLines=2^128, then the depthLine()/risk()/lowerLine panics, then recovery by postLowerDepth, all as asserted. ```solidity // test/goal/HPL.t.sol (contract HPLTest is System, test/house/utils/System.sol harness; sIMD = MockFeed median=spot, NHI = DoorNhiLeaf from test/house/unit/PricerTwin.t.sol (SwarmNhiPolicy, maxAge 1 day, cap 2000 bps)) function test_C2_genesisDepthUnbounded() public { vm.expectRevert(ParametersBase.OutOfBounds.selector); params.setGenesisDepthRule(SIMD, 1e18, 1e24, uint256(type(uint128).max) + 1, 0); params.setGenesisDepthRule(SIMD, 1e18, 2 ** 200, 0, 0); // accepted vm.expectRevert(); // panic 0x11 […] ``` ### 11. [info] F3: FeedTraits.attesterFree treats 'answers no converged()' as attester-free, but the core composites src/feeds/ProductFeed.sol and src/feeds/RateFeed.sol answer no trait: a house ProductFeed over a core composite of a swarm leaf reads proven and converged - **item:** house-proven-pool-feeds **severity:** info **reachableAtDeploy:** false **status:** test ran - **property / claim:** P1 / C1 - **files:** `src/house/feeds/FeedTraits.sol:59`, `src/house/feeds/ProductFeed.sol:46`, `src/house/feeds/RateFeed.sol:116`, `src/feeds/ProductFeed.sol:10`, `src/feeds/RateFeed.sol:1` - **sequence:** Graph: house ProductFeed(ProvenPoolPrice, core ProductFeed(SwarmPriceFeed, ETH/USD)). The swarm leaf is clamped (converged false). attesterFree(core ProductFeed) = !answered(converged) = true, so house ProductFeed.proven() = true and converged() = true. - **expected:** P1: a composite reports proven only with an attester-free other input, on every implementation. FeedTraits.sol's own note: 'every swarm leaf answers it, and so does every composite, whatever is below it'. - **actual:** proven() returns true with a clamped attester in the other input (W4 C5 class, here via a non-trait composite). Not reachable at deploy: the house graph builds only src/house/feeds composites (StageFeeds.sol:6-9), DeployBase._attesterFreeAtDeploy mirrors the rule, and the core is Chainlink-only on day 1 (README Day 1). It needs a Safe re-point of a house spot to such a graph; Parameters/ParametersRules do not check traits at re-point (grep proven […] - **fix (item's proposal):** Make attester-freedom a positive trait: attesterFree(f) = proven(f) || f answers attesterFree() == true (Chainlink, LivePoolPrice, ProvenPoolPrice, the vault adapters), default NOT free; or give src/feeds composites converged()/proven() pass-throughs. - **test ran:** RAN: forge 1.8.3, solc 0.8.26 via_ir, scratch copy (see forge field), fuzz runs 2000 - **result:** [FAIL: P1: proven with an attester (clamped swarm leaf) in the other input] test_P1_coreCompositeHidesAttester() (gas: 4052797) ```solidity /// P1 / C1: a composite that is not a FeedTraits implementer (the core src/feeds/ProductFeed) over a swarm leaf reads /// attester-free, so the house ProductFeed reports PROVEN (and converged) with an attester (clamped) in its other input. function test_P1_coreCompositeHidesAttester() public { vm.chainId(1); vm.roll(30_000_000); vm.warp(1_790_000_000); TLeaf leaf = new TLeaf(vm.addr(PK), 1, 2 hours, 2000); _submit(leaf, 1e18, uint64(block.number - 400), uint64(block.number - 1), uint64(block.timestamp)); […] ``` ## Claims Verdicts are copied per item; each claim id is local to its item's sheet. No two items checked the same sheet, so no verdicts conflict. Where an item refuted a claim with a finding, the finding id appears in the evidence. | item | claim | result | evidence (copied, cut short) | |---|---|---|---| | house-edge-first-loss | C1 | **holds** | Code confirms the skip: Backstop.sol:663 `if (!ok // low == 0) continue;` and :666 `if (!_trySend(t, to, give)) continue;` (no rec […] | | house-edge-first-loss | C2 | **holds** | Confirmed: the loop (Backstop.sol:645-671) reverts the whole cover at the first refused token it reaches, even if later tokens cou […] | | house-edge-first-loss | C3 | **refuted** | The zero-loss case is fixed (Backstop.sol:638 `if (bad != 0)`), but another call extends/revives: any report of a type with bad de […] | | house-edge-first-loss | C4 | **holds** | owedBadDebt (Backstop.sol:325-333) sums the full booked badDebt of live types; netVested (:337-343) nets min(owed, vested-floor). […] | | house-edge-first-loss | C5 | **holds** | grep T_REPORTING src/: written only at Ledger.sol:410-411 and :415 (restore `was`); LedgerBase.sol:187/196 and Ledger.sol:423 only […] | | house-edge-first-loss | C6 | **holds** | Smallest replacement: make the in-kind leg a recorded debt, not a same-tx payment. In Backstop.coverBadDebt under reporting(): owe […] | | house-backstop-sleeve | C1 | **holds** | grep 'oracle\.' in src/house/backstop/Backstop.sol gives exactly 8 sites: retire:297, nav:378, closeBid:594, coverBadDebt:650, sel […] | | house-backstop-sleeve | C2 | **holds** | Backstop.addIlk NatSpec (Backstop.sol ~245) states the rule; it is governance, not enforced. Day 1 listing is sIMD only (StageHous […] | | house-backstop-sleeve | C3 | **holds** | Treasury.retireReserve (src/house/Treasury.sol:155) is onlyGovernor, reverts BadDebtOutstanding while ledger.totalBadDebt()!=0, bu […] | | house-backstop-sleeve | C4 | **holds** | Deposits sit in a day bucket and convert from day D+2 at nav (coll at HIGH, booked loss netted, vested only), never earn or lose i […] | | house-backstop-sleeve | C5 | **holds** | StageHouse.sol:120 wires the edge sleeve with seller = address(0) (no Allocator in the house plan); Backstop.sell:~710 reverts Una […] | | house-pricer-liquidation | C1 | **holds** | Code-level bound tested: testFuzz_P1_conservativeLegs (256 runs, median m and proven spot s in [1e15,1e24], cap in [0,1e24]): when […] | | house-pricer-liquidation | C2 | **refuted** | otherLines bound matches SET_OTHER_IMD (Parameters.sol:99 vs ParametersRules.sol:75-78) and the apply arithmetic cannot overflow ( […] | | house-pricer-liquidation | C3 | **refuted** | Two steps between one consumer's reads < maxAge apart: shown (HPL-F1). test_C3_twoCapsAcrossMaxAgePlusOne also passes: 0.85 -> 0.6 […] | | house-pricer-liquidation | C4 | **holds** | Day 1 (house: HouseConfig.graceOff = BetaConfig's true, script/house/DeployConfig.sol:1295, 732) sets maxLull 0 via StageTypes.sol […] | | house-pricer-liquidation | C5 | **holds** | testFuzz_C5_biteGasAtomic (256 runs, gas 30k..3M): every bite either fully applies (mark deleted, debt reduced) or fully reverts ( […] | | house-pricer-liquidation | C6 | **not-checked** | Proposed invariant (not run as an invariant campaign): for every t, mat(t) = Pricer._mat(NHI_stored(t)) and lull(t) = min(_lull(NH […] | | house-swarmfeed | C1 | **refuted** | No way-back exists at this commit: grep for _returnAnchor/returnAnchor/wayBack finds only the history note SwarmFeed.sol:83. The o […] | | house-swarmfeed | C2 | **holds** | There are no recorded anchors: the anchor is the stored value when an epoch opens (SwarmFeed.sol:723-724, _epoch 582-587), set onl […] | | house-swarmfeed | C3 | **refuted** | Incomplete as written: the gate (SwarmFeed.sol:494) is only active when attestationChainId != blockClockChainId. blockClockChainId […] | | house-swarmfeed | C4 | **refuted** | ONE INVARIANT: for every pair of times s every leaf in f's latestValue DAG other than the ProvenPoolPrice is POSITIVELY declared attester-free […] | | house-seats | C1 | **holds** | Read line by line: SeatJoin.claimAllowed :680-684 (RULE_DIRECT exact target+selector; RULE_FACTORY only via factory with rule 2 an […] | | house-seats | C2 | **holds** | testFuzz_C2_swapNeverShrinksDelivery (512 runs, PASS): position of 1 seat + 2 unpledged seats; in the auction block alice withdraw […] | | house-seats | C3 | **refuted** | Holds when every attestation is poked (testFuzz_fallCapPokedEachAttestation, 512 runs, values 1..3e18, figures 0..399, equal-time […] | | house-seats | C4 | **refuted** | HS-3: take + re-deposit + claim credits the buyer. Without a re-deposit, an arrival reported after take credits lastHolder (the bo […] | | house-seats | C5 | **holds** | ONE invariant: for every id with auctions[id].startAt!=0, elapsed(id) <= the seconds since startAt in which Pricer.quote(SEAT).pri […] | | fixed-extensions | C1 | **holds** | Loan.expiry is written only at src/spokes/FixedLoans.sol:262 (open: now + term) and src/spokes/FixedLoans.sol:343 (extend: += affi […] | | fixed-extensions | C2 | **holds** | Writers of Loan.debt/shares: open src/spokes/FixedLoans.sol:261 (creation), repay src/spokes/FixedLoans.sol:293 (full: anyone, res […] | | fixed-extensions | C3 | **holds** | Bounded exactly as README:720 says. After an extension, time left = lead + t0 where lead <= window(t0) (src/spokes/FixedLoans.sol: […] | | fixed-extensions | C4 | **holds** | extend src/spokes/FixedLoans.sol:307-352 reads: paused (:308), extendTerms() (:309 = _affirmedLast, _affirmedEvery, lendPrice, _af […] | | fixed-extensions | C5 | **holds** | One invariant covering open and extend (the only writers of expiry): for every OPEN loan L, at every block, (a) L.expiry - now <= […] | | fixed-affirm-config | C1 | **holds** | Writers of affirmedAt: src/spokes/FixedLoans.sol:572 (_affirm, = block.timestamp) and :633 (_apply, = 0); never written in the con […] | | fixed-affirm-config | C2 | **holds** | FlGate.blocking script/launch/FlGate.sol:18-20 masks bits 2 and 3 (SET_TERMS 0x02, SET_LIMITS 0x03 equal FixedLoans :78-79); SafeB […] | | fixed-affirm-config | C3 | **holds** | Not worse than README:713-715 / :701-702. A stranger's only lever is applyPending (src/GovernedByKind.sol applyPending: _take dele […] | | fixed-affirm-config | C4 | **holds** | Known as written (README:703-705: 'the two-argument forms take whatever is in force'); no loss beyond minOut / maxPay found. test_ […] | | fixed-limits-fees | C1 | **holds** | issuedSinceAffirm is written only at src/spokes/FixedLoans.sol:253 (open) and src/spokes/FixedLoans.sol:572 (_affirm, also via low […] | | fixed-limits-fees | C2 | **holds** | _allowance/_allowanceAt written only at src/spokes/FixedLoans.sol:221 (ctor, empty), :252 (open, a-debt at now) and :642 (SET_LIMI […] | | fixed-limits-fees | C3 | **holds** | open lends at lendPrice (_lendable src/spokes/FixedLoans.sol:661); lendPrice can exceed the affirmed price only through a SET_LEND […] | | fixed-limits-fees | C4 | **holds** | [data] RAN locally (no RPC needed; fixture test/fixtures/fixed-loans/replay.json at this commit): forge test --use solar --match-p […] | | fixed-forfeit-take | C1 | **holds** | Confirmed as framed; no unrepaid path beyond what is designed. close (src/spokes/FixedLoans.sol:415-424) sets saleDebt -= debt, se […] | | fixed-forfeit-take | C2 | **holds** | Gas grief only, as README:725 says ("a 1-share take in front reverts a partial take sized to the 10% rest (take-all always runs);" […] | | fixed-forfeit-take | C3 | **holds** | repay needs state OPEN (src/spokes/FixedLoans.sol:278). forfeit flips OPEN->SALE (src/spokes/FixedLoans.sol:366-369). take needs S […] | | fixed-forfeit-take | C4 | **holds** | forfeit (src/spokes/FixedLoans.sol:364-374) reads only the loan. take/close read only loan fields (_lotPrice src/spokes/FixedLoans […] | ## Properties that hold (with what was tried) - **house-edge-first-loss**, P1 (liquidation always settles): Read Liquidator._cover (Liquidator.sol:213-217): COVER_MIN_GAS check then try ledger.reportLoss {} catch {}; bite and se […] - **house-edge-first-loss**, P1 (in kind never skipped while priced): Fails: HEFL-2 (wait -> stale leg -> skip). Unsendable (issuer pause/blocklist of the Treasury) skip is README:738 as wri […] - **house-edge-first-loss**, P2 (edge bad debt leaves only via Ledger.cover and reportLoss): grep badDebt writers in src/house: decrements only Ledger.cover (Ledger.sol:383-385) and Ledger._report (:429-431); incr […] - **house-edge-first-loss**, P2 (in kind only while reporting(); no bad debt booked while reporting()): In kind is after `if (!ledger.reporting()) return covered;` (Backstop.sol:633). Both bad-debt writers call _notInReport […] - **house-edge-first-loss**, P3 (no depositor withdraws while edge bad debt is booked): withdraw reverts FirstLossOwed on owedBadDebt()!=0 (Backstop.sol:513); claim() pays only collateral already split at a p […] - **house-backstop-sleeve**, P1 depositor withdraws at nav; no deposit/withdraw/conversion moves nav in its own favour: testFuzz_P1_donation (1000 runs): attacker first deposit a, donation d, victim deposit v, 9 days later; attacker value < […] - **house-backstop-sleeve**, P2 every oracle read fails closed; unpriced token valued 0 and never sold below its low: Read every one of the 8 reads: nav returns ok=false for any held, unpriced, non-retired, non-dust token so _convert wait […] - **house-backstop-sleeve**, P3 a liquidation's bid settles whole or leaves no trace: Liquidator.bite runs open/room/liquidatePosition/closeBid as one self-call standingBid inside try/catch with a gas guard […] - **house-pricer-liquidation**, P1: testFuzz_P1_conservativeLegs (256 runs over median, proven spot, cap); code review of the twin rule (Pricer.sol:105-120) […] - **house-pricer-liquidation**, P2: Code review only (no v4 pool harness in time): DepthSampler hourly buckets keep minima, a sample only lowers its hour, d […] - **house-pricer-liquidation**, P3: testFuzz_P3_markAndSeize (256 runs, price 40..120 on CR 250%, NHI 0.5..1.0, maxLull 0): after a stranger's 1-wei addFor […] - **house-pricer-liquidation**, P4: Per epoch from the value held: holds (each epoch in F1 moves one cap). Per window of time: fails (HPL-F1, testFuzz_P4 co […] - **house-swarmfeed**, P4 question binding: 256-run fuzz over fromBlock/toBlock/span/questionHash with a signed attestation on a real SwarmPricePolicy leaf; cross-l […] - **house-swarmfeed**, P1 inside one epoch (any order, same block): 256-run fuzz, 6 steps with random dt in [1,2 maxAge] and targets 1..1e24: each stored value stays in [high(1-c), low(1+c […] - **house-swarmfeed**, No lock-out of acceptance / honest liveness without an adversary: Same fuzz: after any 6-step history the honest target H in [1e16,1e20] is stored exactly within ceil(ln(max/min)/ln1.2)+ […] - **house-swarmfeed**, Writers/readers of the memory state: Writers: _follow/_accept only (state: _value,_updatedAt,_acceptedAt,_movedAt,_anchor*,_epoch*,_carryAnchor,_attested), r […] - **house-proven-pool-feeds**, P3 (storage proof): Ran the commit's own ProvenPoolPrice suites in the scratch copy: test/house/unit/ProvenPoolPrice.t.sol (12/13 pass on a […] - **house-proven-pool-feeds**, P3 (first origin): Code: a remote leaf with no block clock accepts its first value only from the deployer (SwarmFeed.sol:480); with a block […] - **house-proven-pool-feeds**, P1 (deployed graph): Deployed sIMD spot is proven only through ProductFeed(Proven, Chainlink) and RateFeed with the sIMD vault (no converged( […] - **house-seats**, P1: test_P1_strangerRoutesRefused (PASS): stranger withdraw NotHolder, take without auction reverts, governor rescue of the […] - **house-seats**, P2: Finding HS-1. Otherwise existing AuditW1/W2/W3 clock property fuzzers pass; Pricer.priced == SeatFeed!=0 && !SeatFeed.is […] - **house-seats**, P3: Holds against a hostile/denylisted caller for credit routing: collect(tokenId, token, who) pays only owed[..][who] to wh […] - **house-seats**, P4: testFuzz_P4_starvedCollectKeepsCredit (512 runs, gas 20k..1.2M, PASS): either both legs paid (90/10) or the whole collec […] - **fixed-extensions**, P1 No extension brings a loan's forfeit date (expiry + grace) earlier, across any SET_TERMS anyone applies at any moment.: Code: src/spokes/FixedLoans.sol:342-347 (was = old expiry + grace; expiry += term >= 1 day; grace clamped up to was - ne […] - **fixed-extensions**, P2 Anyone repays a loan in full until forfeit; only its borrower repays in part; no stranger's payment takes her extension, no apply closes it, none reverts her […]: repay src/spokes/FixedLoans.sol:276-299 reads only the loan; amount clamped to debt (:280) so a dust payment in front ca […] - **fixed-extensions**, P3 At most one extension per window per set of affirmed numbers, only in the last min(3 days, term / 4) before expiry; across an affirm of a widened term, see C […]: src/spokes/FixedLoans.sol:318 window = _window(affirmed term) and :343 adds that same term, so after one extension time […] - **fixed-affirm-config**, P1 open lends only at affirmed numbers (or tightened by an instant lower); every apply closes it; no apply gets numbers affirmed unread: forge 1.9.0 --use solar, test/scratch/FixedAffirm.t.sol on FixedBase (real ImdUSD+MinterHub, FixedLoans at the spec numb […] - **fixed-affirm-config**, P2 an affirm built for the numbers after every pending change lands whoever applies; exits read neither: forge 1.9.0 --use solar, test/scratch/FixedAffirm.t.sol on FixedBase (real ImdUSD+MinterHub, FixedLoans at the spec numb […] - **fixed-affirm-config**, P3 the Safe's FL file (lowerAndAffirm) lands whatever matured change a stranger applies in front: forge 1.9.0 --use solar, test/scratch/FixedAffirm.t.sol on FixedBase (real ImdUSD+MinterHub, FixedLoans at the spec numb […] - **fixed-limits-fees**, P1 leaky bucket (new debt in any closed window T <= largest dailyLimit in force x (1 + T/1 day)): invariant_bucket_surge_price_fee (500 runs x depth 150, 10 actions incl. stranger applyPending of SET_LIMITS/SET_LEND_PR […] - **fixed-limits-fees**, P1 surge limit between two affirms: Same walk/invariant: per affirm period, issued <= max surgeLimit in force; lowerSurgeLimit below issued (Surge revert :2 […] - **fixed-limits-fees**, P1 each open pays a fee >= 1 wei: _checkTerms refuses feeBps == 0 (:736) at ctor and SET_TERMS (:610), minDebt >= 1e18 (:747), fee rounded up (:256), so f […] - **fixed-limits-fees**, P2 fees and rounding favour the protocol on open, extend, repay (no loop gains): testFuzz_noLoopGain (3000 runs): open (shares 2e23..1e33), up to 12 random partial repays by the borrower, extends at ra […] - **fixed-limits-fees**, P3 P1 across any rule-abiding SET_LIMITS / lower applied in front, loans live: The walk and invariant apply matured SET_LIMITS/SET_LEND_PRICE as a stranger at random points between opens and affirms, […] - **fixed-forfeit-take**, P1 A lot brings at most its debt; rest to the borrower in that tx; DONE: Code: _quoteTake (src/spokes/FixedLoans.sol:688-699) clamps paid to debt when ceil(p*want/lotShares) >= debt and gives k […] - **fixed-forfeit-take**, P2 forfeit only after expiry+grace; no take before forfeit; no close before sale end; close (anyone) sends unsold shares to Treasury and reports the whole unpai […]: Code: src/spokes/FixedLoans.sol:367 (strict >), 384-385 (take while ts < saleStart+saleLength), 418 (close while ts >= t […] - **fixed-forfeit-take**, P3 lot price per share is a function of time only; a partial take never changes what the next buyer pays per share: Code: _lotPrice reads only lotDebt, floorBps, halfLife, startMultipleBps and saleStart, all fixed at forfeit or at open/ […] - **fixed-forfeit-take**, P4 Sum of open and lot debts == hub outstanding at all times; quoteTake equals what take charges: Writers (src/ and script/ grep: only FixedLoans touches openDebt, saleDebt or lot fields, and no script calls forfeit/ta […] ## Not run - **house-edge-first-loss:** Every Foundry test: forge 1.8.3 (< 1.9, no --use solar) and solc 0.8.38 not installed; HEFL-1 and HEFL-2 test sources written against test/utils/HouseRig.sol but not compiled - **house-edge-first-loss:** No [fork] or [data] claim in this sheet; none run - **house-backstop-sleeve:** [fork] none claimed: NOT RUN (no fork, no RPC). - **house-backstop-sleeve:** Real Ledger/Pricer/Treasury integration tests: NOT RUN (only Backstop with the repo's mocks; retireReserve and Ledger.retire/cover are source-read only). - **house-backstop-sleeve:** Invariant (stateful) suite: NOT RUN; fuzz only, 1000 runs per test. - **house-backstop-sleeve:** forge --use solar: NOT RUN (forge 1.8.3). - **house-pricer-liquidation:** [fork] none of the claims are [fork]/[data]; no fork test run (NOT RUN) - **house-pricer-liquidation:** Economic cost of C1's pool push across an epoch (no pool model) - **house-pricer-liquidation:** DepthSampler/ImdDepth JIT tests on a v4 pool (P2 by code review only) - **house-pricer-liquidation:** Invariant campaign for C6 - **house-pricer-liquidation:** Earlier submissions (ad4f75ab-..., 4d56c477-...) were not fetched - **house-swarmfeed:** [fork] first-value / block-clock behaviour on Robinhood Chain 4663 (block.number = Ethereum head): NOT RUN, no RPC used - **house-swarmfeed:** Consumers (Pricer twin rule, seat auction) not tested; F1/F2 impact on them reasoned from code only - **house-swarmfeed:** Full-repo build with via_ir and --use solar: NOT RUN (forge 1.8.3; side project used) - **house-proven-pool-feeds:** [fork]/[data]: no fork claims in this sheet; no mainnet fork run (NOT RUN). - **house-proven-pool-feeds:** forge --use solar and solc 0.8.38: not available (forge 1.8.3, solc 0.8.38 not installed); all tests ran on a pragma-relaxed copy with solc 0.8.26. - **house-proven-pool-feeds:** Invariant (stateful) campaign over Pricer + leaves: not run; fuzz only. - **house-seats:** No [fork]/[data] claims in this sheet: none run (NOT RUN, no RPC used). - **house-seats:** Live-config values (median leaf maxAge, relay cadence, the keeper's tick schedule) not read on chain; tests use the beta values in the existing suite (26 h leaf life, 1h10m ETH/USD). - **fixed-extensions:** No [fork] or [data] claims in this sheet: nothing run against a chain (NOT RUN). Earlier submissions (157d860f-..., 4d56c477-...) were not fetched; the wave-7 judge fixes (L2-L4) are in the code and test/unit/AuditW7JudgeFixed.t.sol at this commit. - **fixed-extensions:** The real MinterHub/sIMD were replaced by a stand-in hub with the same outstanding/OverBurn accounting and a rising-rate share token; hub and vault internals are other items' scope. - **fixed-affirm-config:** No [fork] or [data] claims in the sheet: nothing run against an RPC (NOT RUN). - **fixed-affirm-config:** Mutation sanity run (deleting affirmedAt = 0 in _apply) NOT RUN: editing src/ in the clone required approval. - **fixed-limits-fees:** No [fork] claim in this sheet; C4 is [data] and RAN against the fixture at the commit (no RPC). - **fixed-forfeit-take:** No [fork]/[data] claims in this sheet: none RUN. - **fixed-forfeit-take:** Not run under solc 0.8.38 or `--use solar` (forge 1.8.3 here; see forge field). - **fixed-forfeit-take:** Earlier findings fetched from api.imd.fun/jobs/{157d860f-dc22-4fa5-9ce4-a1683d3da28c,4d56c477-4266-4883-bf12-a7783bc8b0c8}/submissions (base commits 5719b27, ab136ba). None of them targets forfeit/take/close beyond the C2 info (the 1-share take in front, take-all immune), which is now README:725.