Transaction throughput

With StarkEx, you can confidently process more than 1,000 transactions per second (TPS).

The StarkEx architecture realizes this throughput by validating transactions in the following stages:

  1. The StarkEx gateway executes an initial, stateless validation.

  2. The StarkEx batcher executes a complete, stateful validation.

Initial validation: Stateless

The StarkEx gateway validates transactions in parallel for stateless criteria, such as formatting and value ranges. The gateway supports 1,000 TPS.

Secondary validation: Stateful

StarkEx batches and validates all transactions according to more complex criteria. This stage of validation is sequential, as the validity of a transaction is often determined by its predecessors. For example, a withdrawal is only valid after a deposit.

The throughput at this stage is therefore less than that of the gateway. The exact throughput depends on the type of transaction.

Table 1. Typical sample of StarkEx throughput in TPS

StarkEx Spot Trading

MintRequest: 200 TPS.

The StarkEx backend can process 200 MintRequest transactions in one second, as observed in a live StarkEx-powered application in production.

StarkEx Perpetual Trading

Trade: 40 TPS.

The StarkEx backend can process 40 Trade transactions in one second, as observed in a live StarkEx-powered application in production.

Although this stage is slower than that of the gateway, once the gateway acknowledges that the transaction passes initial validation, you can be confident that the transaction will be executed and you can present the transaction as complete in the application’s frontend, without waiting for finalization onchain. Exceptions are rare, but causes include bugs in one of the systems, or a reorganization of the blockchain.

In the rare case that an exception does occur, StarkEx requests that you send one or more alternative transactions. For more information, see Invalid transactions and alternative transactions.

Additional resources