DeFi leftovers
The empty trading accounts and liquidity positions apps leave in a wallet, and how Burn & Claim closes them for their rent without touching anything live.
Trading and liquidity apps open accounts in a person's wallet and leave them there when the trading stops. Each holds rent. Burn & Claim finds the ones that are provably empty and whose rent can only go back to the wallet, and closes them. These are DeFi leftovers: assets with family defi.
| Kind | What it is | Program |
|---|---|---|
pump_account | A pump.fun or PumpSwap trading account (its volume accumulator). Its next trade opens a new one. | pump, pump-amm |
open_orders | An OpenBook or Serum order account, empty and with no order on the book. OpenBook v2's empty accounts close with the list that names them. | openbook, serum, openbook-v2 |
lp_position | An empty Orca (single or bundled), Raydium or Meteora position, its NFT included. | orca-whirlpool, raydium-clmm, meteora-damm-v2, meteora-dlmm |
farm_account | An empty Kamino farm account. | kamino-farms |
lending_account | An empty marginfi account. | marginfi |
Only empty, only to the wallet
A leftover's one action is close, and only when it holds nothing. Burn & Claim never withdraws liquidity, cancels an order, settles, harvests or claims on a person's behalf: one that still holds something is listed with no action, a blockedReason and a blockedDetail that says what it holds and what to do on its own app.
blockedReason | What to do |
|---|---|
has_liquidity | Withdraw the liquidity on its app, then scan again: the empty position closes here. |
has_orders | Cancel the orders on the app you traded on. |
unsettled_funds | Settle the tokens to the wallet on the app you traded on. |
has_balance | Withdraw or repay the deposit, loan or stake. |
fees_owed | Collect the fees or rewards first; closing would lose them. |
rewards_unclaimed | Claim the rewards or cashback on the app first. |
locked | It closes once the protocol unlocks it. A position whose liquidity is locked for good never closes. |
Every close sends the rent to the wallet: the builder puts the wallet in every slot that pays or signs, and before co-signing, /submit checks each instruction and simulates the transaction: what it closes must end empty, and nothing it names may gain SOL but the wallet and the quoted charges.
A position NFT (Orca, Raydium, Meteora DAMM v2) is never offered as a token to burn: burning one gives up the position for good. Its row is the position's.
What comes back, and the fee
The close returns everything the accounts hold. The fee, defi_account_closure at the rate GET /v1/fees lists, rests on the rent part only. SOL that is the person's own comes back fee-free in strayLamports, on the scan's action and on the quote's line, for the screen to show on its own line: pump.fun cashback held in the account, PumpSwap cashback that the close claims first (it lands as wrapped SOL when the wallet already keeps a wrapped SOL account), and anything sent to an account by mistake. What the wallet receives is netLamports plus strayLamports.
Tiers: what is preselected
A trading bot or market maker keeps empty accounts it is about to use again, and closing one would make its next transaction fail. So a leftover is preselected only when it is empty and untouched for 30 days: tier 1. One used lately, or whose last use couldn't be read, is tier 2: listed, never preselected, for the person to pick. lastUsedAt says when it was last used, where known.
totals.families.defi counts DeFi leftovers apart from totals.reclaimableLamports: how many were found, how many are in the safe set, and what closing that set leaves in the wallet. A client that shows them adds it to its total.
Staff switches
Each protocol has its own switch: staff can pause one at once (a program upgrade that changes how it closes, say), and its leftovers are skipped as service_paused while the rest go on.
Not closable by anyone's wallet
Some apps' accounts can't be closed by their owner, so Burn & Claim never lists them: Phoenix seats, Drift accounts while Drift's program takes no user instructions, Save and Kamino Lend obligations and metadata, Kamino farm accounts delegated to Kamino Lend (their rent goes to the farm), and Squads transactions.
Creator and DeFi leftovers
The accounts beyond token accounts that a wallet can close for their rent, how safe each is to close, and what is charged.
Fees and donations
What a cleanup charges, what it can donate, and how each lamport is split between the wallet, the burner's organization and Burn & Claim.