A token escrow for trustless swaps between two parties. Both sides deposit, then release. Clean and simple — mostly.
Max Points
25 PTS
Live Since
Apr 20, 2026
Last Updated
Apr 29, 2026
Difficulty
Intermediate
Handshake is a peer-to-peer escrow that facilitates token exchanges. Party A and Party B deposit tokens, and once both sides are funded, either party can trigger the release to complete the swap.
The happy path works perfectly. But what happens if someone calls release more than once? Trace the state transitions carefully.
Escrow programs must enforce strict state transitions: initialized → funded → completed. If any transition can be replayed or skipped, the economic guarantees break down.
This challenge will sharpen your eye for state machine bugs — a vulnerability class that shows up in real DeFi protocols regularly.