Defi, DEX

The first, fully decentralized Spot DEX


Back to blockchains. The order in which transactions are executed is key. Hence why so many blockchains operate by applying transactions in sequence. One at a time. Carrying out all transactions in sequence without any concurrency ensures the integrity of the blockchain. The drawback of this is that handling transactions in sequence is slow, and if your overall transaction throughput is low, then on-chain programs which require substantial transaction throughput, like an on-chain DEX, will suffer.

With laminar flow, if particles don’t interact with each other, then they can travel in tandem. Similarly, if transactions don’t interact with each other, they can be executed in tandem.

Enter Aptos. Aptos uses Block-STM, a parallel execution engine for smart contracts. At a high level, this technology allows transactions to be executed and validated on multiple threads at once via a mechanism which checks dependencies between them. In a simple sense, if 2 or more transactions don’t affect each other, they can be applied in parallel.

If we were to consider typical transactions that an exchange or DEX deals with, a significant portion of these will not overlap. For example, when canceling orders in the limit order book, or entering orders at different levels of the orderbook. As such, Block-STM is enormously promising for building a resilient DEX.

What is Laminar Flow

Why we call our DEX Laminar? In fluid dynamics, laminar flow occurs when the particles of a fluid travel in smooth paths together, without any disturbance or lateral mixing. Think of it this way — particles can travel together and past one another where they don’t affect other particles in other pathways.