TradingAccount Abstraction Modes

Account Abstraction Modes

GX Exchange supports three account modes that govern how balances, margin, and rate limits are applied. Users can switch between modes at any time.

Modes

Standard Mode

The default mode for all new accounts.

PropertyValue
Balance modelSeparate perp and spot balances
Daily action limitUnlimited
Pre-alphaNo
Eligible assetsAll

Standard mode maintains separate balance pools for perpetual and spot trading. Users must explicitly transfer collateral between the two pools. There is no daily action limit, making this mode suitable for high-frequency traders and market makers.

Unified Account Mode

A streamlined mode for most active traders.

PropertyValue
Balance modelSingle balance per asset
Daily action limit50,000 actions/day
Pre-alphaNo
Eligible assetsAll

Unified Account mode merges perpetual and spot balances into a single pool per asset. Collateral is automatically available for both perpetual positions and spot orders without manual transfers. The 50,000 daily action limit (resetting at 00:00 UTC) prevents excessive state growth.

Portfolio Margin Mode

Advanced cross-asset margin for institutional traders.

PropertyValue
Balance modelUnified across eligible assets
Daily action limit50,000 actions/day
Pre-alphaYes
Eligible assetsUSDC, BTC, HYPE

Portfolio Margin mode enables cross-asset collateral, where positions in one asset can be margined by holdings in another eligible asset. Currently in pre-alpha with support for USDC, BTC, and HYPE as collateral. See Portfolio Margin for the full specification.

Switching Modes

Users switch between modes by submitting a SetAccountMode action. Constraints:

  • Switching to the same mode returns an AlreadyInMode error
  • Switching from Standard to Unified merges balances automatically
  • Switching from Unified to Standard splits balances back into separate pools
  • Open positions and orders are preserved during mode switches
  • The daily action counter resets when switching modes

Daily Action Limit

Unified Account and Portfolio Margin modes enforce a limit of 50,000 actions per UTC day:

  • The counter resets at 00:00 UTC each day
  • Each order, cancellation, transfer, or modification counts as one action
  • When the limit is reached, further actions are rejected until the next UTC day
  • Standard mode has no action limit

The action limit prevents a single account from generating excessive state writes that could impact consensus performance.

Mode Comparison

FeatureStandardUnifiedPortfolio Margin
Separate perp/spot balancesYesNoNo
Cross-asset collateralNoNoYes (USDC, BTC, HYPE)
Daily action limitNone50,00050,000
Best forHFT, market makersMost tradersInstitutional
StatusStableStablePre-alpha