# Audit report

> Re-review of the ticket market after the fifth review (IMD, of b270a1f). Fixes are in 0ceb3c3; brief in AUDIT.md, "This round". In scope: contracts/src/ArchiveTicketMarket.sol, contracts/src/ReceiptProof.sol (unchanged), contracts/script/DeployTicketMarket.s.sol. First confirm each of the fifth review's 7 findings is closed (listed under "Fifth review"; the reviewers' proofs are in test/audit5/, adapted to show each attack refused). Then check the fixes opened nothing new, above all the payment window (PAY_BLOCKS: a seller is paid only for a delivery within ~3 days of the purchase) and deals keyed by (ticket, seller). Try to: take a buyer's ETH without the ticket reaching them; get both the ticket and a refund; get paid while keeping the ticket or for a delivery after the window; or make ReceiptProof or the BlockHashLib header check accept a value or log that isn't really in the block. Design rule: a refund never depends on a missing proof, because the accepting side can make its own receipt unprovable (EIP-7702 log bloat). Accepted limits are listed in AUDIT.md; please don't re-report those unless they're worse than described.

| | |
|---|---|
| Repository | https://github.com/mylesdaughtry/archive-contracts.git |
| Commit | `b253521a3e5b28276db0dc09662e887246dd47e9` |
| Job | `199b51c9-d316-48ea-a848-05a52ee6f2e2` |
| Judged | 2026-12-03 17:02 UTC |
| Findings | 2 medium · 2 low · 1 info |

Four agents audited the code as it is at `b253521`, each in one area (math, permissions, economics, control flow),
and a judge reproduced, merged and ranked what they found, then read the code once more itself. Nothing in the repository was changed or deployed.

## Findings

### 1. Medium: Payment window: the buyer's accept, not the seller's offer, sets the delivery block, so a timely offer accepted one block after PAY_BLOCKS gives the buyer the ticket and leaves the seller unpaid for g

`contracts/src/ArchiveTicketMarket.sol:154`

```
        if (block.number > d.openedAt + PAY_BLOCKS) revert TooLate();
```

Merged from three specialist reports (permissions 817ec967, flow da700fd6, math 95f277f8); reproduced by me. New with 0ceb3c3: at b270a1f `release` had no end, so a late accept still paid the seller.

ArchiveSale moves a ticket only when the receiver calls acceptTicket, and an offer made with transferTicket never expires. So the block that `release` (line 154, block.number) and `releaseWithProof` (line 174, the log's block) hold against openedAt + PAY_BLOCKS is chosen by the buyer alone. A seller who follows every rule in the contract header and in AUDIT.md (offers only to the buyer, after the purchase, long before DELIVERY_BLOCKS run out) loses the ticket for nothing if the buyer accepts at openedAt + 21601 or later: release reverts TooLate, releaseWithProof reverts BlockAfterWindow, cancel and refund revert NotWithSeller, refundWithProof reverts HeldByBuyer. The buyer ends exactly where an honest purchase ends (paid the price, holds the ticket), so it costs the buyer nothing and needs no EIP-7702 log bloat: it can be spite, leverage, or simply a buyer who comes back on day four and clicks accept. While the offer stands the buyer cannot be refunded either (OfferedToBuyer), so past the window a standing offer has two exits only: the seller withdraws it, or the buyer accepts and the price is locked.

Why this is worse than the accepted limit: AUDIT.md accepts 'a delivery after the payment window locks the ETH for good' and says 'the page never sends that late: a seller can send only until 600 blocks before the refund opens'. That bounds the seller's offer, not the delivery. No listed seller rule covers it ('collect within the payment window' is impossible while the buyer has not accepted), so an honest pair of users can destroy the price by accident, and a hostile buyer can do it for free.

The seller does have a defence, which I also ran: withdraw the offer (ArchiveSale.transferTicket(ticket, address(0))) and `cancel` before the window ends; the buyer is refunded and can no longer accept. An accept in block openedAt + 21600 exactly is still payable (release in that block, or releaseWithProof later), so the offer has to be gone by the end of that block. Nothing in the contract header or AUDIT.md tells a seller to do this.

What fixing takes. The window itself has to stay: the market cannot expire an ArchiveSale offer, and it cannot tell a late accept of an old offer from the parked ticket that the fifth review's finding 2 closed. Minimum: add the seller rule to the contract header, AUDIT.md and the page (an offer still unaccepted a margin before openedAt + PAY_BLOCKS is withdrawn and the deal called off; the page shows the seller that deadline and refuses to send a buyer's acceptTicket once the window has passed), and correct the accepted-limit text to say the buyer controls the delivery block. If an on-chain cure is wanted it needs a scope decision, for example a checkpoint anyone can record inside the window while SALE.ticket(t).holder == seller and SALE.offeredTo(t) == buyer, after which releaseWithProof accepts a direct TicketTransferred(ticket, seller, buyer) log from after the window.

On the specialist's proof (LateAccept.t.sol): it fails on this code for the stated reason, but I have not attached it. It passes only if plain `release` pays after the window with no record that the offer was timely, and that would reopen the fifth review's finding 2. The fix should not be held to it.

**Reproduction**

Foundry, real ArchiveSale and market (contracts/test/scratch/Judge.t.sol, test_B_late_accept_every_exit_closed; passes, i.e. every step below behaves as stated). Block 2000: seller lists ticket t at 1 ETH, buyer calls buy{value: 1 ether}(t) (openedAt = 2000). Block 2010: seller calls sale.transferTicket(t, buyer). Block 9201: market.refund(t, seller) reverts OfferedToBuyer. Block 23601 (= 2000 + 21600 + 1): buyer calls sale.acceptTicket(t); sale.ticket(t).holder == buyer. Block 23602: market.release(t, seller) reverts TooLate; market.releaseWithProof(t, seller, 23601, header, 0x80, proof) with a valid proof of TicketTransferred(t, seller, buyer) reverts BlockAfterWindow; market.cancel(t) from the seller and market.refund(t, seller) revert NotWithSeller; market.refundWithProof with the same proof reverts HeldByBuyer.
Expected: a seller whose offer was made in time and whose ticket went seller -> buyer is paid, or can still call the deal off. Actual: seller's balance unchanged, buyer holds the ticket, address(market).balance stays 1 ETH with no function able to move it.
Controls, also run: accepting at block 23600 and calling release in that block pays the seller 1 ETH (test_B_control_accept_in_last_block_pays); the seller withdrawing the offer at block 23600 and calling cancel refunds the buyer, whose acceptTicket then reverts (test_B_defence_withdraw_then_cancel). The specialist's LateAccept test also fails here with 'seller delivered on time but can never be paid: 999999999999999999 != 1999999999999999999'.

### 2. Medium: Deals keyed by (ticket, seller): the market now opens a second deal on a ticket beside a stuck one, and one delivery settles both (a buyer pays two sellers for one ticket)

`contracts/src/ArchiveTicketMarket.sol:138`

```
        if (deals[ticket][a.seller].buyer != address(0)) revert DealOpen();
```

Merged from four specialist reports (permissions 975244b8, flow e5b34f3c, economics c4e06786, and the mirrored case economics b4a564f5); reproduced by me by running their tests. New with 0ceb3c3: before it, `buy` and `list` refused any second deal on a ticket while one was open (DealOpen). Now line 138 checks only the listing seller's own deal.

Main direction. Buyer B has an open deal with seller S for ticket t. S moves t to a second wallet S2 instead of delivering. S2 lists t and the market lets B buy it again. When S2 delivers, B holds the ticket, and `release` (line 156, `holder != d.buyer`) is path-blind, so it pays both deals. B has paid both prices for one ticket, and S is paid although its only transfer went to S2. At that moment B's refund for the first deal is gone: refundWithProof reverts HeldByBuyer, and already reverts OfferedToBuyer from the moment S2 offers.

This costs S nothing to try and needs no unprovable receipt. If the S -> S2 transfer is provable, B is entitled to refundWithProof for 8191 blocks, but only if B takes it before buying again: the old keying forced that order (S2 could not list until the first deal closed), the new one lets B buy first and lose the first price. If the transfer is unrefundable (an EIP-7702-bloated receipt, or a transfer later in the purchase block, see the related low finding), B's first payment is already beyond refund and buying again is the only way to get anything for it.

How this sits with the accepted limits: AUDIT.md accepts that release is path-blind and that the party who unlocks a frozen deal 'could demand a side payment'. So the outcome is the accepted hold-up, with one thing worse than described: the market itself now escrows the side payment, and its own listing leads a buyer into paying twice where it used to refuse. That is why I report it rather than drop it. It always needs the buyer's own second purchase; nobody can make B the holder without B's accept.

Mirrored direction (economics b4a564f5; I do not keep it as a finding of its own). A seller S whose delivery went unpaid (the buyer accepted and moved the ticket on behind an unprovable receipt, or the window passed) can now buy the same ticket back on this market into the same wallet while its old deal is open. `refund` (line 189) then pays the old buyer, because the seller holds the ticket again. Handing the ticket back as the unlock is in the accepted list, and it needs the seller's own accept, so it is the same accepted hold-up from the other side; the specialist's test RefundAfterResale fails on this code as described ('next call did not revert as expected').

What fixing takes, keeping the fifth review's fix 5: in `buy`, refuse a buyer who already has an open deal on this ticket with another seller (for example a mapping ticket => buyer => open-deal marker, set in `buy`, cleared in `_close` and `cancel`), and refuse a buyer who is the seller of an open deal on this ticket (`deals[ticket][msg.sender].buyer != address(0)`, one line, for the mirrored direction). Other buyers and holders are unaffected, so a dead deal still blocks only its own parties. A second copy of this contract deployed against the same sale would still carry such a sale, so the page should also refuse or warn when a buyer with an open deal on a ticket tries to buy that ticket again, and submit a possible refundWithProof first.

**Reproduction**

Foundry, real ArchiveSale and market (the attached proof: save as contracts/test/scratch/TwoDealsOneDelivery.t.sol and run, from contracts/, forge test --match-path test/scratch/TwoDealsOneDelivery.t.sol). Block 1000: seller S lists ticket t at 1 ETH; buyer B calls buy{value: 1 ether}(t), so deals[t][S] = (B, 1000, 1 ETH). Block 1001: S calls sale.transferTicket(t, S2), S2 calls sale.acceptTicket(t); S2 calls list(t, 0.3 ether, now + 1 days); B calls buy{value: 0.3 ether}(t), which succeeds: deals[t][S2] = (B, 1001, 0.3 ETH) while deals[t][S] is still open. Block 1002: S2 calls sale.transferTicket(t, B), B calls sale.acceptTicket(t). Then release(t, S) and release(t, S2).
Expected: the second buy is refused while B's first deal on t is open, or S, who never sent the ticket to B, is not paid; B pays one price for one ticket. Actual: both releases succeed, S receives 1 ETH and S2 receives 0.3 ETH, B is out 1.3 ETH for one ticket. The test fails with 'one delivery paid two sellers: the buyer paid both prices for one ticket'. The permissions specialist's DoublePay test fails the same way ('deal 1's seller is paid for the ticket it diverted: 1999999999999999999 != 999999999999999999'); I attach the flow specialist's because it also passes under a fix that refuses the second buy.

**Proof**: a Foundry test that fails on this code and passes once it is fixed.

```solidity
// SPDX-License-Identifier: MIT
pragma solidity 0.8.36;

// Sixth review: with deals keyed by (ticket, seller), one buyer can have two open deals for the same ticket, and the
// path-blind `release` pays BOTH sellers for a single delivery: the first seller is paid for a ticket it sent elsewhere.

import {Test} from "forge-std/Test.sol";
import {ArchiveSale} from "src/ArchiveSale.sol";
import {ArchiveTicketMarket} from "src/ArchiveTicketMarket.sol";

/// A stand-in piece: just the views ArchiveSale reads (same settings for every seed, never minted).
contract PieceStub {
    address public immutable SALE;
    uint256 public constant COLLATERAL_PER_UNIT = 1;
    bytes32 public constant LP_POOL_ID = bytes32(uint256(1));
    uint64 public constant MIN_HOLD = 1;
    uint64 public constant REDEEM_WINDOW = 1;
    address public constant MINTER = address(0);
    uint64 public constant MAX_SUPPLY = 1;
    uint32 public constant SEED = 1;
    uint256 public constant totalMinted = 0;

    constructor(address sale) {
        SALE = sale;
    }
}

contract FactoryStub {
    address public piece;

    function set(address p) external {
        piece = p;
    }

    function archiveOf(address, uint32) external view returns (address) {
        return piece;
    }
}

contract TwoDealsOneDeliveryTest is Test {
    uint256 constant PRICE = 0.1 ether;
    uint256 constant ASK = 1 ether; // the first deal
    uint256 constant ASK2 = 0.3 ether; // the same ticket again, from the wallet it was diverted to

    ArchiveSale sale;
    ArchiveTicketMarket market;
    address seller = makeAddr("seller");
    address seller2 = makeAddr("seller's other wallet");
    address buyer = makeAddr("buyer");

    function setUp() public {
        vm.roll(1000);
        FactoryStub factory = new FactoryStub();
        sale = new ArchiveSale(address(factory), address(this), 4);
        factory.set(address(new PieceStub(address(sale))));
        sale.setPrice(PRICE);
        sale.setOpen(true);
        market = new ArchiveTicketMarket(address(sale));
        vm.deal(seller, 10 ether);
        vm.deal(buyer, 10 ether);
    }

    function test_one_delivery_doesnt_pay_two_sellers_out_of_one_buyer() public {
        // Deal 1: the buyer pays 1 ETH for the seller's ticket.
        vm.prank(seller, seller);
        uint256 t = sale.buy{value: PRICE}(1);
        vm.prank(seller);
        market.list(t, ASK, block.timestamp + 1 days);
        vm.prank(buyer, buyer);
        market.buy{value: ASK}(t);

        // The seller never delivers: it moves the ticket to its other wallet, which lists it again.
        vm.roll(1001);
        vm.prank(seller, seller);
        sale.transferTicket(t, seller2);
        vm.prank(seller2, seller2);
        sale.acceptTicket(t);
        vm.prank(seller2);
        market.list(t, ASK2, block.timestamp + 1 days);

        // Deal 2: the buyer, still without the ticket, buys it from the wallet that holds it now.
        vm.prank(buyer, buyer);
        try market.buy{value: ASK2}(t) {} catch {}

        // That wallet delivers; the buyer accepts.
        vm.roll(1002);
        vm.prank(seller2, seller2);
        sale.transferTicket(t, buyer);
        vm.prank(buyer, buyer);
        sale.acceptTicket(t);

        uint256 before1 = seller.balance;
        uint256 before2 = seller2.balance;
        try market.release(t, seller) {} catch {}
        try market.release(t, seller2) {} catch {}

        assertFalse(
            seller.balance == before1 + ASK && seller2.balance == before2 + ASK2,
            "one delivery paid two sellers: the buyer paid both prices for one ticket"
        );
    }
}
```

### 3. Low: A transfer elsewhere later in the purchase block can never be used for a refund: two ordinary transactions behind the buy freeze the buyer's ETH with no unprovable receipt

`contracts/src/ArchiveTicketMarket.sol:208`

```
        if (blockNumber <= d.openedAt) revert BlockBeforeDeal();
```

Merged from two specialist reports (flow 65d86929, and part (i) of math 45004448); reproduced by me. A consequence of the fifth review's fix 3.

refundWithProof now needs a block strictly after the purchase's (line 208). AUDIT.md lists 'refundWithProof counts only blocks after the purchase's' under small things, but not what follows from it. A seller who lands transferTicket(t, S2) and S2's acceptTicket(t) behind the buyer's buy in the same block (a bundle, or two transactions with a lower tip; `buy` checks the offer only at the purchase) leaves a small, fully provable TicketTransferred(t, seller, S2) that the market refuses for ever (BlockBeforeDeal). `refund` and `cancel` need the ticket with the seller (NotWithSeller). The buyer has no refund path at all.

The accepted freezes are described as needing an EIP-7702 account that bloats a receipt past the provable size. This needs neither, so the accepted limit is cheaper than described, and it is the one case where a genuine seller -> other transfer after the purchase cannot refund (property 12). The seller's side keeps the ticket and, for the whole payment window, the option to hand it to the buyer and collect through the path-blind `release`; S2 can list and sell the ticket here again at once. It stays in the 'freeze with no gain, side payment possible' class, and it is the cheapest opening for the two-deal finding above.

What fixing takes. Counting the purchase block again would reopen the fifth review's finding 3: the market cannot order two events inside one block (no transaction index on-chain, and ArchiveSale keeps no transfer counter). So the strict bound stays. State the consequence in the contract header and AUDIT.md as a freeze that needs no unprovable receipt; have the page send purchases through a private relay so a seller cannot see a pending buy and land behind it (a seller who is or pays the block's builder still can), and have it look for TicketTransferred(ticket, seller, anyone) in the purchase block and tell the buyer the deal is frozen rather than wait for a refund that cannot come. Closing it on-chain needs a scope decision, for example a purchase that completes in a later block with the seller's holding rechecked then.

Not kept from math 45004448, part (ii): the wallet now holding the ticket can keep an offer to the buyer standing so refundWithProof reverts OfferedToBuyer, flickering it around the buyer's accept until the proof's 8191 blocks pass. That is the offer flicker AUDIT.md accepts for `refund` combined with the accepted proof window, and while the offer stands the buyer can accept and get the ticket at the agreed price, so I do not count it as worse than described. It would be worth one line next to the accepted flicker: for refundWithProof the flicker has a deadline after which the refund is gone.

**Reproduction**

Foundry, real ArchiveSale and market (contracts/test/scratch/Judge.t.sol, test_C_same_block_divert_freezes; passes, i.e. behaves as stated). Block 2000, in this order: buyer calls buy{value: 1 ether}(t) on the seller's listing (openedAt = 2000); seller calls sale.transferTicket(t, S2); S2 calls sale.acceptTicket(t), emitting TicketTransferred(t, seller, S2). Block 2001: market.refundWithProof(t, seller, 2000, header, 0x80, proof) with that genuine receipt.
Expected: the buyer is refunded, since the ticket went from the seller to someone else after the purchase. Actual: reverts BlockBeforeDeal. At block 9201 market.refund(t, seller) reverts NotWithSeller and the seller's market.cancel(t) reverts NotWithSeller; address(market).balance stays 1 ETH with no path back to the buyer. At block 23600 S2 hands the ticket to the buyer and market.release(t, seller) pays the seller 1 ETH, so the outcome is the seller's choice for 21600 blocks and a permanent lock after.
Control (test_C_control_next_block_divert_refunds): the same two transfers at block 2001 are refunded by refundWithProof(t, seller, 2001, ...).

### 4. Low: Fifth review finding 4 is closed in one order only: after any seller transfer that isn't to the buyer (even a hand-over to itself), the buyer can still end with the ticket and the refund by accepting,

`contracts/src/ArchiveTicketMarket.sol:210`

```
        if (holder == d.buyer) revert HeldByBuyer();
```

From math c4ab7f8f; reproduced by me, with one variant of my own. The brief asks that each of the fifth review's findings be confirmed closed. Finding 4 was 'after a stray transfer, the buyer could take the refund and then accept the ticket'. Line 211 refuses refundWithProof while an offer to the buyer stands, which stops refund-then-accept, and test/audit5/RefundProofGaps.t.sol checks that order only. Both guards on lines 210-211 read the present state, so the same two steps in the other order still work: the buyer accepts the offered ticket, passes it to a second wallet of their own, and then anyone calls refundWithProof with the proof of the older TicketTransferred(ticket, seller, X). The holder is no longer the buyer and no offer to the buyer stands, so the refund pays. The buyer has the ticket and the ETH, which is the outcome finding 4 reported and property 12 rules out ('nobody gets both the ticket and the ETH').

The seller cannot be paid first. `release` needs the buyer to hold the ticket at that moment, and the buyer can put the accept, the onward offer and the second wallet's accept in one private bundle. `releaseWithProof` cannot be used in the accept's own block (a block's hash is readable only from the next one), and the refund deletes the deal in that block.

Three cases, all run. (a) seller -> X, then X offers the buyer: the delivery log is X -> buyer, so no release proof exists at all. (b) seller -> X -> seller, then a proper seller -> buyer delivery: the seller's genuine delivery proof is beaten by the refund in the same block. (c) Mine: X can be the seller itself. ArchiveSale lets a holder offer a ticket to its own address and accept it, which logs TicketTransferred(ticket, seller, seller); `_proves(..., true)` only requires the last topic to differ from the buyer, so this counts as 'sent to a wallet other than the buyer's' although the ticket never left the seller. On its own it refunds the buyer at once while the seller still holds the ticket; followed by a proper delivery it gives the buyer both.

Preconditions are finding 4's: after the purchase the seller made a transfer that was not to the buyer, against the documented rule ('any transfer to another wallet ... lets the buyer take the ETH back'), and the ticket then reaches the buyer within the proof's 8191 blocks. So this is the residue of a low finding, not an attack on a rule-following seller. What the documented rule does not say is that the buyer can take the ETH back and keep a ticket delivered afterwards.

What fixing takes. The market cannot see that the buyer received the ticket once it has moved on, so an on-chain guard for this order would need the deal to remember a delivery, which it does not keep. Within the agreed design: state the consequence (once a ticket has gone seller -> anyone but the buyer after the purchase, the buyer is owed the refund for 8191 blocks, and nobody should offer or deliver it to the buyer until that deal is closed); have the page refuse to send such an offer and instead close the deal first, which the seller's side can do itself because anyone can call refundWithProof; and add the reverse order to test/audit5 so the limit is on record. For (c), decide whether a hand-over to itself should count as 'elsewhere'; refusing it needs `ReceiptProof.hasLog` to exclude a second value for the last topic, or to return it.

**Reproduction**

Foundry, real ArchiveSale and market, single-receipt blocks as in test/audit5 (contracts/test/scratch/Judge.t.sol; each test passes, i.e. behaves as stated).
(a) test_D_accept_move_on_then_refund. Block 2000: buyer buys ticket t from seller for 1 ETH. Block 2010: seller calls sale.transferTicket(t, other), other calls sale.acceptTicket(t): TicketTransferred(t, seller, other). Block 2011: other calls sale.transferTicket(t, buyer); market.refundWithProof(t, seller, 2010, header, 0x80, proof) reverts OfferedToBuyer (the fix). Buyer calls sale.acceptTicket(t), then sale.transferTicket(t, buyer2); buyer2 calls sale.acceptTicket(t). The same refundWithProof call now succeeds. Expected: revert, or the seller paid. Actual: buyer's balance rises by 1 ETH, sale.ticket(t).holder == buyer2, and market.release(t, seller) reverts NoDeal.
(b) test_D_round_trip_then_proper_delivery. Block 2010: seller -> other (transferTicket + acceptTicket). Block 2011: other -> seller. Block 2012: seller calls sale.transferTicket(t, buyer), buyer accepts, buyer -> buyer2, and in that block market.refundWithProof(t, seller, 2010, ...) with the proof of the block-2010 log succeeds: buyer refunded 1 ETH, buyer2 holds the ticket, market.release(t, seller) reverts NoDeal.
(c) test_D_self_handover_then_proper_delivery. Block 2010: seller calls sale.transferTicket(t, seller) and sale.acceptTicket(t): TicketTransferred(t, seller, seller). Block 2011: seller calls sale.transferTicket(t, buyer), buyer accepts, buyer -> buyer2, and in that block market.refundWithProof(t, seller, 2010, ...) succeeds: buyer refunded 1 ETH, buyer2 holds the ticket. Block 2012: the seller's releaseWithProof(t, seller, 2011, ...) with the genuine seller -> buyer receipt reverts NoDeal. test_D_self_handover_counts_as_elsewhere: the hand-over to itself alone refunds the buyer at block 2011 while sale.ticket(t).holder == seller.

### 5. Info: The only local test of the EIP-2935 path depends on the toolchain shipping the history contract: it fails on forge 1.7.1, so 36 of the brief's 37 tests pass and proofs older than 256 blocks go uncheck

`contracts/test/ArchiveTicketMarket.t.sol:350`

```
        assertGt(BlockHashLib.HISTORY_STORAGE_ADDRESS.code.length, 0, "the real history contract");
```

AUDIT.md says `forge test --match-path 'test/{ReceiptProof,ArchiveTicketMarket}.t.sol'` gives 37 passes. On forge 1.7.1 (commit 4072e48), with the repository's foundry.toml unchanged, test_a_delivery_proved_from_eip2935_history_a_day_later fails at this assertion: the test EVM has no code at 0x0000F90827F1C53a10cb7A02335B175320002935, and foundry.toml pins no evm_version. This is the only local test in which `BlockHashLib.verifyBlock` reads a hash from the history contract instead of BLOCKHASH. A proof is usable for 8191 blocks and BLOCKHASH covers 256 of them, so the branch nearly every real proof takes is exercised only where the toolchain happens to pre-deploy that contract. I found no defect in the path itself by reading it: the staticcall fails closed (a missing or reverting history contract leaves the hash 0, which no header matches, so the call reverts BlockHashMismatch). The other 24 market tests, the 12 ReceiptProof tests and the 5 audit5 tests pass here.

What fixing takes: make the test independent of the toolchain, for example vm.etch the EIP-2935 runtime code (kept as a fixture) at that address and write the block's hash into slot blockNumber % 8191 with vm.store, or pin the Foundry version and evm_version the suite needs and say so next to the test counts.

**Reproduction**

From contracts/, with forge 1.7.1 (4072e48) and solc 0.8.36: forge test --match-path 'test/{ReceiptProof,ArchiveTicketMarket}.t.sol'. Expected (AUDIT.md, Tests): 37 pass. Actual: 36 pass, 1 fails: '[FAIL: the real history contract: 0 <= 0] test_a_delivery_proved_from_eip2935_history_a_day_later()'.

---

Judge's submission `45d45067ec784c6090d48875d95053642b023c1a6484ad9bd8f043cb21f07038`, accepted on the IdentityMD network. Acceptance means the report met the job's checks;
it is not a guarantee that the code has no other defects.
