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.

MarketWhat you do thereWhat you hold
TradeBuy and sell spot in batches that clear at one priceBalances
LendSupply an asset to its pool, or borrow against collateralShares, positions
PerpsOpen a long or a short against the perps vault at the oracle pricePositions
EarnProvide liquidity to a market's vault, a lending pool or the perps vaultShares

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.

  1. 1Place

    An action locks its funds in a note and seals its terms to the batch’s close.

  2. 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.95

    When the timelock round is out, every action in the batch opens at once.

  3. 3Clear

    Buy 12.5at 182.40Sell 4.0at 182.40Buy 30.0at 182.40Sell 18.2not filledSell 7.1at 182.40Buy 2.4not filled

    One price per market, the one that matches the most volume.

  4. 4Settle

    fill → ownerfill → ownerfill → ownerback → ownerfill → ownerback → owner

    Each action pays out to its owner’s commitment. The owner can be offline.

The four steps of a batch: place, open, clear, settle.

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

SealedPublic
Who placed an order, and the order itself until its batch closesEach batch's clearing price per market and its matched volume
Every balance and every shareEach pool's totals, rates and indexes
A position's owner and collateral, for as long as it keeps renewingOpen interest and funding per perp market
Which account a fill, a loan or a payout went toEvery opened action's terms, after its batch closes

What the chain shows lists it for each action.

Three ways to reach it

Where to go next