Skip to main content
The escrow holds every depositor’s USDC in one contract, with a balance record per depositor. Unlocked USDC is the depositor’s to withdraw at any time. Locked USDC belongs to one open order and moves only when the orchestrator says so.

State

Functions

Guarantees

  • Solvency. A lock succeeds only when amount ≤ total_deposited − locked. Across all depositors, Σ locked ≤ Σ total_deposited ≤ USDC balance of the escrow.
  • Full release only. release always pays the whole lock, so no remainder can be stranded.
  • Stable terms. Rail terms cannot change while the depositor has any open lock. A taker who paid the shown account can always settle.
  • Withdraw is unilateral. withdraw needs only the depositor’s signature. No Pesa key is involved.

Sell orders

A sell is a deposit by the user. The user sets rail terms with their own payee hash and names the LP in set_allowed_takers. The LP then opens the order as the taker.