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 paid error[8-0081]: static assertion failed = left: `11234`
evidence/transcript-fail-refund-after-release. txt · fe 26. 6. 0 (5b3f96a)
Escrow · reachable states · C = 21 Patched 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
Invariant 'paid once' broken ROUTE 1·1·2·3·4
Start
(Open, 0, 0, 0)
1 Deposit
(Open, 1, 0, 0)
1 Deposit
(Open, 2, 0, 0)
2 Lock
(Locked, 2, 0, 0)
3 Release
(Locked, 1, 1, 0)
4 Refund
(Settled, 0, 1, 1)
Cold open: the red route is real. The lamps are the 736 reachable states from the committed graph; the build output on the left is the committed transcript.
The pain
Tests check the paths an author imagined.
Five accepted calls. Both sides paid. ROUTE 1·1·2·3·4
Start
(Open, 0, 0, 0)
1 Deposit
(Open, 1, 0, 0)
1 Deposit
(Open, 2, 0, 0)
2 Lock
(Locked, 2, 0, 0)
3 Release
(Locked, 1, 1, 0)
4 Refund
(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
README, The Problem: unit tests check imagined paths; a model checker is usually another tool, often a second model, run as a separate step.
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 = 21 Explored 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
Step with →: depth bands 0–10, 0–21, 0–32, all 43 (EXHAUSTED), then the one-line bug: the red route and a new lamp outside the explored set. Lamps = states, columns = breadth-first depth, from evidence/state-graph-escrow.json.
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 paid error[8-0081]: static assertion failed = left: `11234`
evidence/transcript-fail-refund-after-release. txt (excerpt)
left: `11234`, decoded ROUTE 1·1·2·3·4
Start
(Open, 0, 0, 0)
1 Deposit
(Open, 1, 0, 0)
1 Deposit
(Open, 2, 0, 0)
2 Lock
(Locked, 2, 0, 0)
3 Release
(Locked, 1, 1, 0)
4 Refund
(Settled, 0, 1, 1)
sh demo/run.sh: green build, apply the patch, red build naming 'paid once' with left: 11234, then the attack replayed on the patched and the real contract.
Checked = deployed
One step(), called by the contract.
step() src/escrow.fe
static_assert the build explores it: 736 states
recv handlers the deployed contract calls it
differential 1,008 deployments, 25,646 handler calls, each compared with step()
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)
For the escrow, the function that was checked is the function that is deployed. Storage states the handlers cannot reach are not covered.
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.
15/15
Fe pins matched by a Python oracle
evidence/transcript-tests. txt · evidence/gas. txt · evidence/oracle. txt
Same explorer source, three executions. An independent Python oracle (tools/ref_model.py) agrees with all 15 Fe pins.
Escrow + a 2-of-3 timelock vault
Two protocols. Nine patches, nine refusals.
Vault · B = 10 · T = 3 211 states · 580 wires
211 reachable states as lamps, columns by breadth-first depth 0 to 70, 580 transitions as wires
No. Patch Invariant Route Decoded 01 refund-after-release'paid once' 11234 Deposit, Deposit, Lock, Release, Refund 02 settle-early'settled empty' 1123 Deposit, Deposit, Lock, Release 03 mint-release'conserved' 123 Deposit, Lock, Release 04 cap-off-by-one'within capacity' 11111111111111111111 twenty Deposits 05 vault-approve-twice'counted once' 122 Propose, ApproveA, ApproveA 06 vault-execute-early'timelock respected' 1236 Propose, ApproveA, ApproveB, Execute 07 vault-pay-twice'pays one unit' 1235556 Propose, ApproveA, ApproveB, Tick, Tick, Tick, Execute 08 vault-cancel-pays'only execute pays' 17 Propose, Cancel 09 vault-execute-unguarded'two distinct approvals' 6 Execute
sh demo/check-bugs.sh passes only when every patched build fails naming its invariant; CI runs it as a must-fail job on every push, green at the submitted commit; evidence/check-bugs.txt is the local transcript.
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.
Bounded-exhaustive at the stated capacities, not formal verification. Consts that reference consts share one budget, so bigger models split into independent asserts (91 / 238 / 385 states).
Why Fe
Take Fe out and the checker is gone.
const fn + while array writes static_assert assert! messages enum + match contract · msg · recv fe test · 2 backends fe 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 writes src/escrow_explore. fe: 94static_assert as the build gate src/escrow_explore. fe: 254assert! message = named invariant src/escrow_explore. fe: 41contract · recv calling step() src/escrow_contract. fe: 64fe test on both backends · black_box src/tests. fe: 30
fe 26.6.0 (5b3f96a) · no comparison with other languages was made
We did not compare against other contract languages or model checkers; this describes what this build does, not how it ranks.
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
DEMO.md maps every number to its command. Declaration of AI assistance and reused code: DECLARATION.md.