Start

Concepts

Each word Una uses, defined once, with the figure that governs it.

Other pages link here for a term. Each heading is one term.

Batch

One clearing of the whole market. A batch has a number, a window in slots, an input hash, and after clearing a price vector, a solver, a locked bond and a proof deadline. It is always in one status:

StatusMeaning
OpenOrders and liquidity changes are being placed.
SealedThe input is fixed. A solver is clearing it.
ClearedPrices are posted and the bond is locked. Orders settle from here.
ProvenThe proof verified on chain. The bond is released.
SlashedNo proof landed in the window. The bond moved to the batch’s cover.
RolledNo solver cleared it in time. As each order settles it carries into the next batch, or returns to its owner if it has expired.

Every batch has a page at /batches/[id].

A batch's account is created by the seal that opens it and removed by close_batch. Anyone may send close_batch once the batch is Proven or Rolled and every order in it has been settled or cancelled. The account's rent returns to the wallet that paid it, the sender of that seal, and the keeper closes batches as they finish. A Slashed batch keeps its account, which cover claims read.

A closed batch has no account to read from the chain. The API keeps its record: GET /v1/batches/{id}, GET /v1/batches/{id}/input and GET /v1/batches/{id}/state answer for it as they did before the close.

Batch window

The slots a batch collects orders for before it can be sealed. The default is 10 slots, 2 seconds at 200 ms a slot. The window starts when the batch opens. A batch with no orders is not sealed when its window passes. It stays open, and the first order placed in it after that starts the window again from that order's slot. A remainder that settle_order moves into the batch does not start a window. One batch is open at a time, and the next opens when it seals.

Input

Everything placed in a batch during its window, kept as a running SHA-256 hash. Placing an order folds a record into the hash, and so does cancelling one. The hash after the last record is the batch's input hash. A solver clears exactly that input, and the proof commits to it.

Seal

The end of the window. Anyone may send seal_batch once the window has passed and an order has entered the batch. A batch no order has entered is refused with BatchEmpty. The seal fixes the input hash and opens the next batch, and its sender pays the rent of the next batch's account. A sealed batch holds its orders until it clears or rolls, and a cancel sent in that time waits for it.

Order

Sell an amount of one token for another, at a limit or better, until an expiry batch. Tokens are any two listed tokens. There is no fixed quote token. The smallest order sells 0.0001 SOL of value, 100,000 lamports at the sell token's last proven price.

Limit

The least an order accepts: atoms of the buy token per atom of the sell token. An order never fills below its limit.

Clearing

The result a solver posts for a sealed batch: a price vector, the fill fractions for rationed orders, and the clearing fee per token. A clearing is valid when it meets the four conditions.

Price vector

One price for each token in the batch. A price is lamports per atom of the token, so wSOL's price is always 1. Prices are in SOL because the bond that stands behind them is in SOL.

Cleared price

The rate a batch gives one direction of trade: the sell token's price divided by the buy token's price. Every order in the batch in that direction gets it.

Last proven price

A token's price in the most recent proven batch that priced it. Only a verified proof changes it. The app prefills an order's limit from it.

Band

How far a batch may price a token from its last proven price, up or down, set in basis points in the program's configuration. The program refuses a clearing with a price outside the band. wSOL's price is fixed and has no band. The setting is on Parameters.

Fill

What an order trades in a batch. An order priced better than its limit fills in full. An order exactly at its limit, or one held back by the band, fills by its direction's fill fraction. An order priced worse than its limit does not fill. How fills are decided has the arithmetic.

Position

Liquidity on one pair over a price range. A position trades only in a batch's clearing, at the cleared price.

Range

The two prices a position's liquidity sits between. While the pair's price is inside the range the position is in range and earns the pair's liquidity fee on what trades against it.

Solver

An operator registered with the program, with stake behind it, running the node that clears and proves batches. Any solver with enough free bond may clear a sealed batch, and the first clearing the program accepts is the batch's clearing. Sealed batches are cleared in order, oldest first.

Stake

A deposit of SOL or a listed liquid staking token behind one solver. A liquid staking token is valued in SOL at its stake pool's own rate. A stake is a share of that solver's bond and earns a share of its clearing fees.

Bond

A solver's stake, valued in lamports, as the program counts it: locked behind a cleared batch, in cooldown, or free. Clearing a batch locks free bond equal to the batch's value moved. The proof releases it.

Value moved

What the program measures a clearing to be worth, in lamports, at the posted prices: everything the batch's orders offer plus everything its pairs pay out. The bond invariant has the formula.

Proof

A Groth16 proof from the SP1 zkVM that the guest program ran on this batch's input and accepted this clearing. prove_batch verifies it on chain, and anyone holding the proof may send it. It is 260 bytes.

Proof window

The slots a solver has, after clearing, to land the proof. The default is 300 slots, about 60 seconds. It is also how long a stake that backs a batch is locked behind it.

Slash

What happens to a cleared batch whose proof window passes with no verified proof. Anyone sends slash_batch. The locked bond moves to the batch's cover and the batch's status becomes Slashed.

Cover

The account that holds a slashed batch's bond, in the tokens it was staked in. The owners of the batch's orders and of the positions on its pairs each claim a share with claim_cover. See Slashing and cover.

Roll

What happens to a sealed batch that no solver clears within the clearing timeout. Anyone sends roll_batch. Each of its orders keeps its whole sell amount and, when it is settled, moves into the batch open at that moment. It returns to its owner instead if its expiry batch has passed or it is worth less than the smallest order.

Cooldown

The wait between requesting an unstake and withdrawing it: one proof window.

Commission

The part of a solver's clearing fees the operator keeps. The rest goes to its stakers. Each solver sets its own, and it is shown on the solver's page.