Manifest

The Spot CLOB on Solana.

Launch App · About · Docs · Whitepaper · TypeScript SDK

codecov Code Review - Rust Code Review - Typescript

Program ID  MNFSTqtC93rEfYHB6hF82sKdZpUDFWkViLByLd1k1Ms

Manifest is a permissionless, formally verified central limit orderbook on Solana with zero maker and taker fees. Funds stay in program-owned vaults and settle on-chain, the full orderbook lives in a single account that any program can read or CPI into, and anyone can list a market by supplying the two mints. The core program has been live on mainnet since September 2024 and has settled roughly $50B in cumulative volume as of December 2026. | | | |--|--| | Venue | Central limit orderbook | | Network | Solana mainnet | | Trading fees | 0.00% maker / taker | | Orders | Limit · Global · Reverse | | Market listing | Permissionless, account rent only | | Custody | Non-custodial · On-chain settlement | | Security | Formally verified (Certora, Harmonic Aristotle) · STRIDE reviewed | | Source | Open source · GPL-3.0 | ## Program IDs | Program | Mainnet address | |--|--| | Manifest (core) | [`MNFSTqtC93rEfYHB6hF82sKdZpUDFWkViLByLd1k1Ms`](https://solscan.io/account/MNFSTqtC93rEfYHB6hF82sKdZpUDFWkViLByLd1k1Ms) | | Wrapper | [`wMNFSTkir3HgyZTsB7uqu3i7FA73grFCptPXgrZjksL`](https://solscan.io/account/wMNFSTkir3HgyZTsB7uqu3i7FA73grFCptPXgrZjksL) | ## Whitepaper Read [The Orderbook Manifesto](https://manifest.trade/whitepaper.pdf). ## Comparison | | Openbook | Phoenix |Manifest | |--|----------------|-------------------|----------------------| | Crankless |No |Yes |Yes | | Feeless |No |No |Yes| | Atomic lot sizes |No |No |Yes| | Anchor |Yes |No|No| | Creation Rent|2 SOL |3+ SOL |.007 SOL| | License|GPL |Business |GPL| | Read optimized| Yes | No | Yes | | Swap accounts| 16 | 8 | 8 | | [CU](https://bonasa-tech.github.io/manifest/dev/bench/) | ✅ | ✅ | ✅ ✅ | | Token 22 | No | No | Yes | | Composable wrapper | No | No | Yes | | Capital Efficient | No | No | Yes | ### Details - Cranks were originally used in Serum because Solana programs had to identify every account before landing on chain. They are unnecessary once an orderbook packs all of its state into one predictable account. - No trading fees, permanently. - Lot sizes restrict expressible prices, which matters for order flow from routers that trade non-standard sizes. Manifest reduces the minimum trade size to one atom and widens the range of expressible prices to cover everything that is needed. - Anchor is a good starting point on Solana, but a program on the hot path of every trade should not pay its compute overhead. - Low creation rent means smaller tokens with less volume can still have an orderbook. - Licensed GPL-3.0. - The number of accounts in a swap is a limiting factor for some routers. Swaps that do not touch global orders use the theoretical minimum number of accounts. - CU is a major cost for market makers. [Benchmarks](https://bonasa-tech.github.io/manifest/dev/bench/) run on every change to main and show lower CU, especially at higher percentiles. - Token-2022 mints and extensions are supported. The extra cost of Token-2022 is only paid when a Token-2022 mint is actually being moved. - The core vs. wrapper split lets traders and exchange interfaces add their own features and distribution without changing the orderbook. - Global orders let one balance back quotes on many markets at once. ## Design Overview ### Data Structure All market state lives in a single account built on the [`hypertree`](https://github.com/Bonasa-Tech/manifest/tree/main/lib) library. Every node in the market, whether a resting order, a claimed seat or a free block, is the same size (80 bytes), so independent data structures can interleave in one byte array without being sized up front. The account begins with a 256-byte fixed header holding the market's static data (base and quote mints, vaults, tree roots, sequence number, and so on). Everything variable, meaning resting orders and claimed seats, lives in the dynamic region after the header. Three red-black trees (bids, asks, claimed seats) and one linked list (free blocks) share that region. Each vertex and its adjacency list fit in one 80-byte block, so any block can hold any node type.
--------------------------------------------------------------------------------------------------------
|                   Header                    |                               Dynamic                   |
--------------------------------------------------------------------------------------------------------
| BaseMint, QuoteMint, BidsRootIndex, ...     | Bid | Ask | FreeListNode | Seat | Seat | Bid | Bid | Ask|
--------------------------------------------------------------------------------------------------------
### Account Growth and Compute Markets are not allocated at a fixed maximum size. A new market account is only the header plus one free block, and the program keeps the invariant that at least one free block is always available. When an instruction consumes the last free block (`ClaimSeat`, `BatchUpdate`, or a `Swap` that rests a reverse order), it reallocates the account by another 80 bytes in the same instruction and charges the rent to the payer that needed the space. `Expand` exists separately for when the rent payer is not the transaction signer. Blocks freed by cancelled or filled orders go back on the free list and are reused before the account grows again. The result is that rent scales with what a market actually uses, and integrators never have to preallocate space or send separate instructions to grow a market. The program is written without Anchor and with zero-copy access to the account, and CU per instruction is [benchmarked in CI](https://bonasa-tech.github.io/manifest/dev/bench/) on every change to main. ### Core vs Wrapper Manifest implements the orderbook as an infrastructure-layer primitive. Other orderbooks get bogged down by special feature requests from trading teams that make the program bloated and hard to reason about. Manifest only includes what has to live in the base layer; anything that can be handled higher up the stack is left out of the core program. Keeping the core this small is what makes formal verification of the program feasible. Traders and interfaces should interact with Manifest through a wrapper program. Features like ClientOrderId, FillOrKill, PostOnlySlide, and adjusting orders for insufficient funds belong in a separate program that CPIs into Manifest. A reference wrapper is deployed at `wMNFSTkir3HgyZTsB7uqu3i7FA73grFCptPXgrZjksL` and its source is in [programs/wrapper](programs/wrapper). ### Global Orders When resting orders across many markets, the cost of capital adds up. A global order does not lock tokens on the market it rests on. Its backing sits in a per-mint global account shared by every market that trades that mint, and the tokens are moved into the market just in time, when the order is filled. The same balance can back quotes on many markets at once. ### Reverse Orders Reverse orders replicate the replenishment behaviour of an AMM using limit orders. When a reverse order is filled, it flips to the opposite side at a configured spread, using the full proceeds of the fill: a filled buy becomes a sell, and a filled sell becomes a buy. A ladder of reverse orders can reproduce a concentrated-liquidity AMM position, with explicit control over price range, spread and size at each level. Because filled orders replace themselves, liquidity providers do not pay to re-post after every fill. ### Building The workspace pins the SBF compiler through `workspace.metadata.solana` in `Cargo.toml`, so both `cargo build-sbf` and `cargo test-sbf` use the same platform-tools version as CI and the CU benchmark. ``` cargo build-sbf ``` ## Testing ### Program Test ``` cargo test-sbf ``` ### Typescript client test ``` sh local-validator-test.sh ``` ## Security Manifest's core program has been formally verified twice, with two independent tools, and has completed the Solana Foundation's STRIDE review. Beyond showing that funds cannot be lost, the proofs show that valid operations such as cancelling and withdrawing always succeed, so trading cannot be bricked. ### Certora Prover [Report](https://www.manifest.trade/audit.pdf) (Nov 2024). 18 rules across four groups: | Group | Scope | Rules | |--|--|--| | No loss of funds | deposit, withdraw, place_order, swap, cancel, rest | 7 | | Instruction integrity | deposit, withdraw, batch_update, cancel | 4 | | Matching engine | order matching correctness | 1 | | Orderbook structure | red-black tree vs. reference implementation | 6 | The core invariant is that each market vault covers every seat balance plus everything reserved by resting orders, for both base and quote, with a separate invariant for the global vaults. [Certora_README](Certora_README.md) describes exactly what is verified and how to run it. The specs are in [programs/manifest/src/certora](programs/manifest/src/certora); some code is only compiled under the `certora` feature so that invariants can be checked at intermediate steps, not just at the end of an instruction. The prover runs in CI on every push to main and on pull requests that touch the core program. ### Harmonic Aristotle (Lean) [Case study](https://www.harmonic.fun/aristotle/case-studies/manifest/). The latest run proved 39 properties against the unmodified Rust source at commit [`014add1`](https://github.com/Bonasa-Tech/manifest/commit/014add1f00ac3a49dfdd2a838b8617546ff05c31), covering: - Trading progress: swaps complete given liquidity, funding and in-range amounts. - Error classification: every swap error traces to request limits or the token program. - Orderbook integrity: red-black tree storage, insert, remove and search; bid arithmetic bounds. - Custody and recovery: balances stay backed, refunds cannot be repeated, cancel and withdraw always recover funds. - Cancellation authorization: hints are checked against the stored trader and sequence number. - Matching: price, quantity, expiration and order-policy rules. - Reverse orders: fit integer ranges and charge only the funded addition. - Quotes and rounding: quotes match execution, respect budgets and stop at the target. ### STRIDE Manifest completed [STRIDE](https://stride.asymmetric.re/), the Solana Foundation's security review program run with Asymmetric Research, in Aug 2026. ### Verifiable Builds The deployed program is built reproducibly from this repository with `solana-verify` (see [ci-verifiable-build.yml](.github/workflows/ci-verifiable-build.yml)), so anyone can check that the on-chain bytecode matches the public source. [Verified build on Solscan](https://solscan.io/account/MNFSTqtC93rEfYHB6hF82sKdZpUDFWkViLByLd1k1Ms). ### Upgrade Authority The upgrade authority of the core program (`MNFSTqtC93rEfYHB6hF82sKdZpUDFWkViLByLd1k1Ms`) is a [Squads multisig](https://app.squads.so/squads/CDFU8tEWsVU2ZMiek57Sgk3Huha2yBNcSHLAts3V3Cbf/home) with a threshold of 4 of 5 signers. ## Resources - [Documentation](https://bonasa-tech.github.io/manifest) - [TypeScript SDK](https://www.npmjs.com/package/@bonasa-tech/manifest-sdk) (`@bonasa-tech/manifest-sdk`) - AI skill for agent workflows: [skills/manifest/SKILL.md](skills/manifest/SKILL.md) - [X](https://x.com/ManifestTrade) · [Telegram](https://t.me/manifest_trade) · [Linktree](https://linktr.ee/ManifestTrade) ### Tip Jar `B6dmr2UAn2wgjdm3T4N1Vjd8oPYRRTguByW7AEngkeL6`