Stale OpenBook and Serum Orders: The 0.023 SOL Trap
OpenBook and Serum place your orders in on-chain accounts that each cost ~0.023 SOL of rent. Cancelled orders don't auto-close. Active traders often leave 10–30 behind.
OpenBook — the community fork of Serum that survived FTX — is still one of the most-used central limit order books on Solana. It powers a huge share of Jupiter routes, Phoenix arbitrage, and market-making bots. And every order you place there costs more rent than most traders realize.
The OpenOrders account
To trade on OpenBook, a wallet needs an OpenOrders account for each market. That account holds your resting orders, your unsettled balances, and enough state to safely cancel and settle. It also locks roughly 0.023 SOL in rent — more than ten times a standard token account, because the data footprint is much larger.
The reason OpenOrders accounts are so large is that they store an entire slot table of open orders (up to 128 per market on OpenBook v2) plus the base and quote token balances that haven't yet been settled to your wallet. It's a mini order book per user per market. That's excellent for execution — you don't pay per-order account creation costs — but it means every market you've ever touched has an OpenOrders shadow behind it.
Cancelling an order doesn't close the OpenOrders account. Settling doesn't close it either. The account stays open, ready for the next order — which is convenient for active traders but leaves a long trail behind anyone who's used more than a handful of markets.
How much is stuck?
An active DeFi user who has swapped through Jupiter routes over the past year likely has 15 to 40 OpenOrders accounts scattered across markets they'll never trade on again. At 0.023 SOL each, that's 0.35 to 0.92 SOL of pure rent — often more than the entire token-account rent problem combined.
Jupiter is worth calling out because most Solana users have interacted with OpenBook markets without knowing it. Jupiter's router considers OpenBook order books as a liquidity source and will occasionally place your swap directly against a resting order, which creates an OpenOrders account under your wallet even though you never intentionally opened one. The account persists after the swap completes. Multiply that across hundreds of Jupiter swaps and the trail grows fast.
How to identify and close them
You need to find OpenOrders accounts where you are the owner AND every field is zeroed: no open orders, no free base, no free quote, no unsettled anything. Any non-zero field means the account is still doing work.
- Query the OpenBook program (opnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb) for accounts filtered by your owner pubkey.
- For each account, verify the native fields are all zero.
- Build a closeOpenOrders instruction — it requires the market, event queue, and OpenOrders pubkey as accounts.
- Sign and submit. Rent goes back to your wallet.
Settling before closing
Settlement is a separate instruction (settleFunds on OpenBook v2). It moves any base and quote tokens sitting in the OpenOrders account to your associated token accounts for those mints. If the ATAs don't exist, the settle instruction will fail — you'll need to create them first, which itself costs rent. A well-built recovery transaction handles this: cancel any lingering orders, settle funds, close ATAs that were only created for the settlement, close the OpenOrders account, all in one signed transaction.
Serum v3 legacy accounts
The original Serum program (9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin) was abandoned after FTX collapsed. But its accounts are still on-chain, and if you traded on Serum before November 2022, you probably have a handful. The close instruction still works — the program is frozen but not disabled — and the rent still refunds. Check it once, close what's there, and you never have to think about Serum again.
One historical caveat: Serum v3 markets that never had their event queues consumed cannot be closed through the normal path. The event queue has to be cranked (a permissionless operation anyone can pay for) before the close instruction succeeds. Most legacy markets have long since been cranked to zero by arbitrage bots, but a small number remain stuck. If a close fails on Serum v3 with an EventQueueNotEmpty error, that's what you're seeing.
Phoenix and other order books
Phoenix, the newer high-throughput order book from Ellipsis Labs, uses a different design where trader state is stored inside the market rather than in per-user OpenOrders accounts. That means Phoenix doesn't create the same rent trail as OpenBook. If you're an active Phoenix trader, most of your recoverable SOL will come from stale wSOL accounts and empty ATAs rather than from order accounts. Good design, less recovery required.
The compounding case
OpenOrders rent is the highest single line item in most wallet audits we run. If you're an active DeFi user and you've never cleared them, you're likely looking at more SOL sitting in dead accounts than you'd earn from a month of Marinade staking. Reclaim it once, then re-check every few months if you keep trading.
For a full sweep across empty token accounts, stale orders, unclaimed vesting, and Marinade tickets, run the WalletSweep scan on your wallet — everything shows up in one report, and closes in one signed transaction.
Run the scan on your own wallet
WalletSweep finds every category above in one pass and closes them in a single signed transaction.
Scan my wallet