Docs
How BlockDesk settles a trade, what the escrow program can and cannot do, what it costs and where the risks are. User view.
How it works
One seller, one buyer, one fixed price. No order book, no pool – the sale itself doesn't move a chart.
01List
The seller deposits a fixed amount of a classic SPL token into an escrow account owned by the order. Price is fixed in SOL. Optional: expiry, and a single wallet that may buy (private deal).
02Fill
A buyer pays the full price in one transaction. Fee to the vaults, the rest to the seller, tokens to the buyer – all at once or not at all.
03Cancel
Until it is filled, the seller can cancel any active order and take the tokens back – also after expiry and while the protocol is paused.
Full fills only. Terms can't be edited after listing – cancel and list again.
Escrow
The escrow program (otc-escrow) holds the listed tokens in an associated token account whose authority is the order PDA. Only two instructions can release them: fill_order and cancel_order.
What the contract does
create_ordermoves the tokens into escrow and checks the escrow balance equals the offered amount.- It copies fee rate, buyback share and vault addresses into the order (snapshot). Later config changes don't touch existing orders.
fill_orderpays fee, seller and buyer in one transaction and closes the escrow account.cancel_orderreturns the full escrow content to the seller and closes the escrow account.
Admin can
- Pause new orders and/or fills.
- Change fee rate, buyback share and vaults – for future orders only.
Admin cannot
- Move escrowed tokens or cancel your order – no admin instruction touches escrow.
- Block
cancel_order– a pause never stops a seller from getting tokens back. - Change fee or vaults of an existing order.
Trust anchor is the program's upgrade authority: whoever can upgrade the program can change every rule. Accepted on devnet; before mainnet: multisig/timelock or immutable.
Rent: who pays, who gets it back
| Account | Paid by | Returned to | When |
|---|---|---|---|
| Order account (318 B, ≈0.0031 SOL) | Seller | – stays locked | never – order accounts are not closed |
| Escrow ATA (165 B, ≈0.00204 SOL) | Seller | Seller | automatically on fill or cancel |
| Buyer token account | Buyer, if missing | – belongs to the buyer | – |
| Network fee | Fee payer of each tx | – | – |
Order accounts stay as permanent records after fill or cancel. That is what makes this feed verifiable – and why the order rent is not refunded.
Fees
One protocol fee: 0.50 % (50 bps) of the price, paid by the seller, charged only on a successful fill. The buyer pays exactly the price shown.
fee = floor(price × 50 / 10 000) buyback = floor(fee × 7 000 / 10 000) // 70 % ops = fee − buyback // 30 %, gets the rounding rest seller = price − fee
Example: 10 SOL
| Item | SOL |
|---|---|
| Buyer pays | 10.000 |
| Fee (0.50 %) | 0.050 |
| → Buyback vault (70 %) | 0.035 |
| → Ops vault (30 %) | 0.015 |
| Seller receives | 9.950 |
Fee snapshot: the rate stored in your order at listing is the rate charged at fill.
Fee vaults (devnet)
Plain system accounts that only receive SOL. The buyback vault collects SOL – no code buys or burns anything with it. There is no BlockDesk token.
Free actions (no protocol fee)
- Listing an order – only rent and network fee.
- Cancelling – also after expiry and during a pause; escrow rent comes back.
- Viewing orders and price comparisons.
Settlement
A fill is a single Solana transaction. Either every transfer in it succeeds or none does – there is no state where the buyer paid and didn't get the tokens.
Inside one fill
- Buyback share → buyback vault, ops share → ops vault.
- Price minus fee → seller.
- Escrow tokens → buyer's token account (created if missing).
- Escrow account closed, rent → seller. Order status → Filled, with buyer and time.
TermsMismatch protection
The amount and price you saw on the deal page go into the signed transaction as expected values. If the order on chain doesn't match them exactly, the program rejects the fill with TermsMismatch – nothing is paid. This blocks bait-and-switch between seeing a deal and signing it.
Other checks before a fill
- Order active and not expired (
now ≥ expires_atcounts as expired). - Private deal: only the allowed wallet. Sellers can't fill their own order.
- Escrow balance equals the offered amount – otherwise
EscrowMismatch; the deal page disables buying and shows cancel only. - Vaults equal the order's snapshot.
The app simulates every transaction before you sign and shows the program logs if it fails.
Risks
Read this before you trade.
- Freeze authority
- A classic SPL mint can have a freeze authority. If the issuer freezes the escrow account, both fill and cancel are blocked until it is thawed. The app warns on create and on the deal page; the program does not reject such mints.
- Token-2022 unsupported
- Only the classic Token Program. Token-2022 mints (transfer hooks, transfer fees) are rejected.
- Estimates ≠ quotes
- The DEX comparison is information, not an offer. The DEX exit is a Jupiter quote at request time, subject to slippage and MEV. The DEX buy cost is an estimate and is marked as one. Prices come from mainnet even on devnet.
- Devnet only
- BlockDesk runs on devnet. Devnet tokens and SOL have no value. No audit yet – no mainnet without audit, legal review and multisig.
- No guaranteed profit
- A lower price than on a DEX today says nothing about tomorrow. Nothing here is investment advice or a promise of return.
- Upgrade authority
- Whoever controls the program's upgrade authority can change its rules. Check the authority in the explorer.
Recover without the frontend
You never need this site to get your tokens back. Any client that can sign a Solana transaction can call the program directly.
Instruction
cancel_order (no arguments)
Discriminator
[95, 129, 237, 240, 8, 49, 223, 132]
Order PDA
seeds = ["order", maker, order_id as u64 little-endian]
Accounts, in order
| # | Account | Flags | Value |
|---|---|---|---|
| 0 | order | writable | order PDA (see above) |
| 1 | maker | writable, signer | your wallet (the seller) |
| 2 | maker_token_account | writable | your token account for the mint |
| 3 | escrow_vault | writable | associated token account of (order PDA, mint) |
| 4 | offered_mint | – | the listed mint |
| 5 | token_program | – | TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA |
Find your order: the deal URL is /deal/<maker>/<order_id>; or list the program's accounts with getProgramAccounts and filter on maker at byte offset 8.
The on-chain IDL is published with the program; fetch it with `anchor idl fetch <program id>`.
FAQ
Who holds my tokens while the order is open?
The escrow program. The escrow account's authority is the order PDA, so only fill_order or cancel_order can move the tokens. BlockDesk operators can't.
Can I get my tokens back after the order expired?
Yes. Cancel works on any active order – after expiry and during a pause. Expired orders stay in escrow until you cancel.
Who pays the fee?
The seller: 0.50 % of the price, deducted at fill. The buyer pays exactly the price shown plus the network fee.
Can the seller change the price after I opened the deal?
No. Orders can't be edited. And your signed fill carries the amount and price you saw – any difference fails with TermsMismatch, nothing is paid.
Can I buy part of an order?
No. Full fills only for now.
Which tokens are supported?
Classic SPL tokens. Token-2022 is rejected. Payment is in SOL.
Why didn't I get all my rent back?
Escrow rent is returned on fill or cancel. The order account (≈0.0031 SOL) stays as a permanent on-chain record and is not refunded.
Is a wallet on the activity feed a person?
No. An address is not an identity. The feed shows what happened on chain, not who is behind it.
Which wallets are supported?
Any wallet that implements the Solana Wallet Standard shows up automatically – including Phantom, Solflare and Backpack (browser extension or the wallet app's in-app browser). On Android Chrome, "Mobile Wallet Adapter" connects to an installed wallet app such as Solflare or Backpack. On iOS, open BlockDesk in your wallet app's built-in browser.
On-chain reference
Addresses of this deployment. Verify them in the explorer before you sign anything.
Devnet – no real money. Tokens and SOL here have no value.