Skip to content

Terminology and units

Identities

Term Meaning
account An address registered in AccountCore
account ID Canonical nonzero uint40 identifier used in protocol storage and events
root account Account that owns itself and may create subaccounts
subaccount Separate address and balance namespace linked to one root by signed consent
delegated signer Address authorized for a permission mask and optional expiry
builder Approved integrator that may receive a separately quoted action fee
market ID Globally allocated nonzero uint32 ID for a perpetual market
cross namespace 0 Engine-local accounting ID for cross margin; it is not a tradeable market

Numeric units

Value Representation
base size / base lots Integer quantity scaled by the market's sizePrecision
price Integer value scaled by pricePrecision and required to align to tickSize for user orders
quote amount Atomic units of the market or Engine quote token
quote scale 10 ** quoteTokenDecimals; perpetual quote assets are limited to a scale accepted by AccountCore
PPS fee/risk factor Parts per 10,000,000. One basis point is 1,000 PPS; one percent is 100,000 PPS
leverage E6 Leverage scaled by 1,000,000
native asset address(0), representing native MON; its configured decimal scale is 18

Quote conversion is intentionally path specific. Current Spot reserve and fee calculations use floor division. Perp credits round down, while Perp maker reserve, action-fee debits, and risk requirements round up. Documentation and clients must preserve the exact function's stages and direction rather than using one generic conversion.

Order terms

Term Meaning
GTC Match immediately, then rest an admissible residual
IOC Match immediately and discard the residual
FOK Revert unless the requested size fills completely
post-only / ALO Do not take liquidity; a fresh crossing placement is skipped, while cancel-first packed replacement has already removed the old order before skipping the new quote
maker slot Account-local packed storage slot for a resting order
minSizeAfterBlock Strict block threshold only; once block.number is greater, visible size is capped to the market minimum executable size derived at that order price
client order ID Action-level correlation value echoed in packed orderbook events; not the canonical on-chain order identity
order ID Market-local monotonic identity stored in a maker slot

Market states

Orderbook execution state uses ACTIVE, SOFT_PAUSED, and HARD_PAUSED. State severity increases in that order. Emergency may tighten risk; only governance or ops may loosen it.

Perpetual Engine market status is separate: ACTIVE or PAUSED, plus CLOSE_ONLY and REDUCE_ONLY flags. The Engine status controls normal accounting admission, with dedicated exceptions for cancellation/release and liquidation; the orderbook state independently controls whether each FIFO entrypoint may run.

Margin terms

Term Meaning
cross margin One collateral namespace shared by an account's positions within one quote-specific PerpEngine
isolated margin Collateral namespace dedicated to one account-market position
maker-fee reserve Quote collateral prepaid when a perpetual maker order rests
effective collateral Deposited margin plus risk-adjusted positive PnL, full negative PnL, and unsettled funding, as calculated for a specific health view
IM Initial-margin requirement for opening risk and normal transfers
cancel margin Threshold used by liquidation start/cancellation logic
MM Maintenance-margin threshold used to determine liquidatability and recovery
takeover margin Lower terminal threshold at which namespace transfer may be used

Positive unrealized PnL may be discounted by market configuration. It is a health input, not a token balance, and does not make unallocated AccountCore funds part of the margin namespace.

Event terms

  • L2 means aggregated visible size by price.
  • L3 means individual maker orders and queue position.
  • TradesPacked records execution-induced changes.
  • BookUpdatesPacked records new resting liquidity and non-trade deletion.
  • Spot and perpetual book-update records have different lengths and metadata; decoders must select the schema by product/contract.

For both current orderbook products, an empty ask is returned as 0, while an empty bid is returned as type(uint32).max. The Spot interface comment that says both absent sides are zero is stale at this snapshot.