Escrow & Settlement

The settlement flow ensures both parties meet their obligations before any assets are exchanged. Escrow is enforced on-chain and aligns with deterministic settlement logic.


Settlement Overview

Once the deal reaches commit state, the escrow process begins.

A complete settlement consists of:

  1. Seller deposit

  2. Buyer deposit

  3. Escrow contract validation

  4. Atomic settlement

  5. Immediate releases to both parties

The War Room enforces strict ordering to prevent partial fulfillment.


Step 1 — Seller Deposit

The seller deposits the specified token amount into escrow. The escrow contract validates:

  • Correct token

  • Correct amount

  • Confirmation from seller wallet

If the seller deposit is incomplete or incorrect, the buyer cannot deposit.


Step 2 — Buyer Deposit

Once the seller deposit succeeds:

  • Buyer deposits the required payment asset

  • Contract verifies amount

  • Contract confirms payment token (SOL/ETH or ERC20/SPL20 if applicable)

Incomplete deposits halt the settlement.


Step 3 — Validation Phase

After both deposits:

The escrow contract checks:

Validation Rule
Description

Token correctness

Seller’s asset matches trade token

Amount correctness

Deposited amounts match deal

Wallet validation

Wallets match assigned roles

Double deposit prevention

Ensures no duplicate escrow

Only when all checks pass does settlement begin.


Step 4 — Automatic Settlement

If validation succeeds:

  • Seller receives buyer’s asset

  • Buyer receives seller’s asset

  • Settlement executes atomically

  • Fees and partner rebates are applied automatically

This step cannot be reversed.


Step 5 — Release

Funds are released instantly:

  • Seller receives payment (minus platform fee and referral rebates)

  • Buyer receives tokens

  • Partner (broker) receives 50% of platform fee

The deal becomes settled, and no further changes are allowed.


Failure Handling

If either side does NOT complete their deposit:

  • Depositor is refunded

  • Deal returns to a non-settled state

  • Broker is notified via dashboard

If both deposits fail, the deal remains open with no asset movement.


Screenshot

📸 ![Escrow Flow](../images/warroom-escrow.png)

Last updated