Accounts, Sub-Accounts & Security
Account abstraction modes (Standard, Unified & Portfolio Margin), sub-accounts (up to 10), scoped API wallets (up to 50), native Multi-Sig, and dual-track Post-Quantum protection.
- Master and sub-accounts isolate positions, margin, liquidations, and Plan B request quotas—while pooling volume and net assets so the entire family shares your best VIP/MM tier.
- Always run trading bots on scoped API Agents (approveAgentScoped) rather than your master private key: agents have zero withdrawal or external transfer rights and can self-revoke via resignAgent.
- Dual-track Post-Quantum protection lets standard EVM wallets keep using MetaMask seamlessly while allowing security-conscious users to irreversibly lock accounts to ML-DSA-44/65 + SLH-DSA-128s cold recovery.
1. Account Modes (Standard vs Unified & Portfolio Margin)
Every account begins in Standard Mode and may opt into Unified Account or Portfolio Margin via userSetAbstraction:
Standard Mode (Default)
V1 Mainnet LaunchExplicitly separates perp_usdc (perpetual margin) and spot_usdc + spot token balances.
- Move USDC via usdClassTransfer; send externally via usdSend / spotSend
- Required account mode for Builder Fee recipient accounts
- Zero cross-product complexity for pure perp traders
Unified Account
Shared Spot + PerpPools USDC liquidity across Spot and native Perps (dex = 0) with automatic borrow/lend sweeps.
- Eliminates manual Spot ↔ Perp usdClassTransfer calls
- Uses sendAsset for transfers (usdSend / spotSend rejected)
- Supports native borrowLend supply/withdraw
Portfolio Margin
Cross-CollateralCross-collateralizes eligible spot assets and borrow/lend reserves against perpetual margin.
- Eligibility: accountValue >= 10k USDC or cumVlm >= 5M USDC, and accountValue < 25M USDC
- Uses sendAsset + borrowLend with live mark LTV haircuts
- Mainnet V1 launches Standard Cross/Isolated first before activating borrow-lend reserves
- Account Activation Fee: Sending funds via
usdSend,spotSend, orsendAssetto an unseen address deducts a one-time0.1 USDCactivation fee. Bridge deposits (deposit()) do not incur an activation fee.
2. Master Accounts & Sub-Accounts (Up to 10)
| Property | Scope | Exact Behavior |
|---|---|---|
| Margin, Positions & Liquidations | Per Account | Strict isolation—a liquidation on one sub-account never impacts the master or sibling sub-accounts |
| VIP & MM Qualification | Pooled to Master | 30d weighted volume, hourly net assets (+ 2× MMV), and 7d/30d maker share roll up to master; every sub-account inherits the family's best fees and per-account open_order_cap |
| On-Chain Request Budget (Plan B) | Per Account | Master gets vip_base (10k – 10M); each sub-account starts independently at 10,000 + floor(own_cumVlm) + own_surplus so a buggy bot cannot starve sibling accounts |
| Sub-Account Cap | Master Tier | 0 at VIP 0 (unlocks 2 at >= 100,000 USDC cum vol) → 3 (VIP 1) → 4 (VIP 2) → 5 (VIP 3) → 6 (VIP 4 / MM 1) → 8 (VIP 5 / MM 2) → 10 (VIP 6 / MM 3). Downgrades never delete or freeze existing sub-accounts |
| Creation & Capital Moves | Master Only | Only the master calls createSubAccount (1–16 byte name; no nested sub-accounts) and moves funds via subAccountTransfer, subAccountSpotTransfer, or subAccountDirectTransfer |
3. Role & Permission Matrix (Master vs Scoped Agents vs Multi-Sig)
| Capability | Master Wallet | trade Agent | cancelOnly Agent | reduceOnly Agent | tradeAndTransfer Agent | Native Multi-Sig |
|---|---|---|---|---|---|---|
| Place / Modify Opening Orders | ✅ | ✅ | ❌ | ❌ | ✅ | ✅ |
| Place Reduce-Only Closes | ✅ | ✅ | ❌ | ✅ (Perp) | ✅ | ✅ |
Cancel Orders / massQuote Cancel | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Update Leverage & Isolated Margin | ✅ | ✅ | ❌ | ❌ | ✅ | ✅ |
| Arm / Clear Dead-Man's Switch | ✅ | ✅ (scoped) | ✅ (scoped) | ✅ (scoped) | ✅ (scoped) | ✅ |
Internal Perp ↔ Spot (agentSendAsset) | ✅ | ❌ | ❌ | ❌ | ✅ (dex 0 ↔ Spot) | ✅ |
Withdraw to EVM (withdraw3) | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ |
External Transfers (usdSend / sendAsset) | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ |
| Create Sub-Accts / Approve Agents & Builders | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ |
Protocol Vault (userVaultTransfer) | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ |
Scoped API Agent Guardrails (approveAgentScoped)
- Fine-Grained Scope JSON: Restrict any agent to specific
"allowedMarkets"(up to 256),"allowedSubaccounts"(up to 64),"allowMaster": false,"maxLeverageCap", and"maxOrderNotional". - Family Quota (
5 – 50): Scales transparently by VIP/MM tier (5at VIP 0,10at sub-account unlock, up to50at VIP 6 / MM 3; Protocol MMV operator holds a 64-agent floor). - Expiry, Freshness & Self-Revocation: Max validity
180 days; target addresses must be fresh (no prior balance or role); any agent can immediately revoke itself viaresignAgentwithout bringing the master key online.
4. Native Multi-Sig (VMultiSig & MultiSigPq)
Convert any master account into an on-chain -of- Multi-Sig via convertToMultiSigUser:
VMultiSig: Up to10authorized signers (MAX_AUTHORIZED_USERS = 10). Authorized signers cannot themselves be multi-sig accounts or API agents.MultiSigPq: Up to16signers supporting hybrid or pure post-quantum (ML-DSA-44/ML-DSA-65) inner proofs under a dedicated domain-separated digest.
5. Dual-Track Post-Quantum Account Protection
Standard EVM wallet (MetaMask, Ledger, HL SDKs). EIP-712 signing with scoped API agents. Zero change required.
Permanently disables legacy secp256k1 on L1 while keeping your same 0x address, open positions, and resting orders. Optional offline SLH-DSA-128s cold key rotates primary key via RotatePqKey.
Address derived deterministically via BLAKE3("vcore/addr/pq/v1" || scheme || pk). Never had a secp256k1 key. Activates on first signed tx once funded with any USDC or spot balance.
Transition Rules & Key Lifecycle
- One-Way Lock (
BindPqLock): Requires both your existingsecp256k1signature and a proof-of-possession signature from your newML-DSA-44orML-DSA-65key (plus optional 32-byteSLH-DSA-128scold recovery public key). Atomically revokes all legacy ECDSA agents, cancels their TWAPs, and disarms their Dead-Man's Switches—while keeping all open positions and resting CLOB orders untouched. - Cold Key Rotation (
RotatePqKey): Rotate a compromised primary PQ key offline using yourSLH-DSA-128srecovery key (or active primary key). Incrementsauth_epoch, atomically revoking all prior-epoch PQ agents, their TWAPs, and their DMS. - Scoped PQ Agents (
ApprovePqAgent): Delegate trading to post-quantum agent keys pinned to your currentauth_epoch. - Seamless Bridge Withdrawals (
withdraw3): BothPqLockedandNativePqOnlyaccounts signwithdraw3using their post-quantum key and may withdraw USDC to any non-zero EVM destination address (such as a fresh cold hardware wallet whose public key has never been revealed on EVM).
- Master Wallet: Cold hardware wallet (or
2-of-3Multi-Sig), optionally locked viaBindPqLock(ML-DSA-44primary + offlineSLH-DSA-128srecovery). - Sub-Accounts: Create one sub-account per strategy (
btc-mm,eth-arb,delta-hedge) for isolated liquidation boundaries and independent Plan B request budgets. - Scoped Agents: Authorize dedicated
approveAgentScopedkeys with"allowMaster": false, pinned to each sub-account's"allowedSubaccounts","allowedMarkets", and"maxLeverageCap". - Protections: Enable Entity STP (
setEntityStp) on the master to block accidental cross-strategy wash trades, and arm market-scopedscheduleCancelon every live quoting engine.
Frequently Asked Questions
No. BindPqLock keeps your exact 20-byte 0x address, open positions, balances, and resting orders intact. Only legacy secp256k1 signatures and pre-existing legacy agents are retired; you continue trading via PQ /exchange JSON or ApprovePqAgent, and withdraw3 lets you withdraw USDC to any valid EVM address on Base or Arbitrum.
Neither. Margin and liquidations are strictly isolated per account, and under Plan B every sub-account has its own independent on-chain AddrLimit (10,000 + floor(own_cumVlm) + own_surplus). Pinning the bot with approveAgentScoped ("allowMaster": false) guarantees it cannot touch the master or sibling sub-accounts.