Author: Bitget Wallet Research Institute
introduction
In the world of decentralized finance (DeFi), liquidity was once considered a nearly unconditional public good—pools of funds open 24/7, welcoming all trades. However, this traditional "passive liquidity" model is increasingly revealing its inherent fragility, placing ordinary users and liquidity providers (LPs) at a natural disadvantage against those with information advantages. Today, a profound transformation known as "conditional liquidity" is brewing, attempting to inject intelligence and rules into the core of liquidity. In this article, the Bitget Wallet Research Institute will explore how it fundamentally rewrites the risk landscape and fair contracts of DeFi transactions.
1. The Hidden Costs of DEX: The Intrinsic Dilemma of Passive Liquidity
In traditional decentralized exchanges (DEXs) based on automated market makers (AMMs), the liquidity provider (LP) pool of funds is like a 24/7 public square, open to all traders. This seemingly fair "passive liquidity" model, however, exposes its fatal vulnerability in the millisecond-scale battlefield of high-performance public chains like Solana. Complex transaction paths and extremely short latency create the perfect conditions for "sandwich attacks," front-running, and other "toxic order flow" (toxic order flow). Professional arbitrageurs with information advantages and high-computing machines can accurately capture every tiny market fluctuation or large order, and precisely execute arbitrage trades. (See the classic "Sandwich Attack" image below as an example.)

Source: CoW DAO
The cost of all this is ultimately borne silently by the other two types of participants: ordinary traders face serious slippage problems, which severely impact their trading experience; while the long-term returns of liquidity providers (LPs) are continuously eroded.

Data source: compiled based on public information
Conditional Liquidity (CL) was born to address this dilemma. Pioneered by DFlow, a DEX aggregator, this new model aims to transform liquidity from a passive "static pool" into a proactive "smart gatekeeper." Its core concept is clear: instead of being unconditional, liquidity provision can be intelligently judged based on real-time data such as the toxicity of order flow, adjusting its quote accordingly. This dynamic, rules-based response fundamentally aims to address the current unfair trading landscape and provide tangible protections for both ordinary users and limited partners.
2. Intelligent Attack and Defense: Dual Filtering Mechanism for Conditional Liquidity
Conditional Liquidity (CL) establishes a smarter, more resilient market microstructure by protocolizing complex decision-making logic. Its implementation relies on two core components: the Segmenter for risk identification and order stratification, and Declarative Swaps for secure and efficient execution.
Segmenter: Risk identification and label endorsement
Segmenter is the "analytical brain" of the Conditional Liquidity (CL) framework. Its core functions can be summarized into two steps: risk assessment and label endorsement.
First, Segmenter performs a real-time, behavior-based risk assessment on every order flow entering the system. This analysis may include metadata such as the source path of the trade request, the initiator's historical behavior patterns, the frequency and speed of submissions, and whether price detection is performed across multiple platforms.
Secondly, based on the above analysis, Segmenter will attach the evaluation results to the order in the form of a signed endorsement, giving it a final "toxicity label." This label can be a binary judgment like "toxic & non-toxic" or a multi-level rating operation. However, this label is not a simple "allow or reject" switch, but a key signal to activate differentiated services (rates and routing objects), which will guide the selective supply matching of liquidity:
- For order flows marked as “non-toxic” (generally considered to come from ordinary retail users or passive strategies), the system will guide the market to provide them with better quotes, more concentrated liquidity depth and lower transaction fees to reward and protect healthy trading behavior.
- For order flows marked as "toxic", the system will match higher fees, wider bid-ask spreads, stricter transaction limits, or directly refuse to provide liquidity under preset extreme conditions, so that high-risk behaviors bear the transaction costs they deserve.

Source: Helius, DFlow
In this way, the conditional liquidity system transforms the complex risk control strategies that were previously hidden deep in the AMM's internal servers into transparent and standardized protocol layer capabilities, achieving effective stratification and pricing of traffic with different risk levels, and effectively distinguishing between regular users and arbitrageurs.
Declarative Swaps: Intent-Driven and Secure Execution
To ensure that the segmenter's analysis can be executed accurately and securely, the Conditional Liquidity (CL) framework adopts "Declarative Swaps," an intention-driven trading model that clearly separates the trading process into two phases: "Intention" and "Execution":
Step 1: Open-order. The user submits an "intention" expressing their transaction goals (e.g., "I want to exchange 100 USDC for as much SOL as possible"). At this point, the user's assets are securely escrowed. The key to this stage is that the user's "intention" is kept hidden from the public trading pool (Mempool), eliminating the possibility of front-running attacks at the source.
Step 2: Fill. The protocol's execution side (usually an aggregator or specialized solver) calculates the optimal execution path in the background based on user intent and the order flow tags provided by Segmenter. It then packages the user's intent and execution instructions into an atomic transaction, which is then submitted directly to the blockchain as a whole.
This "intention-first, packaged on-chain" model significantly reduces the attack window, making it virtually immune to front-running attacks like "sandwich attacks." After confirming a legitimate trade, market makers can precisely inject liquidity into it and instantly withdraw it within the same block. This not only significantly improves capital efficiency but also provides participants with a reliable, real-time liquidity service that can be scheduled by the protocol.
III. Future Outlook: The Evolutionary Path from Single Price to Multi-Dimensional Conditions
Conditional liquidity isn't a concept born out of thin air; it's a logical evolution in the DeFi world's pursuit of greater capital efficiency and robustness. It can be seen as a dimensional upgrade of the "centralized liquidity" concept pioneered by Uniswap v3. Uniswap v3 first allowed limited partners to deploy capital based on a single condition: a "price range." Conditional liquidity builds on this foundation by expanding the scope of these conditions from a single price to more complex, integrated risk management models, including order flow quality, timing characteristics, and market volatility. It also embeds these decision-making and execution capabilities deeper into the core of the protocol.
The implementation of this model is a precise correction to existing trading pain points in high-performance ecosystems like Solana, and is expected to bring structural, mutually beneficial optimizations to the entire DEX ecosystem. Ordinary users will most directly experience reduced transaction costs and enhanced MEV protection. Liquidity providers will gain access to more sophisticated risk management tools, allowing them to precisely match capital to "healthy" order flows for more sustainable returns. Ultimately, this will reshape the competitive landscape between DEXs and aggregator platforms, evolving from a simple price competition to a more comprehensive competition of "execution quality" and "security experience."
While the blueprint of this emerging model is undoubtedly alluring, in practice, in addition to common challenges like ecosystem coordination and cold start, its core challenge lies squarely with Segmenter, the entity that holds the power to define labels—who gets to define "toxic"? This presents a fundamental governance dilemma: If Segmenter's algorithm is too conservative, it could accidentally harm innocent, legitimate traders; if too lenient, it could be vulnerable to sophisticated attackers disguised as nefarious actors. This challenges the very foundation of trust in a decentralized world. A "black box" referee controlled by a single entity and operating with an opaque algorithm can easily become a new bottleneck for centralization, even fostering rent-seeking opportunities that collude with specific stakeholders.
To address Segmenter's "black box" dilemma, the design of its governance framework becomes crucial. Future exploration may follow a more decentralized and verifiable path: for example, allowing multiple independent Segmenters to operate in parallel, with the protocol or LPs independently selecting and weighting them based on their historical reputation; at the same time, forcing Segmenters to output audit logs for community oversight to enhance their transparency; on this basis, a post-evaluation and reward-and-penalty mechanism could be established to incentivize models with high accuracy and penalize those with high false positive rates. While these ideas point the way toward decentralized risk control, a truly mature, balanced, and consensus-building solution still requires continuous exploration and construction by the entire industry in practice.
IV. Conclusion: From “Black Box Art” to “Protocol Science”
Conditional liquidity is far more than just a technological innovation; it represents a profound reconstruction of the fairness and efficiency of the DeFi market. At its core, it aims to provide more reasonable pricing for participants with varying intentions and risks in a permissionless world, thereby transforming the previously implicit and unequal rules of the game into explicit, programmable protocol logic. This, in essence, is moving market-making decisions from the "black box art" of relying on the experience of a few to a more open and verifiable "protocol science." While the road ahead is fraught with challenges, this direction undoubtedly opens up valuable new possibilities for the future evolution of DeFi.







