Offline vaults
An offline vault is an account on Solana that holds funds set aside for offline payments. Vouchers can only draw on a vault, never on an ordinary wallet balance. A merchant who accepts a voucher is therefore relying on money that was reserved in advance, rather than on a balance that could have been spent anywhere since.
What a vault holds#
Each vault holds one token (for example USDC) and splits it into two pots:
| Pot | Used for | Can the owner withdraw it? |
|---|---|---|
| Balance | Paying vouchers and the relayer tips on them | Yes, after a time lock |
| Bond | Covering merchants when a payer overspends or double-spends | Not in the current version |
The bond is posted when the vault is created and can be topped up later. It's covered in Bonds and penalties.
Who controls it#
A vault has two keys, which can be the same:
- Owner. Requests and completes withdrawals. This can be a wallet that stays online.
- Voucher signer. The key on the phone that signs payments. Every voucher must be signed by this key.
The vault's address is derived from the voucher signer and the token mint. That lets a merchant check offline that a voucher's vault really belongs to the key that signed it. The signer must also sign vault creation, so nobody can claim a vault address for someone else's key.
Limits#
Each vault sets its own limits when it's created. They can't be changed afterwards, so a payer can't tighten them to void vouchers they've already handed out.
| Setting | What it does |
|---|---|
| Per-payment limit | Largest amount a single voucher may carry |
| Maximum balance | Cap on the spendable balance, sized for everyday use |
| Maximum voucher lifetime | Longest a voucher may stay valid, up to 30 days |
| Withdrawal delay | How long a withdrawal waits. Must be at least the voucher lifetime, and at most 90 days |
Withdrawing#
Withdrawals happen in two steps. The owner requests an amount, which starts the time lock. Vouchers keep settling against the balance while the lock runs. When it ends, the owner receives whatever is left of the requested amount.
Because the delay is at least as long as a voucher can live, a voucher signed before the withdrawal request can still settle. If a payer is caught double-spending, the vault's withdrawals are frozen.
Funding#
Vaults hold a single SPL token. USDC is the intended payment currency. SOL can be swapped to USDC while you're online. Swap fees and slippage apply, swaps aren't available offline, and a small SOL reserve is needed for network fees.