Launch App · About · Docs · Whitepaper · TypeScript SDK
Program ID MNFSTqtC93rEfYHB6hF82sKdZpUDFWkViLByLd1k1Ms
-------------------------------------------------------------------------------------------------------- | 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`