Hadal
Start trading
  • OverviewStart
  • QuickstartStart
  • What is sealed and what is seenStart
  • Sealed balancesConcepts
  • Sealed ordersConcepts
  • The book and the pool's midConcepts
  • DealsConcepts
  • SoundingsConcepts
Reference

Limits and measured figures

Units, integer ranges, the book's size, the windows of orders, markets and computations, supported mints and the figures measured for each computation.

Every fixed size and window of Hadal, and what a computation was measured to take and cost. Other pages link here instead of repeating a number.

Units

QuantityTypeUnit
Amountu64Atoms: the smallest unit of a token, 10^-decimals of one whole token. A market records each mint's decimals in base_decimals and quote_decimals.
Price, limitu64Quote atoms per base atom, times 2^32.
Sharesu64Units of a pool's liquidity. A pool opens with twice its first quote atoms in shares.
Fee rateu16Basis points: 1 is 0.01%.
Volumeu64Crossed and swept volume are in quote atoms.
Expiry of an order or a deali64Unix seconds, UTC.
Intervals and windowsu64Solana slots, except the resting time of a dark order, which is in seconds.

A price is a fixed-point number with 32 fractional bits. To price quoteAtoms for baseAtoms:

text
price = floor(quoteAtoms * 2^32 / baseAtoms)

The SDK's priceOf(quote, base) computes it from two bigint atom counts. Because a price is in atoms, it carries both tokens' decimals: one whole base token priced at p whole quote tokens is p * 10^quote_decimals quote atoms for 10^base_decimals base atoms.

To read a price back as whole quote tokens per whole base token, divide it by 2^32 and multiply by 10^(base_decimals - quote_decimals).

Integer ranges

ValueRangeMeaning
Amount, shares0 to 2^64 - 1Every balance, reserve, size, lock and volume is a u64 of atoms. Products are taken in 128 bits inside the circuits, and an action whose amounts would not fit a u64 is void: nothing wraps.
Price2^-32 to 2^32 - 2^-32A u64 with 32 fractional bits, in quote atoms per base atom. A limit of 0 makes an order or a deal void.
Size1 to 2^64 - 1A size of 0 makes an order or a deal void.
Deposit, withdrawal1 to 2^64 - 1An amount of 0 is refused with InvalidAmount.
Attempts per taker1 to 255A u8. 0 in open_deal takes the default.
Protocol share0 to 10000Basis points of the sweep fee.
Deal id0 to 2^64 - 1Chosen by the maker, unique among the maker's deals.

A buy whose lock, size at limit plus the fee, would exceed 2^64 - 1 quote atoms is void. So is a deal answer or a liquidity change whose quote amount or share count would. The receipt of a void action has ok 0: see Circuits.

Book slots

A market's book holds 6 resting orders. A dark order takes a slot only when something of it is left to rest after it has crossed, and keeps the slot until it is cancelled. A dark order that crosses in full takes none. A dark order that reaches the head of the queue while all six slots are taken is closed and returned without a computation: its sealed balance is untouched, and the program emits OrderReturned with reason 0. Swaps take no slot.

Six slots and a ledger are what one callback transaction carries: see Callback sizes.

Resting time of a dark order

A dark order must be placed with an expiry, in the future and at most 86,400 seconds (one day) ahead. place_order refuses any other expiry with InvalidExpiry. Once the expiry has passed, any wallet can cancel the resting order with cancel_order, which returns what it has locked and its proceeds to its owner's sealed balance and frees the slot. A slot is therefore held for a day at the longest before anyone can free it.

A swap's expiry is optional: 0 for none, or a future time with no upper bound. Any order, swap or dark, that is still pending when its expiry passes is closed without being run when it reaches the head of the queue (OrderReturned with reason 2).

Orders per computation

One computation runs 1 order against the whole book. A market's orders are processed one at a time in the order they were placed, and no other computation runs on the market's book meanwhile: see One computation at a time.

A wallet has one sealed balance per market, and one computation at a time runs on it. A second action on the same balance is refused with Busy until the first one's callback lands. An order that reaches the head of the queue while its owner's balance is busy with another computation is closed and returned without being run (OrderReturned with reason 3), so it does not hold the orders behind it.

Market claim window

A market's creator funds it and opens its pool. A market that still holds no first liquidity 18,000 slots (about an hour) after it was created can be claimed: any wallet that then sends fund_market becomes the market's creator, and opens the pool with open_pool. Before that, and at any time once the market holds funds, another wallet's fund_market is refused with NotOwner. open_pool is always the creator's. A pair of mints therefore cannot be held unfunded.

First price range

fund_market sets the market's first price from the two amounts in the vaults:

text
first_price = floor(seed_quote * 2^32 / seed_base)

It must be greater than 0 and at most 2^64 - 1: the first liquidity must hold less than 2^32 quote atoms per base atom, and at least 2^-32. Otherwise the instruction fails with PriceOutOfRange and nothing moves.

Measured figures

Measured on 2026-11-18 (UTC) on a local Arcium cluster of two nodes, with Arcium 0.16.0, Solana 3.1.10 and Anchor 1.0.2, by running every flow of the SDK end to end. These are that cluster's figures, per circuit.

CircuitRunsQueue to callback, medianComputation feePayer's cost, median
init_market12,982 ms10,000 lamports4,852,160 lamports
deposit23,494 ms10,000 lamports4,622,520 lamports
withdraw22,995 ms10,000 lamports5,757,000 lamports
process_order63,003 ms10,000 lamports6,501,760 lamports
settle_slot33,492 ms10,000 lamports5,374,200 lamports
add_liquidity12,992 ms10,000 lamports6,675,720 lamports
remove_liquidity13,498 ms10,000 lamports6,439,080 lamports
open_deal23,497 ms10,000 lamports10,907,400 lamports
take_deal23,506 ms10,000 lamports8,151,240 lamports
settle_deal22,985 ms10,000 lamports5,763,968 lamports
sound13,408 ms10,000 lamports4,232,768 lamports
ColumnMeaning
Queue to callbackFrom the transaction that queues the computation to the callback that writes its result. Every circuit landed in 3.0 to 3.5 seconds.
Computation feeWhat the computation added to Arcium's fee pool, at that cluster's price.
Payer's costEverything the sending wallet's SOL balance fell by: the transaction fee, the computation fee, the rent of the computation account, and the rent of any account the instruction creates (a deal for open_deal, an attempts account for a taker's first take_deal).

The weight of each circuit is in Circuits.

Computation expiry and release

A queued computation that the cluster does not start within 180 slots expires. That window is Arcium's. An expired computation has no callback, so nothing it would have written is written.

The program lets the accounts of such a computation be released once the current slot is more than 200 slots after the slot it was queued in. Before that, a release is refused with ComputationStillLive. The release instructions and what to send after each kind of expired computation are in Release instructions. A deposit that was waiting on an expired computation is refunded to its owner by reclaim, and a deal whose opening expired becomes void in release_deal.

Callback sizes

A callback must fit one Solana transaction of 1,232 bytes together with its accounts and signatures. The callbacks measured from 782 bytes (deposit, one ledger) to 1,217 bytes (process_order, settle_slot and settle_deal, a book and a ledger). The book's size of six slots follows from this.

Sealed valueCiphertextsBytes
Book11352
Ledger4128
Deal's escrow396
Order's terms5160
Deal's maker terms5160
Deal answer4128
Liquidity amounts4128
Shares to remove396

The last five are inputs a wallet seals. Each ends with the two ciphertexts of the sender's address: see Circuits.

Supported mints

A market takes SPL Token mints, and Token-2022 mints that carry none of the extensions below.

create_market checks each of the two mints. A mint owned by the SPL Token program passes. A Token-2022 mint is refused with UnsupportedMint when its extensions include any of these:

ExtensionWhat it would do to a vault
TransferFeeConfigTake a fee out of every transfer, so the vault would receive less than the sealed balance records.
TransferHookRun another program on every transfer.
PermanentDelegateLet a delegate move tokens out of the vault.
DefaultAccountStateCreate token accounts frozen by default.
PausableLet the mint pause transfers, payouts included.

The two mints must differ (SameMint). A pair of mints has one market for each choice of base and quote.

Deal attempts

Each taker gets 3 attempts on a deal unless the maker sets another number, from 1 to 255, when opening it. Attempts are counted per taker and per deal. An attempt is used when the answer's transaction lands, whether or not the answer trades. The answer after the last attempt is refused with OutOfAttempts.

Soundings

A market can be sounded once the sounding interval has passed since its last sounding; earlier, sound is refused with TooEarly. The interval is told in Soundings.

API limits

The HTTP API's page size, request body size, write rate and stream queue are in HTTP API.