Conditional Liquidity
A novel protocol-layer LP framework for Solana DEXs
Conditional liquidity (CL) is a protocol-layer LP framework built for Solana DEXs. It enables DEXs to express a JIT reaction to order flow of varying toxicities.
Without conditional liquidity, DEXs can tighten their quotes to attract more order flow, however they are unable to express a preference for non-toxic order flow. With conditional liquidity, DEXs are able to express a gradient of spreads to a range of different types of order flow.
Any DEX, ranging from AMMs to semi-automated market makers and onchain CLOB makers, can adopt conditional liquidity in order to express a preference for non-toxic order flow.
There are three major components that describe conditional liquidity:
- Dynamic Fees
- Segmenters
- Competition
Dynamic Fees
Today, DEXs broadcast a single spread that swappers must pay when trading. The magnitude of the spread is proportional to the tolerance of adverse selection risk. The tighter the spread, the more order flow the DEX is asking for, and the more risk-tolerant the DEX is. The wider the spread, the more risk-averse at the expense of volume of order flow executed.
Different types of order flow have different probabilities of adversely selecting the DEX. Order flow that is more likely to adversely select the DEX is known as toxic order flow, and order flow that is less likely to adversely select the DEX is known as non-toxic order flow. Conditional liquidity simply allows DEXs to charge a gradient of spreads for different types of order flow through introducing third party actors, known as segmenters.
Segmenters
Conditional liquidity utilizes a dynamic fee structure that leans on a new class of market participants, called segmenters.
Through conditional liquidity, DEXs can decide what proportion of the spread is paid to the segmenter as incentive for segmenting order flow correctly. DEXs enshrine segmenters by giving them the ability to decide which order flow is toxic and which is non-toxic, and control the spread just-in-time.
Initially chosen via centralized election, segmenters will eventually be elected to the Segmenter Registry via a decentralized vote. Segmenters can be removed from the Registry via a vote, or they can be slashed progressively until they are removed from the Registry.
Once segmenters are voted to the registry, they have a special ability to write to market state with fee controls.
Segmenter Competition
Segmenters compete against each other by segmenting order flow with the greatest degree of accuracy. Segmenters pass a portion of the spread given to them by the DEX to the trader in the form of price improvement. Segmenters have economic upside proportional to the quality of segmentation, as the greater they are able to perform segmentation, the more of the spread they can pass to the trader and wallet, and the greater the incentive for the wallet to send volume to the segmenter.
Segmenter Registry
The Segmenter Registry is a list of all segmenters that have been voted to the registry. The Segmenter Registry is used to track the performance of segmenters, and serve as a central point program for DEXs to discover segmenters.
The DFlow Aggregator is the first segmenter program. If interested in becoming a segmenter, please reach out to us through the Segmenter Intake Form.
Order Flow Monetization
Segmenters compete against each other to attract as much non-toxic wallet flow. Wallets will send order flow through the segmenters which offer their traders the best prices. In effect, the market tightens to the non-toxicity of the order flow through segmenter competition.
The DFlow Swap API allows these wallets to monetize the order flow by capturing the price improvement in the form of a
dynamic platform fee. Wallets earn purely off the non-toxicity of the order flow, rather than through transaction-by-transaction
MEV extraction, which is net harmful to the trader. In this example, DFlow Swap API allows the wallet to capture N - M
basis points
in revenue, or allow the price improvement to remain with the trader.