Start
Overview
Offbook is an over-the-counter desk for Solana tokens: two wallets trade an exact amount at an exact price, with an on-chain program in the middle instead of a pool.
The problem it solves
Selling a large position through a swap means selling into a pool. Each unit sold moves the price for the next one, so a big order fills at a worse average price than the one on the screen, and bots that see it coming can trade in front of it. Buying size has the same problem the other way round.
OTC trading avoids that by matching a buyer and a seller directly. Off chain, that usually means trusting a broker or the other side to deliver. Offbook keeps the direct match and removes the trust: the escrow program holds the maker's tokens and releases them only against the agreed payment, in one transaction.
In one paragraph
A maker posts an order: "I give exactly X of token A and want exactly Y of token B". Token A moves into the escrow. A taker who accepts pays token B, and in the same transaction receives token A while the maker receives token B. Nothing touches a pool, so there is no price impact and no slippage. The maker can cancel at any time and get everything back. A fee of 0.375 % comes off each side; two thirds of all fees buy $OFF and burn it.
Where to go next
Start
How it works
One trade from start to finish: Maya sells 2,000,000 tokens to Ravi for 400 SOL.
1. Post
Maya opens the desk and makes an order: 2,000,000 tokens out, 400 SOL in. She allows slices of at least 250,000 tokens and sets the order to expire in three days. She signs one transaction; her 2,000,000 tokens move into the escrow account of her new order.
2. Share
Her order is public, so it appears on the book with its code (for example OB-7K2D) and its distance from the market price. Had she made it private, it would stay off the book and she would send Ravi its link.
3. Fill
Ravi takes 500,000 tokens. The program works out his payment: 400 × 500,000 / 2,000,000 = 100 SOL. In one transaction it sends Ravi 498,125 tokens (500,000 minus the 0.375 % fee), sends Maya 99.625 SOL (100 minus the 0.375 % fee), and sends both fees to the fee wallet. 1,500,000 tokens stay in the order for the next taker.
4. Finish
Another taker fills the remaining 1,500,000 and pays the remaining 300 SOL exactly; the order account closes and its rent goes back to Maya. If nobody had filled the rest within three days, the order would expire and the 1,500,000 tokens would go back to Maya.
5. Burn
The fees collected in the fee wallet are sold to SOL where needed; 66.67 % of that buys $OFF and burns it, 33.33 % goes to the desk treasury.
Trading
Making an order
Everything you set when you post, and what each setting does.
| Setting | What it does |
| You give | The token and the exact amount that moves into escrow. SOL or any SPL token; Token-2022 without risky extensions. |
| You want | The token and the exact amount you receive for the whole order. Together with "you give" this fixes your price. |
| Expiry | 60 seconds to 365 days, or none. After it, the order cannot be filled and what is left returns to you. |
| Private | Keeps the order off the public book. It opens only from its link. |
| Counterparty | One wallet address. The program refuses every other taker. |
| Slices | Lets takers fill part of the order. Set the smallest slice you accept; the last slice may be smaller, since it settles whatever is left. |
| Price guard | For public orders: how far from the live market the order may drift before it leaves the book (up to ±15 %). |
What you see before you sign
The desk prices both sides at the live market and shows the difference as "vs. market": positive when you ask more than you give is worth, negative when you offer a discount. It shows the fee you will pay on what you receive and the amount you net. The desk does not build a public order outside the ±15 % band.
Costs
Posting is free apart from Solana's network fee and the rent deposit of the order's accounts (a few thousandths of a SOL), which comes back to you when the order closes by fill, cancel or expiry.
Your orders
The desk lists your orders under Orders: Active (open, including ones the price guard took off the book), Expired (waiting for you to reclaim) and History (filled or cancelled). Cancel or reclaim from there in one click.
Trading
Filling an order
Taking an order from the book or from a link.
Whole orders
Press Fill on an order, check the two contract addresses and the amounts, and sign. You pay what the maker asks and receive what the maker gives, minus the 0.375 % fee on what you receive.
Slices
When the maker allows slices, enter how much of the given token you want, from the maker's minimum up to what is left. Your payment is the maker's price for that amount, rounded up to the token's smallest unit in the maker's favour. The fill dialog shows exactly what you pay, the fee and what you receive before you sign, and the transaction will never take more than that from you.
Locked orders
An order with a counterparty lock can be filled only by that wallet. Others see it, if they have the link, but the desk tells them it is reserved and the program would refuse them anyway.
After the fill
The fill shows on the order's page and on the public tape with its transaction hash. If you keep the desk open, it can send you a browser notification when an order of yours is filled.
Trading
Fees and burns
0.375 % from each side of every fill. Nothing to post, nothing to cancel.
| Who | Pays | Taken from |
| Maker | 0.375 % | What the maker receives |
| Taker | 0.375 % | What the taker receives |
| Both, per fill | 0.75 % | |
The rate is written into each order when it is posted. A later change to the rate applies only to new orders, and the program caps it at 1 % a side.
Where fees go
- 66.67 % buys $OFF on its market and burns it.
- 33.33 % goes to the desk treasury.
Fees arrive in the tokens of each fill. Fees paid in other tokens are sold to SOL first; then the split above applies.
Every burn
Each buyback and burn, with its transaction:
| When | SOL spent | $OFF burned | Transaction |
| Reading the burns… |
Protocol
The escrow program
A native Solana program. Four instructions move tokens; two more manage settings.
Program address: off1fA9AK3pAUXN5VLHxqXEenNjWsjmduB5tE8anRxt
Accounts
| Account | Address from | Holds |
| Config | ["config"] | Admin, fee wallet, fee rate per side (parts per million), paused flag |
| Order | ["order", maker, id (u64, little-endian)] | Maker, both mints, taker lock, the full terms, what is left, what has been paid, minimum slice, the fee rate at posting, flags (private, slices), expiry, creation time, fill count |
| Escrow | The order's associated token account for the given mint | The given tokens (SOL stays on the order account itself) |
Instructions
| Instruction | Signer | Effect |
| make | Maker | Creates the order and moves the given amount into escrow. Refused while paused. |
| take (amount, max payment, referrer) | Taker | Pays the maker, releases the given tokens, sends both fees, all at once. The last slice closes the order. Refused while paused, after expiry, or for a wallet other than the locked one. |
| cancel | Maker | Returns everything left and closes the order. Works while paused. |
| expire | Anyone | After expiry: returns everything left to the maker and closes the order. Works while paused. |
| init_config / set_config | Admin | Sets the fee wallet, the fee rate for new orders (at most 1 % a side) and the pause. |
The maths of a fill
For a fill of take units of the given token: the payment is the exact rest (amount_b − paid_b) when it takes everything left, otherwise ceil(amount_b × take / amount_a). The taker's fee is floor(take × fee / 1,000,000) of the given token; the maker's fee is floor(payment × fee / 1,000,000) of the payment token. The slices of an order always add up to its full terms.
Events
Every make, take, cancel and expire writes an event into the transaction's logs with the order, the wallets, the mints, the amounts, the fees, what is left, the referrer and the time. The desk's book is rebuilt from these events, so anyone can rebuild it the same way.
Protocol
$OFF
The desk's coin. The desk's fees buy it back and burn it.
| Supply | 1,000,000,000, minted on pump.fun |
| Presale | None: the whole supply starts on the bonding curve |
| Buyback + burn | 66.67 % of every desk fee |
| Contract address | $OFF · CA goes up at launch |
The more size moves through the desk, the more $OFF is bought and burned. Every burn is listed with its transaction on the fees page.
Rewards
Airdrop points
Points for size that settles on the desk, counted from the first fill.
Every fill earns points for both its maker and its taker, on the fill's dollar value at the time of the fill. Bigger fills earn more per dollar:
| Fill size | Points per $1 |
| Up to $100 | 0.25 |
| $100 to $5,000 | 1 |
| $5,000 to $50,000 | 1.5 |
| $50,000 to $500,000 | 2 |
| $500,000 to $1,000,000 | 2.5 |
| Over $1,000,000 | 3 |
Points run in seasons. Each season's pot of $OFF and its claim window show on the desk's Airdrop page once they are set; your share is your points over all points of the season. Your points, rank and the leaderboard are on the same page.
Rewards
Referrals
Bring flow to the desk and share in its fees.
Your referral link is on your Profile once you connect. A wallet that arrives through your link carries your address into every fill it makes through the desk: the program writes it into the fill's event on chain, so who referred whom is public and cannot be edited later.
Rewards are a share of the protocol fees on your referred wallets' fills, booked from the treasury third. Your Profile shows the wallets you referred, their volume, the fees they paid and your rewards.
Build
Public API
The same data the desk uses, as JSON, for your own dashboards and bots. Every path below is on this site's own address.
Amounts are decimal strings in the token's own units. A value that is not known is null. An empty list is an empty array.
| Path | Returns |
GET /api/stats | The program (address, live, paused, fee), open orders, fills and volume (24 h and all time), burned totals, the SOL price |
GET /api/book | Public orders. Query: status = active, all, expired, executed, cancelled · sort = newest, size, vs · q = a symbol, a mint or an order code · limit |
GET /api/order/<id or code> | One order and its fills |
GET /api/tape | The latest fills, newest first, each with its transaction signature |
GET /api/wallet/<address> | A wallet's active, expired and past orders, its fills and its points |
GET /api/tokens?q= | Token lookup by symbol or mint |
GET /api/quote | Both sides of a proposed order priced at the market, and whether the price guard accepts it |
GET /api/burns | Every buyback and burn with its transaction |
GET /api/analytics | Daily volume, fills and orders; top pairs; burns; fees |
GET /api/events | Server-sent events: order, fill, and stats every 15 seconds |
Building transactions
POST /api/tx/make, /api/tx/take, /api/tx/cancel and /api/tx/expire return an unsigned transaction (base64) for the wallet named in the request. Sign it with that wallet and send it yourself, or post it to POST /api/tx/send; follow it with GET /api/tx/<signature>.
Build
Roadmap
Solana only, built deep rather than wide.
Phase 00 · The desk
- The escrow program: make, take, cancel, expire
- Public and private orders, counterparty lock
- Partial fills with a minimum slice
- Expiry from 60 seconds to 365 days, free cancel
- $OFF buyback and burn from fees
- Airdrop points and referrals from the first fill
Phase 01 · Market depth
- Request for quote: post what you want and let makers answer
- Several takers on one order at once
- Pay a fill in any token, routed to what the maker asked for
- Lower fees on stable pairs
- Fee discounts for $OFF holders
- Referral revenue share paid out on a schedule
Phase 02 · Prove everything
- Verified build of the program
- Independent audit
- Public bug bounty
- A timelock on program upgrades
Phase 03 · Built for desks
- API keys and higher limits for trading bots
- Basket orders: several tokens in one order
- Fill alerts by link
- Desk reports for funds