DocsReference

Smart contract

Addresses, roles and properties of the escrow program.

Network
Solana mainnet
Framework
Anchor, written in Rust
Assets
Native SOL and SPL tokens (USDC, USDT), including Token-2022 mints
Fee
0%, recorded per trade, capped at 10% by the program

Accounts#

AccountDerived fromHolds
Config["config"]Moderator, relayer, fee and pause switch
Offer["offer", seller, offer_id]The seller's available and reserved amounts, limits and asset; SOL is held in this account
VaultAssociated token account of the offerThe tokens of a USDC or USDT offer
Trade["trade", offer, trade_id]Buyer, amount, status and payment deadline

Properties#

  • Reserved funds never leave the offer until the trade is settled, so an offer always holds everything it promises.
  • A seller can't trade with themselves, and amounts outside the offer's limits are refused.
  • Settling a trade emits an on-chain event that the site reads to update the trade, so trade status never depends on what a browser reports.
  • The program can be paused for new offers and trades; existing funds can still be withdrawn and settled.
  • The program is upgradeable by its upgrade authority, held by Peerlock.

Something unclear? Ask us on X.