A vault no ed25519 key can open

Live on Solana

The vault program holds funds at an address that releases them only against a valid WOTS signature over the withdrawal. Each withdrawal spends one key of the vault’s identity, so the same signature can never move funds twice.

One round trip, on Solana

  1. Open a vault with 0.01 SOLlanded, slot 477,386,462
  2. Withdraw one lamport more than was signedrefused by the signature check, slot 477,386,485
  3. Withdraw the 0.01 SOL with the signaturelanded, 364,522 compute units, slot 477,386,491
  4. Replay the same withdrawalrefused: the vault is spent, slot 477,386,496

A withdrawal checks the signature and the Merkle path on chain, which takes far more compute than a plain transfer, so each one asks for 1,400,000 compute units.

The program

The vault program verifies the signature on chain

Whoever holds its upgrade authority can replace it, and the vault page names that key.

program
9jwdzbwtpwmfe2zcxJTrSozTdPjcuzVhKCtzhWewTEXQ
upgrade authority
3PeZuUWaHxzN49o6k3PW2pUnquccSkYo9FLZHD36CHwM

The Rust verifier and the browser signer share one scheme. The signature vectors and the withdrawal vectors are recomputed by the program’s own tests.

Why a withdrawal takes several transactions

A signature is 2,144 bytes and a full attestation is 2,436. A Solana transaction holds at most 1,232, so the signature is written into a buffer account in parts and the program verifies it from there.

One withdrawal, as 6 transactions
stepbyteswhat it carries
open45the root and the leaf this vault answers to
write 1880public seed + signature, from byte 0
write 2880signature, from byte 880
write 3672signature + authentication path, from byte 1,760
withdraw41the amount and the next vault. No account signs it.
close1the buffer’s rent, back to whoever paid it

2,432 bytes go into a 2,465 byte buffer, at most 880 bytes per write. The withdraw instruction has no signer: whoever submits it only pays the fee. The staged hash-based signature is the only thing that moves the funds.

Checking an attestation needs no wallet at all: verify one.