Skip to content

The Vault

The Vault is an on-chain smart contract that holds deposited tokens with per-user ledger balances. It is the foundation of trading on Sera.

Non-Custodial Design

The Vault is fully non-custodial. Your tokens remain in the smart contract under your address — Sera's off-chain services do not custody your funds. Deposits, freezes, settlements, and withdrawals are enforced by the contracts. User-authorized actions rely on signed wallet approvals, so review token, amount, and recipient fields before approving.

Why the Vault Exists

The Vault exists to make collateral available for settlement. When you trade on Sera, you want confidence that when your order is matched, the other side has already committed the required funds. Pre-deposited balances reduce counterparty funding risk at settlement time.

Without the Vault, tokens would need to be pulled from wallets at settlement time. If the counterparty's wallet no longer had sufficient funds, the trade would fail — leaving you with a matched order that can't settle. By requiring pre-deposited collateral, the Vault makes on-chain settlement more reliable for all participants.

Note

Swaps do not require a Vault deposit — tokens are handled at execution time. The Vault is only required for limit orders and Virtual Liquidity batches.

Balance Types

Balance Description
Wallet balance Tokens in your Ethereum wallet (not yet deposited)
Vault available Tokens in the Vault, ready to be used for new orders
Vault frozen Tokens locked in open orders — still in the Vault contract under your address, not held by Sera
Vault total Available + frozen

You can check all balances via GET /balances.

Deposit & Withdraw

Depositing moves tokens from your wallet into the Vault contract. The API builds unsigned transactions for you — your frontend signs and broadcasts them. See Deposit for the full flow.

Withdrawing moves tokens from the Vault back to your wallet using a dual-signature instant withdrawal. See Withdraw for details.

Emergency Withdrawal

If Sera's API ever becomes unavailable, you can recover Vault balances — including frozen balances — by calling emergencyWithdraw() directly on the Sera smart contract. This is a two-step process with a ~24 hour delay to prevent abuse and provides an on-chain fallback that does not rely on Sera's API.

See Emergency Withdrawal for details.