exhaust · Fe Builders Challenge 2026

Your compiler refuses the sequence nobody wrote a test for.

error[3-0036]: assertion failed in const context= assertion message: invariant 'paid once' broken: buyer and seller both paiderror[8-0081]: static assertion failed= left: `11234`
evidence/transcript-fail-refund-after-release.txt · fe 26.6.0 (5b3f96a)
Escrow · reachable states · C = 21Patched build
736 reachable states as lamps, columns by breadth-first depth 0 to 43, 966 transitions as wires NEW (Settled,0,1,1)both sides paid
BUILD FAILED · 'PAID ONCE'evidence/state-graph-escrow.json
Invariant 'paid once' brokenROUTE 1·1·2·3·4
  1. Start
    (Open,0,0,0)
  2. 1Deposit
    (Open,1,0,0)
  3. 1Deposit
    (Open,2,0,0)
  4. 2Lock
    (Locked,2,0,0)
  5. 3Release
    (Locked,1,1,0)
  6. 4Refund
    (Settled,0,1,1)
exhaust · source de43ffc1 / 10
The pain

Tests check the paths an author imagined.

Five accepted calls. Both sides paid.ROUTE 1·1·2·3·4
  1. Start
    (Open,0,0,0)
  2. 1Deposit
    (Open,1,0,0)
  3. 1Deposit
    (Open,2,0,0)
  4. 2Lock
    (Locked,2,0,0)
  5. 3Release
    (Locked,1,1,0)
  6. 4Refund
    (Settled,0,1,1)
patched contract (search removed), fe test --filter test_attack_patched_replay:PASS [0.0002s] test_attack_patched_replay-> all five calls accepted; the seller AND the buyer were paid

The patched contract accepts all five calls; only the order breaks the escrow. The per-handler test suite misses this patch (evidence/check-bugs.txt).

evidence/demo-run.txt · the patched contract with the search removed
exhaust · source de43ffc2 / 10
The move

The compiler is the model checker.

A const fn breadth-first search inside fe build. Every successor is checked against five named invariants.

Depth 0–43 · 736 states · then one line changes
press → to step the search · evidence/state-graph-escrow.json
Escrow · C = 21Explored 736/736
736 reachable states as lamps, columns by breadth-first depth 0 to 43, 966 transitions as wires NEW (Settled,0,1,1)both sides paid
EXHAUSTED 736/736 · C=21BUILD FAILED · 'PAID ONCE'depth 0–43
exhaust · source de43ffc3 / 10
The red build

Drop one condition. The build goes red.

src/escrow.fe · Refund guard
-  if s.escrow > 0 && s.seller == 0 {+  if s.escrow > 0 {

The compiler names the invariant and prints the route as digits.

error[3-0036]: assertion failed in const context= assertion message: invariant 'paid once' broken: buyer and seller both paiderror[8-0081]: static assertion failed= left: `11234`
evidence/transcript-fail-refund-after-release.txt (excerpt)
left: `11234`, decodedROUTE 1·1·2·3·4
  1. Start
    (Open,0,0,0)
  2. 1Deposit
    (Open,1,0,0)
  3. 1Deposit
    (Open,2,0,0)
  4. 2Lock
    (Locked,2,0,0)
  5. 3Release
    (Locked,1,1,0)
  6. 4Refund
    (Settled,0,1,1)
exhaust · source de43ffc4 / 10
Checked = deployed

One step(), called by the contract.

step()src/escrow.fe
static_assertthe build explores it: 736 states
recv handlersthe deployed contract calls it
differential1,008 deployments, 25,646 handler calls, each compared with step()
1,008
deployed contracts
25,646
handler calls replayed
25,646
stored states compared with step(), all equal
evidence/differential.txt · the vault's caller and timelock checks are adapter code outside the check (README · Limitations)
exhaust · source de43ffc5 / 10
Three executions

Compile time, EVM, native: one count.

736static_assert
=
736Sonatina EVM · fe test
=
736fe test --backend native

Asserted in test_runtime_explore_agrees (and 494 at C = 17). The EVM search at C = 17 burns 16,394,182 gas: black_box keeps it from being folded.

28
EVM tests
10
native tests
15/15
Fe pins matched by a Python oracle
evidence/transcript-tests.txt · evidence/gas.txt · evidence/oracle.txt
exhaust · source de43ffc6 / 10
Escrow + a 2-of-3 timelock vault

Two protocols. Nine patches, nine refusals.

Vault · B = 10 · T = 3211 states · 580 wires
211 reachable states as lamps, columns by breadth-first depth 0 to 70, 580 transitions as wires
No.PatchInvariantRouteDecoded
01refund-after-release'paid once'11234Deposit, Deposit, Lock, Release, Refund
02settle-early'settled empty'1123Deposit, Deposit, Lock, Release
03mint-release'conserved'123Deposit, Lock, Release
04cap-off-by-one'within capacity'11111111111111111111twenty Deposits
05vault-approve-twice'counted once'122Propose, ApproveA, ApproveA
06vault-execute-early'timelock respected'1236Propose, ApproveA, ApproveB, Execute
07vault-pay-twice'pays one unit'1235556Propose, ApproveA, ApproveB, Tick, Tick, Tick, Execute
08vault-cancel-pays'only execute pays'17Propose, Cancel
09vault-execute-unguarded'two distinct approvals'6Execute
exhaust · source de43ffc7 / 10
The ceiling

1,000,000 steps per assert. No override.

Escrow, C = 21explore(CAP)
940,335 · 94.0%
Route printer, C′ = 19counterexample(19)
908,455 · 90.8%
Vault, B = 10, T = 3vexplore(VB, VT)
586,715 · 58.7%

Consts that reference consts share one budget, so bigger models split into independent asserts: 91 · 238 · 385 states.

  • Bounded: only the stated capacities. No liveness.
  • The escrow model has no caller identity and moves no value.
  • Model, Fe code and oracle share one author.
exhaust · source de43ffc · evidence/budget.md · machine.rs L66–73 at v26.6.08 / 10
Why Fe

Take Fe out and the checker is gone.

const fn + whilearray writesstatic_assertassert! messagesenum + matchcontract · msg · recvfe test · 2 backendsfe fmt --check

Since Fe 26.1.0 a const fn can loop and write arrays under static_assert. The search is ordinary Fe; the build is the checker.

  • const fn + while + array writessrc/escrow_explore.fe:94
  • static_assert as the build gatesrc/escrow_explore.fe:254
  • assert! message = named invariantsrc/escrow_explore.fe:41
  • contract · recv calling step()src/escrow_contract.fe:64
  • fe test on both backends · black_boxsrc/tests.fe:30
fe 26.6.0 (5b3f96a) · no comparison with other languages was made
exhaust · source de43ffc · fe 26.6.0 (5b3f96a)9 / 10
Clone it. Break it.

Watch the build refuse.

# fe 26.6.0 (5b3f96a)
git clone https://github.com/edycutjong/exhaust
cd exhaust
fe build          # green: 736 states
sh demo/run.sh    # red: 'paid once', 11234
fe test && fe test --backend native
exhaust · source de43ffc10 / 10
1 / 10⌂