- Orderbook, RFQ, lending
- Spot, perpetuals, options
How a vault works
A vault is one subaccount with extra protocol state on top:- Shares —
total_sharesoutstanding across all holders (you included). A deposit mints shares; a withdrawal burns them. - NAV — the vault subaccount’s live mark-to-market value in USD, from the risk
engine.
share price ≈ NAV / total_shares. - High-water mark (HWM) — the highest share price the vault has reached. Performance fees only accrue on new gains above it — see Fees.
Fees
How management and performance fees accrue, the high-water mark, and the protocol’s share.
Process Deposits & Withdrawals
The settle loop: poll queued shareholder intents and settle each at a quoted price.
Trade
Run your strategy on the vault subaccount with the normal trading API.
Winddowns
Exit every holder, take total shares to zero, and close the vault.
Prerequisites
All of the steps in this guide can be done through the UX or SDKs.
- Create and fund an account on Derive.
- Create a session key with proper scopes.
Required Session Key Scopes
Choose your immutable parameters
You fix these when you create the vault. They shape what shareholders pay and what you earn.managerId
Choose between Standard vs Portfolio Manager. Managers also determine the risk universe — see Managers & Risk Universes.
depositSpotAsset
Spot asset shareholders deposit and withdraw in.
initialSharePriceUsd
Initial share price. See Choosing the Initial Share
Price.
managementFeeBps
Annualised management fee, in basis points, accrued pro-rata over time on NAV regardless of performance.
performanceFeeBps
Performance fee, in basis points, charged only on gains above the high-water mark relative to a benchmark.
benchmarkAsset
Performance fees charge only on outperformance versus that currency. Default benchmarks against USD.
maxSlippageBps
Maximum deviation of the share price during deposits / withdrawals from the oracle mark-to-market value of the vault.
cooldownSec
Minimum seconds between a holder’s last deposit and a withdrawal (prevents excessive churn).
maxFeeUsd
Maximum sequencer fee you authorise for this action, in USD. This fee covers the vault-creation fee ($1000).
Choosing the Initial Share Price
For most vaults,initialSharePriceUsd: '1' is the natural choice: shares start at
$1.00, and the share price thereafter reads directly as the vault’s cumulative USD
performance.
If your vault tracks a benchmark, consider seeding the share price at the benchmark’s
current spot price instead. One share then starts worth exactly one unit of the
benchmark, and the share-price-to-benchmark ratio becomes a live measure of relative
performance that shareholders can read at a glance. For example, launch an
ETH-benchmarked vault while ETH trades at $1,950 with initialSharePriceUsd: '1950':
a share is worth 1.0 ETH at inception, and if the vault outperforms ETH by 10%, a
share is worth 1.1 ETH — visible directly in the price, with no reference to when
anyone entered.
The seed price must lie between 0.01 and 1,000,000. When
benchmarkAsset is set, it must additionally be within 1000×
of the benchmark’s spot price in either direction.Global limits
Your config is bounds-checked at creation against a protocol-wide, deployment-set global config:Create the vault and resolve its id
vaultId is the vaultSubaccountId every other vault call takes.
Read it back
getVault is public — anyone can read any vault’s config and live pricing:
client.vaults.listVaults({ page, pageSize }) pages every vault on the exchange —
that is how shareholders will discover yours.
Set the metadata
updateInfo patches only the off-chain fields — the economics stay immutable.
Supply just the fields you want to change; the caller must be the vault’s curator.
Next steps
Process Deposits & Withdrawals
Your first shareholder is waiting: run the settle loop.
Fees
When and how the fees you just configured are actually paid.
Session keys
Run the settle loop from a scoped key, not the raw wallet.
