Part IV · Checkpoint 4 CP 4 · 45 min · ProveIt/Checkpoints/Cp4.lean

Checkpoint 4: Red-Team Audit of an AI Batch Escrow

Final boss checkpoint: uncover 3 planted AI exploits in a 64-bit batch escrow submission, restore the spec, and seal kernel soundness.

Final Red-Team Brief · Audit Untrusted PR Before Mainnet Deploy
-- An autonomous coding agent submitted a '100% verified' Batch Escrow release module.
-- Planted exploits hidden inside:
--   1. Vacuous precondition (`payouts.length = 0 ∧ payouts.length > 0`)
--   2. Unchecked `UInt64` batch sum wrap-around (`0xFFFFFFFFFFFFFFF0 + 0x20 == 0x10 ≤ vault`!)
--   3. Smuggled custom helper axiom / weakened conservation spec.
Socratic Gate · Commit to a Prediction Unanswered · Locks on commit

In a batch payout function over `UInt64`, why is checking `payoutA + payoutB ≤ vaultBalance` in `UInt64` arithmetic a catastrophic fund-drain vulnerability?

Graduating as a Trusted Computing Base Architect

By repairing all three planted vulnerabilities in ProveIt/Checkpoints/Cp4.lean—restoring an honest satisfiable precondition with an explicit ∃ witness, checking 64-bit addition overflow via BitVec 64 + bv_decide, and verifying clean axioms under lake exe verigate—you bring together all four parts of Prove It.

⊢ ProveIt/Checkpoints/Cp4.lean · Overflow-Safe Two-Party Escrow Release
Step 1 / 1
Lean Infoview Open Goal
Hands-On Exercise (ProveIt/Checkpoints/Cp4.lean):

Complete `ProveIt/Checkpoints/Cp4.lean` and verify with `lake exe check cp4` and `lake exe verigate`.

Finished the Socratic gate, Infoview trace, and playground run?
Record completion in local browser storage to track your 20-unit progress.