Account Balances

Account
Coin
Balance
Will
Will
FooCoins
100
Will
Will
BarCoins
0
Alan
Alan
FooCoins
0
Alan
Alan
BarCoins
100
Escrow
Escrow
FooCoins
0

Escrow Terms

Account
Coin
Amount
Will
Will
FooCoins
Alan
Alan
BarCoins

In an escrow, Will wants to exchange FooCoins for Alan's BarCoins. To do so, Will sends his FooCoins to a neutral "escrow" account. Once his coins have arrived, Alan sends his BarCoins to Will, and the escrow sends its FooCoins to Alan. Both transactions are atomic: if anything goes wrong, they are rolled back.

👉 Setup:

1. Connect Phantom wallet (top-right).

2. Airdrop yourself SOL on devnet.

👉 Instructions:

1. Initialize escrow.

2. Set FooCoins and BarCoins amounts.

3. Submit escrow (as Will).

4. Accept escrow (as Alan).