Security model

This page sets out what the design protects against, what it doesn't, and the issues still open. It will be updated as the issues are resolved. An independent audit is required before any mainnet deployment.

What's enforced on-chain#

  • Authenticity. Every voucher must carry a valid ed25519 signature from the vault's voucher signer, verified by Solana's native ed25519 program.
  • Replay protection. A redeemed sequence number can never be redeemed again.
  • Double-spend detection. Two different vouchers with one sequence number are detected, and the second merchant is compensated from the bond.
  • Expiry and limits. Lifetimes, per-payment limits, tip caps and clock skew are all checked.
  • Withdrawal time lock. Payers can't empty a vault faster than their outstanding vouchers can settle.
  • Domain separation. Signed messages start with a prefix that can never begin a Solana transaction, so a voucher signature can't be reused as a transaction signature.

What isn't guaranteed#

  • Delivery. The mesh is best effort. A voucher may never reach anyone who can settle it.
  • Funds. A merchant can't see the vault's balance offline. Protection is limited to the bond.
  • Device security. A compromised or unlocked phone can sign payments up to the vault's limits.
  • Assets. USDC depends on its issuer. Solana network fees and conditions apply.

Open issues#

  1. Secure Enclave can't hold ed25519 keys. Apple's Secure Enclave and Android StrongBox support P-256 keys, while vouchers use ed25519. The options are to encrypt the ed25519 key at rest under a hardware-backed key, or to switch vouchers to P-256 and verify them with Solana's secp256r1 program.
  2. Overspend ordering applies within a batch only. Across transactions, the first to settle is paid first, and the payer sets created_at.
  3. A payer can drain their own bond. They can do this by double-spending to an account they control before honest merchants claim. A claim delay, or pro-rata payouts, would fix it.
  4. Vault state isn't visible offline. Signed vault snapshots cached on phones and shared over the mesh are one option.
  5. The replay window is 128 sequence numbers. A voucher is lost if a sequence number at least 128 higher takes its slot before it settles.
  6. No vault closing. The bond can't be withdrawn yet, and double-spend claim accounts can't be closed.
  7. Token-2022 is untested. Mints with transfer fees or transfer hooks would break the vault's accounting.
  8. Cross-cluster replay. Reusing a devnet program id on mainnet would give identical vault addresses. Mainnet needs a new program id or a cluster tag in the signing domain.

Reporting a vulnerability#

Security contact details will be published before the public beta.