How Mist works
Your public wallet sits at the edges. Your private balance lives in the middle, as encrypted notes only your keys can read.
Deposit
Move tokens from your wallet into Mist. The deposit is public. What lands in your private balance is an encrypted note.
Trade
Enter an amount. Independent solvers quote it, your browser proves you own the funds, and the solver you picked settles it with the pool.
Withdraw
Turn notes back into tokens in the wallet you deposited from. The withdrawal is public and can't be sent anywhere else.
Getting started
You bring one wallet. Mist turns its signature into the keys of your private balance, so there's no second seed phrase and no file to keep.
- Connect your wallet. An EVM wallet for Robinhood Chain, a Solana wallet for Solana. Connecting moves nothing.
- Create your private wallet. Your wallet signs the same message twice. It's free and sends no transaction. Mist checks that both signatures match, then derives your keys from them.
- On Solana, set a spend passphrase. At least 12 characters. Deposits and trades need it; withdrawals never do.
- Deposit. Get test tokens from the deposit page first. Hold the button to confirm. Your browser builds the proof and your wallet sends the deposit.
- Trade. Solvers race to quote. Pick one, hold to confirm, and the result lands in your private balance. Your wallet sends nothing.
- Withdraw when you're done. Mist checks whether the amount or timing would point back to one of your trades before you confirm.
Privacy model
Mist doesn't hide that trades happen. It takes your wallet out of them.
| Action | Public | Not included |
|---|---|---|
| Deposit | Your wallet, the asset, the amount | The keys that read and spend the note |
| Trade | Solver, assets, amounts, proof | Your wallet, who owns the notes |
| Withdraw | Your wallet, the asset, the amount | Which deposit or trade it came from |
Keys and recovery
Your private keys are derived from your wallet's signature over a fixed message that names this site, the chain and the pool. The same wallet on the same site always gives the same keys, on any device. Nobody can reset them, including us.
Keep
Your wallet and its own recovery phrase. On Solana, your spend passphrase. If your wallet can't sign the same way twice, the 24 words Mist showed you.
Come back
Open Mist, connect the same wallet, sign again. Your balance comes back after a sync. Your activity list lives in this browser only.
- Nothing secret is stored. Keys live in a background worker for as long as the tab is open. Mist remembers only a public fingerprint per wallet, to notice if a different set of keys ever turns up.
- A different fingerprint means different keys. Another account, or a hardware wallet in place of a hot one, signs differently and sees an empty balance. Switch back and your balance is there.
- Some wallets can't do this. Wallets that sign differently each time get a 24-word recovery phrase instead, shown once. Smart-contract wallets can't use the Robinhood Chain pool at all, because spends need an ordinary signature.
- Forgot the Solana passphrase? Set a new one. Notes made under the old one can still be withdrawn, just not traded.
- Only sign the activation message here. Anyone who gets that signature can read your notes, though not spend them.
The deposit gate
Deposits pass a gate before they enter the pool. Where the gate asks for it, every deposit needs a short-lived signed approval, including ones made outside this site.
- You sign a request that names your public address and this deposit. Your keys and notes stay on your device.
- Only deposits pass the gate. Trades, withdrawals and browsing never do.
- If the gate can't approve a deposit, it stops before any funds move. If the gate is paused, withdrawals keep working.
Fees
0.5% of what a trade buys. That's the protocol fee, fixed in the pool. Deposits and withdrawals carry none.
- 01Starting balance$1,000.00
- 02After deposit$1,000.00free
- 03After one trade≈ $995.00−0.5%
- 04After withdrawal≈ $995.00free
- Solver fee. The solver that fills a trade may charge a fee in the token you sell, on top of the sale. Mist caps it at 1% and every quote shows it. The solver pays the network fee of the trade.
- Relayer fee. If you let a relayer send a withdrawal, it pays the network fee and takes a small fixed fee from your private balance. You see it before you confirm.
- Network fees. Your wallet pays them for deposits and for withdrawals you send yourself.
Fees round down in the pool's smallest unit. A token that taxes its own transfers arrives net of that tax.
Chains
Switch between Solana and Robinhood Chain at the top of the app. Each has its own pool, its own keys and its own history.
Your keys on each chain come from that chain's wallet, so balances stay separate and nothing moves between chains.
Protocol and security
Zero-knowledge proofs
Every note is a commitment to its pool, owner, asset and amount in a Merkle tree. When you spend, your browser proves that you own enough and that value is conserved, without revealing which notes are yours. Robinhood Chain uses UltraHonk proofs, which need no trusted setup. Solana uses Groth16 proofs, whose keys come from a setup: the test networks run on development keys, and mainnet waits for a multi-party ceremony. Nullifiers stop a note being spent twice.
Notes only you can read
Every new note comes with an envelope encrypted to your own viewing key. Your wallet finds its notes by trying to open every envelope, and accepts one only if it recomputes the commitment onchain, so nobody can plant a fake balance. Sync reads from a public indexer for speed and checks everything against the chain's own roots.
An open solver auction
Changing an amount sends a quote request to independent solvers under a one-time key, over public relays. Each one finds its own route and answers with a signed quote, encrypted to you. There's no solver whitelist and no preferred venue.
A tight settlement boundary
Your proof fixes the solver and the exact amounts. During settlement the pool hands that solver only the proved sell amount; the solver has to return the full quoted buy amount before the transaction ends. If any check fails, the whole thing reverts.
Relayers can't redirect anything
A relayed withdrawal is a proof that names the relayer and its fee. The relayer pays the network fee and receives exactly that fee. It can refuse or delay, never change the destination or the amount.
Circuit breaker and freeze
Each pool can limit how much of an asset leaves in 24 hours; withdrawals over the limit are queued for a day instead of refused. A guardian can freeze a pool for at most 72 hours, after which it reopens by itself. A paused pool stops deposits and trades and still pays withdrawals.
Token policy
Deposits only accept assets the pool has enabled. Trades can buy other tokens, but the pool refuses ones it can't account for exactly, such as tokens that tax or rebase their transfers. No protocol can make a malicious or worthless token safe to hold.
Questions
Does a solver ever hold my funds?
No. The pool holds the assets. A solver only receives the exact amount your proof allows, inside a single settlement that reverts if it doesn't pay back what it quoted.
Is my private wallet an onchain account?
No. It's a set of keys, made from your wallet's signature, that can read and spend your notes. There's no private-wallet address onchain.
Can I withdraw to a different address?
No. Withdrawals only go back to the wallet that deposited. That keeps Mist from becoming a way to send funds privately to someone else.
Which tokens can I trade?
A trade can buy any token the pool wouldn't refuse: paste its address into the token picker. Deposits take the assets the pool's governance has enabled. You can sell and withdraw whatever you hold.
What do I need to keep?
Access to the wallet you deposited with. It recreates your keys by signing, and it's where withdrawals go. On Solana, also your spend passphrase if you want to trade. If Mist gave you a 24-word recovery phrase, that phrase.
What does it cost?
0.5% of what a trade buys. Deposits and withdrawals carry no protocol fee. A solver may add its own fee, capped at 1% of the sale and shown in the quote, and a relayer charges a small fee if you let it send a withdrawal.
What is a queued withdrawal?
Each pool has a circuit breaker that limits how much of an asset can leave in a day. A withdrawal over the limit isn't refused: it's queued, and paid to your wallet 24 hours later when anyone claims it. Mist shows your queued withdrawals on the withdraw page.
Build on Mist
Run a solver and keep the spread, or put private trading in your own app. Both come from one repository, and neither needs anyone's permission.
The MIST SDK and solver kit has two packages: mist-solver, a command that quotes, settles and relays on both chains, and mist-sdk, the client library this site itself runs on. Keys, sync, proofs, quotes and withdrawals are the same code here and in your integration.
The testnet deployment
| Robinhood Chain | Solana | |
|---|---|---|
| Pool | 0xb0f2c3f4F07614b995E32cBd7d5Be5B1572e067D | 7NjqHd4HNq7urvYKojGxWDkpe8pEfgQ8mS9D4BoNYFQF |
| Network | Robinhood Chain testnet · chain 46630 | Solana devnet |
| Deposit assets | ETH, tUSD, tWETH | tSPL, tFEE, wSOL |
| Test route | TestAMM (1 tWETH ≈ 2000 tUSD) | mock_swap program |
| Proofs | UltraHonk, verified by the pool | Groth16, development keys |
The SDK carries all of it as networks.robinhoodTestnet and networks.solanaDevnet, along with the public indexer at mist-indexer-testnet.fly.dev.
Run a solver
A solver listens for quote requests on Nostr, prices them through its own route, and signs an offer. When a user accepts, their proof binds that exact trade to your executor, and you submit it. The protocol keeps no list of solvers: anyone can quote, and users take the best offer.
- Install the kitThis links the
mist-solvercommand into the workspace, sonpx mist-solverworks from the repository root.git clone https://github.com/vxundefined/mist-sdk.git cd mist-sdk npm install # links the mist-solver command and the mist-sdk package - Create your keysWrites
~/mist-solver/.env(mode 0600) with a new Nostr identity, a Robinhood operator key and a Solana solver key, pre-filled with the testnet deployment. It prints the public addresses, never the private keys, and never overwrites an existing file. Add--chain evmor--chain solanato run one chain.npx mist-solver init ~/mist-solver - Fund the keys it printedTest ETH to the operator from the Robinhood testnet faucet, devnet SOL to the solver key from faucet.solana.com. They pay gas and fees. Back the file up: whoever has it controls your solver.
- Deploy your contract (Robinhood only)Deploys your own
OpenOceanSolverV2from the bundled, reproducible build, with the testnet TestAMM as its only route, and saves the address in.env. Its pool, operator and route allowlist are immutable. On Solana there's nothing to deploy: the solver key is the executor.npx mist-solver deploy-contract ~/mist-solver - Check everything, then startThe doctor is read-only. It checks each RPC's chain, the pool or program, your contract, the route, the lookup table, your balances, the proof verifier and the relays, and exits non-zero if anything fails.
npx mist-solver doctor ~/mist-solvernpx mist-solver start ~/mist-solver - Watch it workOne JSON line per event on standard output. Open Mist, ask for a quote on the same network, and yours shows up in the race.
{"level":"info","event":"started","chains":["evm","solana"],"http":"127.0.0.1:8787"} {"level":"info","event":"quote","chain":"evm","sellAmount":"50000000","buyAmount":"24390243","maxRelayerFee":"50000"} {"level":"info","event":"execution","chain":"evm","quoteId":"0x…","transactionHash":"0x…"}
How the solver earns
You quote a little under what your route returns: by default 1% of slippage plus a 0.25% safety margin. On Robinhood Chain your contract pays the pool exactly the quoted amount and sends everything left over to your operator. On top you ask a fee on the sale, 0.1% by default, which a user's app caps at 1%. Gas and failed transactions come out of that. Lower margins win more quotes; higher margins earn more per trade.
The 0.5% protocol fee is the user's cost, not yours: it comes out of what you deliver. Your quote can't change a user's proved terms, and if your route can't pay what you quoted, settlement reverts. Before you pay anything the solver verifies the proof: with a call of the exact transaction on Robinhood Chain, off-chain on Solana.
Configure and operate
Every command reads the directory's .env; variables in the environment override it. A chain is on when its RPC URL is set, so one process serves Robinhood Chain, Solana or both. The public RPC endpoints are rate limited: use your own for anything beyond a trial.
Three keys
NOSTR_SECRET_KEYYour identity on the relays. Every quote carries a signature by the chain key that binds it to this identity, so nobody can replay your quotes as theirs. It must differ from the chain keys.
EVM_PRIVATE_KEYRobinhood operator. Signs quotes, submits trades and relayed withdrawals, pays gas, and is the immutable operator of your contract: it receives the surplus and the fees.
SOLANA_SECRET_KEYSolana solver key. Executor, relayer and fee payer: signs quotes, uploads spend buffers, sends trades, co-signs relayed withdrawals.
If a key leaks, an attacker can drain that key's balance and quote in your name. They can't take funds from the pool or from users. Move the funds, run init in a new directory, deploy a new contract.
Pricing and limits
# ~/mist-solver/.env (written by init; these are the knobs you'll tune)
SOLVER_SLIPPAGE_BPS=100 # slippage asked from the route
SOLVER_QUOTE_SAFETY_BPS=25 # extra margin kept below the route
EVM_TRADE_FEE_BPS=10 # your fee on a trade, in basis points of the sale
SOLANA_TRADE_FEE_BPS=10
EVM_MAX_GAS_PRICE_WEI=1000000000 # never quote or submit above 1 gwei
SOLVER_STATE_PATH=solver-data/state.json100 basis points is 1%. These are limits you set, not earnings anyone guarantees. The kit's reference lists every setting, including the OpenOcean, 0x and Jupiter route sources that mainnet will use.
Relay withdrawals for a fee
A relayer submits other people's withdrawals and pays the network fee. The proof binds the relayer and its fee, which it receives in the withdrawn asset, so it can refuse or delay a withdrawal but never redirect it or change the amount. The “Let a relayer send it” option on this site's withdraw page uses exactly this.
# Relaying is off until you name a minimum fee per asset.
# Robinhood: pool units of the asset. Solana: token base units.
EVM_RELAY_FEES_JSON={"0xd64DFE63E7fE97c43Dfac411754A21Aa38F710Af":"10000","0x0000000000000000000000000000000000000000":"5000"}
SOLANA_RELAY_FEES_JSON={"BtqBxGMH4ZKgWcuRZrTaaG31qavrAgStvfjTe57jnPdJ":"10000"}
# Users reach the relay over HTTPS: put a TLS proxy you control in front.
HTTP_HOST=127.0.0.1
HTTP_PORT=8787
HTTP_TRUST_PROXY=true # only behind that proxyGET /health200 while every configured chain is up, with per-chain status and quote counters.
GET /v2/evm/info · /v2/solana/infoWho the relayer is and its minimum fee per asset. Apps read this and show the fee before a user proves.
POST /v2/evm/relayA withdrawal package in, the transaction hash out. Checked with a call of the exact transaction before it is sent.
POST /v2/solana/sign · /v2/solana/bufferCo-signs a withdrawal as fee payer, or first uploads one that doesn't fit a transaction into the relayer's own spend buffer.
Keep it running
One instance per key
The solver records issued quotes and relayed spends in solver-data/state.json. Keep that file across restarts so quotes stay single use and outstanding ones survive. A second process on the same keys conflicts with the first.
Upgrades
Pull the new version, run doctor, restart, keep the state file. Your contract doesn't change. For mainnet, run init --network mainnet in a new directory instead of editing a testnet file.
docker build -f packages/solver/templates/Dockerfile -t my-mist-solver .
docker volume create mist-solver-data
docker run --rm --env-file ~/mist-solver/.env my-mist-solver mist-solver doctor /data
docker run -d --name mist-solver --restart unless-stopped \
--env-file ~/mist-solver/.env -v mist-solver-data:/data \
-p 127.0.0.1:8787:8787 my-mist-solverThe kit also ships a Fly.io template. Either way the container needs your .env as environment or secrets, a volume for the state file, and nothing else. The image carries the verifying keys, not the proving keys.
Read the event stream
Logs are JSON, one object per line. URLs are redacted and keys are never logged. Alert on failed executions, a stopped process, a failing /health, and low key balances.
started / stoppedProcess lifecycle. A stopped process is no longer quoting.
quote / quote_failedA signed quote went out, or a request couldn't be quoted. The reason names it: no route above the minimum, gas price too high, fee above the user's cap.
execution / execution_failedA trade settled or failed. Successful entries carry the transaction hash or signature. Alert on failures.
relayed / relay_signed / relay_bufferedA withdrawal was relayed (Robinhood), co-signed, or buffered (Solana).
transport_errorA relay event couldn't be handled. Check relay reachability.
Use the SDK
mist-sdk runs the whole client side: key activation, note sync, proving, deposits, quotes, trades and withdrawals. Proofs are made locally with bundled, hash-checked proving files, and nothing secret leaves the process. One MistClient serves one wallet on one pool.
bigint, never floating point. tUSD has 6 decimals, so 1_000_000n is 1 tUSD; ETH and tWETH have 18. On Robinhood Chain an amount must be a whole number of pool units, which is 9 decimals at most.1. Create a client
Install from the kit repository, then pick a network from the registry. On Robinhood Chain the wallet must be an ordinary account, or an EIP-7702 delegated one: every spend is authorized by a signature checked inside the proof.
import { createPublicClient, createWalletClient, http } from "viem";
import { privateKeyToAccount } from "viem/accounts";
import { MistClient, networks } from "mist-sdk";
const network = networks.robinhoodTestnet;
const chain = {
id: Number(network.chainId), name: network.label,
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
rpcUrls: { default: { http: [network.rpcUrl] } },
};
const account = privateKeyToAccount(process.env.WALLET_PRIVATE_KEY);
const mist = await MistClient.create({
network,
evm: {
publicClient: createPublicClient({ chain, transport: http(network.rpcUrl) }),
walletClient: createWalletClient({ account, chain, transport: http(network.rpcUrl) }),
},
});import { Connection, Keypair } from "@solana/web3.js";
import { ed25519 } from "@noble/curves/ed25519";
import { MistClient, networks } from "mist-sdk";
import { base58Decode } from "mist-sdk/solana";
const network = networks.solanaDevnet;
const keypair = Keypair.fromSecretKey(base58Decode(process.env.SOLANA_WALLET_SECRET_KEY));
const wallet = {
publicKey: keypair.publicKey,
signMessage: async (message) => ed25519.sign(message, keypair.secretKey.slice(0, 32)),
signTransaction: async (tx) => { tx.sign([keypair]); return tx; },
};
const mist = await MistClient.create({
network,
solana: { connection: new Connection(network.rpcUrl, "confirmed"), wallet },
approvals, // the deposit gate's approval hook: see "Deposits" below
});2. Activate, then sync
Keys come from the wallet's signature over a fixed sign-in message that names your app's domain. To read the same notes as this site, use its domain and URI; any other gives a separate, independent set of keys. Keys live in memory only.
// The wallet signs one fixed message twice; both signatures must match.
// domain and uri are part of the derivation: another site gives other keys.
const { fingerprint } = await mist.activate({
domain: "mistfi.net",
uri: "https://mistfi.net",
fingerprint: savedFingerprint, // refuse a different key set next time
});
// Solana only: deposits and trades also need the spend key.
const { spendFingerprint } = await mist.unlockSpend(passphrase, savedSpendFingerprint);
await mist.loadCached(); // optional: last verified state, offline
await mist.sync(); // verified against the chain's roots
console.log(mist.balances()); // [{ asset, amount }] in base units3. Deposit, quote and trade
Deposits pass the pool's deposit gate. On Robinhood testnet the gate allows everything and needs nothing from you. On Solana it always checks an approval signed by the screening signer: pass an approvals hook that fetches one from the screening service, or use localApprovalSigner from mist-sdk/solana on a local validator.
const { tUSD, tWETH } = network.assets;
// 100 tUSD (6 decimals). Deposits carry no protocol fee.
await mist.deposit({ asset: tUSD, amount: 100_000_000n });
await mist.sync();
// Ask solvers over Nostr. Offers come back best first.
const offers = await mist.quote({ sell: tUSD, buy: tWETH, amount: 50_000_000n });
if (!offers.length) throw new Error("No solver answered");
const best = offers[0];
// best.netBuyAmount: what your note will hold after the 0.5% protocol fee
// best.maxRelayerFee: the solver's fee, taken in tUSD on top of the sale
const receipt = await mist.trade(best); // proves, then the solver submits
await mist.sync();A quote request carries the pair, the amount and a deadline, never a wallet address. Show netBuyAmount as what the user receives and maxRelayerFee as what the solver takes. Use each offer once.
4. Withdraw
Notes only ever leave to the wallet that deposited them, so there's no recipient to pass.
// Directly: your wallet sends the transaction and pays the network fee.
await mist.withdraw({ asset: tUSD, amount: 30_000_000n });
// Through a relayer: it pays the network fee and receives exactly its fee.
import { httpEvmRelayer } from "mist-sdk/relay";
const relayer = await httpEvmRelayer("https://mist-solver-testnet.fly.dev");
const fee = relayer.fees[tUSD]; // show it to the user and apply your own cap
const r = await mist.withdraw({ asset: tUSD, amount: 30_000_000n, relayer, maxRelayerFee: fee });
// Over the circuit breaker's limit a withdrawal is queued, not refused.
if (r.queued) for (const claim of r.claims) {
// 24 hours later, from any account:
await mist.claim(claim);
}
mist.close(); // destroys the keysMethods and failure handling
activate({ domain, uri, fingerprint? })Derives the keys from two wallet signatures over one fixed message. Returns the public fingerprint; store it and pass it next time.
unlockSpend(passphrase, spendFingerprint?)Solana: derives the spend key (Argon2id). Needed to deposit and trade, never to withdraw.
recover({ phrase }) · recover({ backup, passphrase })Keys from a 24-word phrase (for wallets that sign differently each time) or from an encrypted export, instead of activate.
export(passphrase)An encrypted backup of the keys. Opt-in: nothing is persisted unless you call it.
sync() · loadCached() · clearCache()Reads and verifies your notes (indexer first, RPC fallback), shows the last verified state offline, or forgets it.
balances() · notes()Unspent balances as { asset, amount } in base units, and the notes behind them.
deposit({ asset, amount })Proves and deposits. Approves an ERC-20 for exactly the amount first when needed.
quote({ sell, buy, amount, minimumBuy?, maxRelayerFee? })Broadcasts a request and collects signed quotes for about four seconds. Best first; an empty list means no solver answered.
trade(offer)Checks the bought note against the quote, proves, and hands the proof to that solver. Offers are single use.
withdraw({ asset, amount, relayer?, maxRelayerFee? })To the depositing wallet, directly or through a relayer. May return queued: true with claims.
claim(claim)Pays out a queued withdrawal, 24 hours after it. Anyone can call it.
close()Closes the transports and destroys the keys.
Understand an offer
buyAmount is what the solver pays the pool. netBuyAmount is what your note holds after the 0.5% protocol fee, and protocolFee is the difference. maxRelayerFee is the solver's fee, in the sold asset, on top of sellAmount. executor is the contract or key that settles, and deadline is Unix seconds.
Handle failures explicitly
NetworkNotDeployedErrorThe network isn't deployed yet (both mainnets today) or still has placeholder values.
FingerprintMismatchErrorThese keys aren't the ones this wallet activated before: another account, or a hardware wallet in place of a hot one.
SpendKeyMismatchErrorThe passphrase gives a different spend key than your notes use. Nothing was unlocked.
QuoteExpiredErrorThe offer is too close to its deadline to prove and submit. Request a new one.
StaleRootErrorThe pool moved past the proof's root. The client re-synced: request a new quote.
ArtifactIntegrityErrorA proving file doesn't match the manifest. Don't work around it.
Lower-level modules
mist-sdk/keysActivation messages, key rings, recovery phrases, fingerprints.
mist-sdk/proverUltraHonk and Groth16 provers, artifact and CRS stores, the JavaScript Groth16 verifier.
mist-sdk/evm · mist-sdk/solanaABI and IDL, transaction and instruction builders, indexers, deposit-gate approvals.
mist-sdk/rfqTrade intents, signed quotes, the Nostr transport, quote ranking.
mist-sdk/relayThe HTTP relay client: httpEvmRelayer, httpSolanaRelayer, fetchRelayerInfo.
mist-sdk/syncThe sync engine and its encrypted cache (IndexedDB in browsers, files in Node).
Make it your own.
Your keys. Your balance. Your next trade.

