{
 "item": "core-loss-settlement",
 "commit": "ff1c192b3798542997f600091f2dc73ff05e4c40",
 "forge": "1.8.3 (older than 1.9: no --use solar; per brief, reasoned from code, no tests run)",
 "verdict": "holds",
 "findings": [],
 "claims": [
  {
   "id": "C1",
   "result": "holds",
   "evidence": "grep src/ (core, excluding src/house): badDebt/totalBadDebt written only at src/LedgerSettlement.sol:164-165 (liquidatePosition, += bad) and src/Ledger.sol:356-358 (cover, clamped to s.badDebt, -=). No script writes. Not test-checked (forge 1.8.3)."
  },
  {
   "id": "C2",
   "result": "holds",
   "evidence": "src/LedgerBase.sol:222-223 (unbacked) and :325-326 (_checkBrake) read token.balanceOf(treasury), the same balance Treasury.coverBadDebt (src/Treasury.sol:103-112) burns via Ledger.cover. A donation lifts the brake only by an amount anyone can immediately burn with coverBadDebt (permissionless), so it is real cover. Withdrawals while bad debt stands: retireReserve and payNote revert BadDebtOutstanding (Treasury.sol:120,172); only the Safe's 48 h payout (_apply, :188) can move imdUSD out, which is the ACCEPTED Safe. No stranger withdrawal route found. Not test-checked."
  },
  {
   "id": "C3",
   "result": "holds",
   "evidence": "src/Liquidator.sol:136-147,158-170: the whole sleeve bid runs in try this.standingBid; any revert rolls back liquidatePosition, then the caller path (:149) books bad = debt - min(debt, seized*price) exactly once (LedgerSettlement.sol:141-145). Both paths call the same liquidatePosition with the same price q.low, so the shortfall is identical; _cover runs after either. Not test-checked."
  },
  {
   "id": "C4",
   "result": "holds",
   "evidence": "owedToTreasury written only at src/LedgerBase.sol:413 (_toTreasury: called by harvest :401, redemption fee LedgerSettlement.sol:98, liquidation cut :178, marker fallback :190) and LedgerSettlement.sol:204 (payOwed). payOwed: non-Treasury caller forced to (treasury, owed) (:201); Treasury amount > owed reverts ExcessRepayment (:202). A stranger cannot get paid. _apply token/Join confusion: owed is only keyed by Join addresses, so a token asset reads 0 and takes safeTransfer; a Join whose owed was drained by anyone's payOwed before apply falls to IERC20(join).safeTransfer, which reverts (Join has no transfer) - no loss, proposal just fails. Not test-checked."
  },
  {
   "id": "C5",
   "result": "holds",
   "evidence": "src/Treasury.sol:189-192: if/else branches are exclusive, so one payload either calls payOwed or transfers, never both. Unwired Treasury (ledger=0): staticcall to address(0) succeeds with empty return, length<32, takes the transfer branch: owed collateral is unreachable, not lost (anyone's payOwed still works). Not test-checked."
  },
  {
   "id": "C6",
   "result": "holds",
   "evidence": "script/deploy/StageGenesis.sol:42-47 calls d.treasury.wireNotes when cfg.pegQuote != 0; README:855-856 states every day-1 config sets notes at genesis (slot spent, AlreadyWired at Treasury.sol:96). Did not verify each DeployConfig value; no reachable post-genesis use found. Not test-checked."
  }
 ],
 "holds": [
  {
   "property": "P1",
   "tried": "Code read of LedgerSettlement.liquidatePosition (solvency before penalty, bad only when collateral < debt, no Treasury cut when bad>0), Liquidator sleeve/caller paths and _cover (gas floor COVER_MIN_GAS, try/catch). cover clamps to booked badDebt so a second cover cannot overpay. No test run (forge 1.8.3)."
  },
  {
   "property": "P2",
   "tried": "Ledger.cover burns msg.sender's imdUSD (token.burn) clamped to badDebt; no mint on the path. Code read only."
  },
  {
   "property": "P3",
   "tried": "Enumerated Treasury exits: coverBadDebt (burns), retireReserve (onlyGovernor, no bad debt), payNote (msg.sender==notes, no bad debt), _apply (timelocked). wireNotes is wirer-only once, spent at genesis. Code read only."
  },
  {
   "property": "P4",
   "tried": "_toTreasury keeps refused amount in the Join and increments owed; payOwed is onlyLedger (delegatecall from Ledger.payOwed), stranger path sends all to immutable treasury, Treasury path bounded by owed. Code read only."
  }
 ],
 "notRun": [
  "All Foundry tests: local forge is 1.8.3 (<1.9 required by brief); verdicts are from code reading, no findings asserted",
  "No [fork]/[data] claims in sheet: NOT RUN",
  "Earlier submissions 5937da4b..., d9aa6add... not fetched"
 ]
}