Docs · Start
Overview
What Mesa is, what it keeps sealed, what it makes public, and where to start.
Mesa is spot trading, lending, perps and earn vaults on Solana, held in one private account. Every balance, order, share and position in that account is a sealed note in the Solana Privacy Rings pool. Prices, totals and each action's terms after its batch closes are public. Who acted, and what any account holds, is not.
One account, four markets
You deposit an asset from your Privacy Rings private balance into Mesa. From then on you act from your Mesa account, and no instruction you send carries your address until you withdraw.
| Market | What you do there | What you hold |
|---|---|---|
| Trade | Buy and sell spot in batches that clear at one price | Balances |
| Lend | Supply an asset to its pool, or borrow against collateral | Shares, positions |
| Perps | Open a long or a short against the perps vault at the oracle price | Positions |
| Earn | Provide liquidity to a market's vault, a lending pool or the perps vault | Shares |
Only you can read what you hold. Your browser or your script fetches Mesa's notes from the chain and decrypts the ones your keys open.
The batch
Time on Mesa is cut into batches of one fixed length. An order, a supply, a borrow or a perp goes into the current batch sealed: its terms are encrypted to a timelock round that is published when the batch closes, so nobody can read them before then, and anybody can after.
When the batch closes, every action in it opens at once. Each spot market clears at a single price, each pool and perp market nets the batch into one change of its totals, and each action settles to an owner the chain cannot name.
1Place
An action locks its funds in a note and seals its terms to the batch’s close.
2Open
Buy 12.5limit 182.60Sell 4.0limit 182.10Buy 30.0limit 182.45Sell 18.2limit 182.90Sell 7.1limit 182.30Buy 2.4limit 181.95When the timelock round is out, every action in the batch opens at once.
3Clear
Buy 12.5at 182.40Sell 4.0at 182.40Buy 30.0at 182.40Sell 18.2not filledSell 7.1at 182.40Buy 2.4not filledOne price per market, the one that matches the most volume.
4Settle
fill → ownerfill → ownerfill → ownerback → ownerfill → ownerback → ownerEach action pays out to its owner’s commitment. The owner can be offline.
The public record of a batch holds each market's clearing price, the opened actions without owners, and the change in each pool's totals. It is at /batches, and Read a batch goes through one field by field.
What is sealed and what is public
| Sealed | Public |
|---|---|
| Who placed an order, and the order itself until its batch closes | Each batch's clearing price per market and its matched volume |
| Every balance and every share | Each pool's totals, rates and indexes |
| A position's owner and collateral, for as long as it keeps renewing | Open interest and funding per perp market |
| Which account a fill, a loan or a payout went to | Every opened action's terms, after its batch closes |
What the chain shows lists it for each action.
Three ways to reach it
- The app at mesa.markets. Connect a wallet, deposit, and place an order. Start with your first sealed trade.
- The SDK, in TypeScript, with one call per action. Start with trade from code.
- The HTTP API, which serves markets, pools, batches and encrypted notes, and relays transactions. See the HTTP API reference.