Temporal Liquidity Book
In the evolving landscape of Cardano DeFi, the Temporal Liquidity Book (TLB) emerges as a groundbreaking concept designed to address the inherent limitations of existing Cardano DEX mechanisms. This framework introduces principles and technologies to enhance transparency, capital efficiency, and composability for Cardano DeFi.
To fully understand the concept, it is necessary to fully understand the current problems with DEXes in the Cardano ecosystem.
Cardano DEXes: The Status Quo
The journey of DEXes on Cardano has been shaped by the blockchain's eUTxO model, which presents distinct challenges in adapting protocols like Uniswap that were originally designed for Ethereum's Account model. This has led to innovative but complex solutions and highlighted limitations inherent in the classical DEX design on Cardano.
Classical DEX Design on Cardano
The classical approach to implementing DEX protocols on Cardano involves creating on-chain orders that interact with shared liquidity pools. Unlike the Ethereum Virtual Machine (EVM), where users can transact directly with liquidity pools, the eUTxO model requires all inputs of a transaction to be deterministic. This necessity stems from the model's design to prevent race conditions and ensure transactional integrity, which, in practice, means that simultaneous orders to a shared liquidity pool can lead to only one successful transaction at a time, with others needing to be refunded and recreated.
To navigate this, Cardano's DEXes synchronize user access to liquidity pools through on-chain orders, which are picked up and executed by off-chain bots (aka "batchers"). These orders are encoded into a UTxO carrying an input value and are guarded by a validator script. This script ensures that the order is executed at a fair price by referencing a specific liquidity pool at the time of execution, thereby requiring a precise pool specification to read the fair price.
Limitations of Classical Design
Lack of Transparency: The reliance on off-chain execution mechanisms introduces a layer of opacity. Users are often unaware who will execute their orders, nor do they have control over the process. This can lead to a monopolistic environment where only a select few have permission to execute transactions off-chain, although the best practice involves allowing permissionless execution. The competition among agents to execute orders and earn fees is complicated by practices like frontrunning or Blockchain Extractable Value (BEV), where value is extracted from users beyond the transaction fees, further obscuring the execution process and disincentivizing beneficial actors.
Capital Inefficiency and Poor User Experience: The requirement for on-chain orders necessitates additional transactions for order placement and execution, incurring higher fees for users. Furthermore, in instances of order failure due to factors like price slippage or expiration, an extra transaction is needed to redeem the funds locked in the order, exacerbating inefficiencies.
Absence of Composability: The specificity of orders to work with concrete implementations of liquidity pools severely limits the ability to compose orders with different sources of liquidity. This not only restricts flexibility in the order execution process but also hinders the interoperability and efficiency of DEXes across the Cardano ecosystem, making it highly inefficient to leverage liquidity across different exchanges.
Temporal Liquidity Book
The TLB concept is introduced as a transformative solution to the inherent challenges posed by the UTxO model in on-chain trading, particularly the issues of fragmented liquidity and opaque off-chain execution systems. The framework is designed to upgrade the way liquidity is aggregated and orders are executed, offering a universal and transparent approach.
Universal Liquidity Composition
At the heart of the Temporal Liquidity Book is the principle of Universal Liquidity Composition, a novel approach that envisions aggregating all available market liquidity—composing Automated Market Makers (AMMs), limit orders, and programmable orders—into a unified 3-dimensional space defined by Price, Volume, and Time. This conceptual framework allows for the matchmaking logic of all liquidity types to be governed by a universal set of rules, enabling seamless interaction between diverse liquidity sources.
MEV Resistance
The TLB framework introduces resistance to Miner Extractable Value (MEV) and related forms of exploitation such as frontrunning. We assume that the behavior of off-chain executors will be the same long term because otherwise they will be punished and hence no longer earn execution fees. The framework addresses these concerns through two mechanisms:
Order Steering: This mechanism allows orders to be directed towards a selected subset of off-chain executors, rather than being broadcasted indiscriminately. This targeted approach reduces the potential for MEV and other exploitative practices by limiting the exposure of orders to potentially malicious actors.
Execution Assessment: The quality of order execution is assessed using a dynamic set of metrics that are evaluated directly by the client (within the user's chosen DEX application). This assessment enables orders to be automatically allocated to executors that consistently provide the best execution in terms of price and speed. The execution assessment combines an off-chain service, which aggregates relevant on-chain data and offers a user-friendly interface for querying this data, with a client-side SDK developed in Typescript. This dual-component system ensures that the assessment process is both comprehensive and accessible to users.
Execution Engine
The Execution Engine is the implementation of the TLB concept. Since the system aims to be open and transparent anyone can run the Engine and become an Execution Engine Operator (EEO).
Learn more about Execution Engine
You can learn more about the TLB concept by referring to the Spectrum Bloom White Paper.
Last updated