MoatMoat
My vault

Docs

How it works

Custody: non-custodial. A vault's SOL and coins sit in a program account (the purse). Nobody can move them: not the Moat admin, not the keeper, not a relayer, not your gas wallet. The only thing that can is a hash-based one-time signature (WOTS+C) made from the vault's 24 seed words, over the exact action.

  1. Words to keys, in your browser. The site turns your 24 words into 256 one-time keys and the Merkle root over them, in a Web Worker on this page (about a million SHA-256 hashes, around a second on a laptop). The words and the secret key material never leave the page.
  2. Only the root goes on chain. Creating a vault stores that root. Your gas wallet pays the rent (about 0.0019 SOL, not refundable) and can deposit right away.
  3. Deposits are plain transfers. Anyone can send SOL or coins into a vault. Only the words take anything out.
  4. Every action is signed by the words. Buy, sell, withdraw, roll over, move to new words, cancel: each reveals one one-time key and its Merkle path (384 bytes). The program checks it with 1,280 hashes and moves the next-key counter forward.
  5. Trades go straight from the vault. pump.fun's bonding curve (buy_exact_quote_in_v3 / sell_v3) or the coin's canonical PumpSwap pool after migration. Bought coins land back inside. One transaction per action.
  6. Your gas wallet only pays the fee. It signs the transaction envelope, never the order. If it is stolen, the thief can pay fees for you and nothing else.

What your words sign

A fixed 265-byte message that the program rebuilds from the transaction's own accounts and arguments, then verifies: cluster, program id, vault, epoch, key number, base, action, venue, coin, amount, minimum out, recipient, deadline, relayer, relay fee, fee cap, new root, new locator and a salt. Change any of them and the signature no longer verifies.

That is why a relayer or an RPC can delay or drop an order but can never change or redirect it. The confirm screen shows these fields before you sign: read it.

Keys and epochs

  • Each epoch has 256 one-time keys under one root. Every action uses the next unused key (0 to 254).
  • Key 255 is kept for the roll-over to the next epoch's root, so a vault can never run out of keys. The site asks you to roll over from key 240.
  • Never sign two different messages with one key: the site records the key it used before it sends, and a retry re-sends the same bytes. A device without that record starts one to eight keys higher.
  • Move to new words (rekey) hands the vault to another set of 24 words; the old ones stop working at once.
  • Lost your device? Type the words on any device: the site finds the vault from them (a locator derived from the words) and rebuilds the keys.

Parameters

Moat fee0.5% of every buy and sellBounds 0 to 1%. Withdrawals are free. A vault keeps the fee it was created with: the admin can only lower it.
Fee raise delay24 hoursLowering is instant. You also sign a fee cap on every trade.
Minimum buy0.001 SOLSells: any amount above 0. A minimum out of at least 1 is always signed (3% slippage by default).
Order deadlineup to 10 minutesThe site signs 2 minutes ahead.
Relay fee cap0.0005 SOL per actionOnly if you choose a relayer; it is inside the signature.
Keys256 per epoch, 1 per actionRoll-over at 240, key 255 reserved for it.
SchemeWOTS+C w=256, n=16 bytes, 16 chains, SHA-256; Merkle height 8Signature 256 bytes + path 128 bytes; 1,280 hashes to verify.
Purse floor0 or at least 0.00089088 SOLThe rent-exempt minimum; a vault can be emptied to exactly 0.

What is protected, and what is not

Protected

SOL and coins inside the vault: against theft or a quantum break of any Ed25519 key (gas wallet, main wallet, relayer), against phishing of wallet signatures, against a malicious relayer or RPC (they can delay or censor a transaction, never change or redirect it: coin, amount, minimum out, recipient, relayer, fee cap and deadline are inside the signature).

Not protected

  • The vault seed words. Lose them and the funds are stuck forever: no admin recovery exists. Leak them and the funds are gone.
  • The page and its kit. A malicious page can sign a withdraw to itself. Check the confirm screen and use the published site. The words never leave the browser in our kit; a tampered page could take them.
  • The program upgrade authority. An Ed25519 key can replace the program. Real post-quantum protection needs the program frozen (upgrade authority dropped). It is not frozen yet.
  • The RPC can lie to the page about balances and quotes (the chain still enforces the signed minimum out) and can censor.
  • The gas wallet and anything outside the vault: your main wallet, coins you never deposited.
  • pump.fun, PumpSwap, Token-2022, the System program and Solana consensus: all governed by Ed25519 keys and upgradeable by their owners (pump.fun's admin powers include fee changes, set_creator and the block-zero tax rate), and the coins themselves.
  • Security level: hash-based, 128-bit classical, 64-bit against Grover (NIST level 1, the same hash size as SLH-DSA-128). Two devices signing at the same time without shared records is your risk; "Cancel a pending order" burns a key so an order signed before cannot land.

Trust points

  • Upgradeable program (above). The admin can pause new vaults and buys (sells and withdrawals always work), lower fees at once, raise them after 24 hours (existing vaults never pay more than their own fee), change the treasury and hand over admin in two steps. The admin can never touch a vault, its root or its funds.
  • Relayer (optional, off by default): sees nothing secret, can only submit or drop already signed transactions.
  • Cashback coins: pump.fun refuses vault trades on them; Moat cannot trade them. The site warns before you sign.
  • Token-2022 transfer hooks: coins with hooks cannot be withdrawn (pump.fun coins have none; exotic donated tokens could get stuck).
  • Vault rent (about 0.0019 SOL) is not refundable; pump.fun keeps the small volume-account rents.
  • Block-zero tax: a buy in a coin's creation slot pays pump.fun's block-zero tax, bounded by your signed minimum out. In practice a word-signed order does not land in slot zero.
  • Locator squatting can add junk candidates when the site looks for your vault; it keeps only the vault your words reproduce.

Errors you may see

BadSignature (6006)The signature does not match the vault: wrong words, or someone else trying.
BaseMismatch (6007) / BadLeaf (6008)Another signed action landed first, or the key was used. Review again; the site picks a fresh key.
BadDeadline (6009)The order expired. Review again.
SlippageExceeded (6014)The price moved past your signed minimum. Nothing moved.
Paused (6003)No new vaults and no buys for now. Sells and withdrawals always work.
PurseFloor (6016)A vault keeps the rent minimum or goes to exactly 0 SOL.

Program and API

Program id

Anchor 0.31.1, audited for this batch (no critical, high or medium issues open). The site's read API is public: /api/svc/config, /api/svc/vault/<address>, /api/svc/coin/<mint>, /api/svc/quote, /api/svc/feed, /api/svc/history/<vault>. It never sees your words.