Why not a general-purpose VM
General-purpose VMs exist to make unknown programs safe to run over shared state. That leads to bytecode verification, reentrancy protection, and conflict detection under parallel execution — mechanisms necessary for open composition but which introduce non-determinism and attack surface. More importantly, a general-purpose VM makes every transaction an opaque state transition from the protocol’s perspective. The protocol can say “this transaction’s signature is valid and it did not abort.” It cannot say “this transaction was a cancel of order 42 at price-time priority 17.” For financial infrastructure, the protocol must know.The closed instruction set
IntentionKernel’s instruction set is a small, stable enumeration. Everything a user or validator can do is one of:- Order operations. Placement, cancellation, and replacement of limit, market, and conditional orders. Time-in-force variants (GTC, GTD, IOC, FOK, post-only, AON), the reduce-only flag, and stop-loss / take-profit triggers are enumerated at the protocol level.
- User configuration. Subaccount creation, leverage adjustment, position-mode selection (cross/isolated; net/hedged).
- Administrative configuration. New-market listing, fee schedule updates, risk-tier definitions — authorized by governance.
- Transfers. Internal subaccount transfers, account-to-account transfers, cross-chain deposits and withdrawals.
- Agent authorization. Approval and revocation of scoped delegate permissions.
- Vault operations. Creation, deposits, withdrawals, and configuration of pooled-liquidity vaults.
- Validator-emitted operations. Price quorum submissions and reconfiguration transactions.
The closed-world model has three consequences: the complete system behavior is a finite union of per-instruction transition functions (enumerable for audit), every operation has fixed cost (no dynamic fee market required), and classification from transaction to execution path is a pure function of the typed payload.
Deterministic priority scheduling
Within each block, IntentionKernel processes transactions in a protocol-defined priority order:- System and consensus operations
- Administrative configuration
- Deposits
- User configuration
- Post-only passive orders
- Transfers
- Cancellations
- Aggressive order placements that may take liquidity
State object categories
The kernel’s global state is five categories of protocol-maintained objects:- Accounts and subaccounts — isolated risk and balance containers with position-mode settings, fee tiers, balances, positions, and per-instrument leverage. All fields are fixed-point integers; no floating-point arithmetic appears on the execution path.
- Positions — per-instrument long and short exposure, separate IM and MM quotas, a funding-accumulator snapshot, and bankruptcy prices.
- Order books — two sorted maps per market (bid and ask), keyed by integer subtick units, with FIFO chains of resting orders at each level.
- Price quorums — the most recently certified price vector, with the round and epoch of certification and the aggregate signature proving stake-weighted endorsement.
- System parameters — market configurations, fee schedules, risk parameters, insurance fund state, validator set, and upgrade-signaling state.