Pair Docs

How a cross-chain pair works

One buy and one sell on a cross-chain pair, followed through the reserve, the price feed and the pool.

Buyer's walletPays SOLon SolanaSOLCoin reserveHolds the SOL,one reserve per coinPair side, priced liveSOL value at the signedhome-chain priceCOIN / pair poolSends COINto the buyerPrice feedSigned, checked every tradeAll in one Solana transaction
Buyer's walletPays SOL on SolanaCoin reserveHolds the SOL, one reserve per coinPair side, priced liveSOL value at the signed home-chainprice from the price feedCOIN / pair poolSends COIN to the buyerSOL

A buy

  1. The buyer signs one Solana transaction that pays SOL. The transaction carries a recent signed price of the pair coin, for example PEPE, from its home chain.
  2. The Pair program checks the price signature and its age. A price older than the allowed window is rejected and the trade does not happen.
  3. The SOL, minus fees, goes into the coin's reserve. The program credits the pool's pair side with the same value in PEPE units at the checked price.
  4. The pool sends the buyer the coin for those PEPE units, at the pool's price.

A sell

  1. The seller signs one Solana transaction that sends the coin, with a fresh signed PEPE price.
  2. The pool takes the coin and releases PEPE units at the pool's price.
  3. The program values those units in SOL at the checked price and pays the SOL, minus fees, from the coin's reserve.

Why the price follows the home chain

The pool prices the coin in PEPE units. Every trade converts between SOL and PEPE units at PEPE's live price. So when PEPE doubles on Ethereum while nobody trades your coin, your coin's price in PEPE stays the same and its price in SOL doubles. That is the same thing that happens to a coin paired with PEPE on Ethereum.

Where the pair side lives

The PEPE units exist only as the pool's internal balance. They are created inside a buy and removed inside a sell, so they never reach a wallet and never trade on another market. Nothing is bridged and nothing is wrapped: the only link to Ethereum is the signed price.

What pays when the pair coin rises

When PEPE rises, the PEPE units in the pool are worth more SOL, and sellers are paid that higher value from the reserve. The reserve holds the SOL buyers paid in, plus the pair fee collected on every trade. The coin reserve explains how it is sized and what happens when it runs low.