Trading

Buy or sell a token with the account's balance; each swap is one transaction, made by the pool.

A private swap

  1. Choose the token and amount and get a quote: the route, the least you accept, the protocol fee and the relayer fee.
  2. The browser builds a proof that the input note and the ledger belong to the account, that the change is right, that the new note will carry its SOL cost, and that the swap's record will wait in the ledger.
  3. The relayer sends it. No wallet of yours signs or appears.
  4. On chain, the program checks the proof, draws the input from its vault, routes it through Jupiter, enforces the minimum, takes its fee on the SOL side, and writes the new note and the record from what the swap really returned.

Proof, pool accounts and route travel in a single transaction. The proof is 256 bytes and verifies in 78,293–108,762 compute units through Solana's alt_bn128 syscalls, so no stopover wallet is needed.

Atomic by construction

  • A swap lands whole or reverts whole: below the minimum out, no note is spent.
  • A quote carries its expiry, and a fresh one is taken before proving.
  • The fee and the outputs are fixed inside the proof; whichever relayer sends it, they come out the same.