Withdrawal security
What the program checks before any assets leave a vault, where vault assets live, and how the Liquidity Vault is protected.
To withdraw, your device signs a message describing exactly what you want — which shares, to which destination, before which slot. The program then:
- rebuilds your root from the signature and checks it matches,
- checks the key has not been used before, and marks it used,
- burns your shares and sends assets only to the signed destination.
Your login wallet can pay the fee, but it cannot authorize the withdrawal by itself.
On-chain withdrawal verification
Build
Your browser builds the domain-separated message.
Sign
Your post-quantum key signs locally. The secret never leaves your device.
Submit
Any wallet pays the transaction fee. It gains no authority by doing so.
Verify
The program rebuilds the Merkle root from the signature and compares it to yours.
Consume
The program checks q ≥ next_q, advances it and the sequence, and debits your balance.
Settle
Assets move to the signed destination.
Measured figures
| Value | Note | |
|---|---|---|
| Signature | 2,508 bytes | staged across 3 transactions |
| Compute | 101–111k CU | of the 1.4M limit |
| Buffer rent | Refunded | when the signature buffer closes |
These figures were measured on a local validator.
Program Derived Addresses
Vault assets sit at addresses deliberately off the Ed25519 curve. No private key exists for them — only the program can sign.
vault = find_program_address(["vault"], program_id)
position = find_program_address(["position", SHA-256("QLP/position/v1" ‖ initial_key)], program_id)Your position derives from your first post-quantum key, survives key rotations, and stores no Ed25519 owner.
The Liquidity Vault
The Liquidity Vault is one full-range Meteora DAMM v2 position, owned by a QLP program address. Depositors get non-transferable shares bound to their post-quantum position — not SPL tokens.
- Withdraw, claim and compound each need a fresh LMS signature.
- They use the same verifier, key index and sequence as the Safe Vault — one key state for both.
- Slippage bounds and the destination are signed, so a relayer cannot redirect funds.
- Contributed permanent liquidity goes to DAMM's
permanent_lock, which is irreversible.
message (202 bytes, built by the program) =
"QLP/lp-vault/v1" ‖ cluster_tag ‖ action ‖ program_id ‖ lp_vault ‖ position ‖
key_epoch ‖ sequence ‖ q ‖ shares ‖ min_a ‖ min_b ‖ destination_kind ‖ destination ‖ expiry_slotWithdrawing to a conventional wallet leaves post-quantum protection. Choose the Safe Vault as the destination to stay behind LMS. See scope of protection.