Skip to main content

What is BULK

BULK is a specialized execution layer that runs sophisticated risk, order book, and matching systems natively. BULK handles what requires purpose-built infrastructure: low-latency order matching, BULKBFT consensus on transaction ordering, and real-time risk management. The Solana bridge handles deposits, withdrawals, and asset custody on Solana.

Validators

Misbehavior in BULK Net results in protocol penalties (jailing), creating direct economic consequences.

Architecture

The core architecture separates pure protocol logic from I/O. Protocol crates (bulk-consensus-proto, bulk-core-proto) contain deterministic state machines - decision algorithms, type definitions, risk calculations. No network calls, no disk I/O. I/O layers (bulk-consensus, bulk-relay, bulk-core) wrap these and handle network transport, database persistence, and bridge connectivity. This means the consensus and execution logic can be verified, simulated, and tested independently of any specific network implementation.

Order Lifecycle

1. Order Ingress

Traders submit signed transactions via the HTTP API or WebSocket. The ingress layer hashes each transaction for deduplication and broadcasts it to the validator set via authenticated Noise-protocol channels.

2. Consensus

Validators exchange compact transaction sketches (minisketch) and reconcile to agree on the transaction set for each round. BULKBFT consensus produces a CommittedBatch - the canonical set of transactions for that round, agreed upon by a supermajority. See BULKBFT Consensus for protocol details.

3. Taker Speed Bump

Transactions containing an action that may take liquidity are held for 25 ms. Transactions without a taker-capable action, including ALO-only order flow, remain immediately eligible. When the delay completes, held transactions join the next eligible execution batch. See Taker Speed Bump for classification and cancel behavior.

4. Deterministic Ordering

Eligible transactions pass through a deterministic shuffle seeded by the consensus-derived batch timestamp, then separate into priority queues (cancels, then post-only, then regular orders). See Fair Ordering for the full design.

5. Execution

Every validator processes the ordered batch through the identical matching engine. Pre-flight margin checks, book matching, risk callbacks, and state updates are all deterministic. Any validator that produces a different output state is immediately detectable. See Matching and Execution for the executor pipeline.

6. Settlement

Deposits and withdrawals settle on Solana through the Solana bridge.