When Lending Meets DEX: Analyzing the Lending Foundations of Fluid and Euler

CN
4 days ago

Written by: letsgetonchain

Translated by: Tia, Techub News

Original Title: Fluid DEX vs EulerSwap: Part 1 – Comparing the Credit Market Foundations

Combining AMM with lending markets unlocks a new level of capital efficiency, bringing on-chain spot trading closer to surpassing off-chain venues. Fluid pioneered this design with the launch of Fluid DEX v1 in early 2025. Recently, Euler Finance has also adopted the same principles in EulerSwap.

This two-part article aims to break down the comparison between these two protocols, their respective advantages, and the trade-offs they make. To truly understand the differences, we need to first examine the underlying lending market architecture that supports their exchanges.

By the end of this article, you will have a clear understanding of how Fluid DEX's Smart Collateral and Smart Debt work, how EulerSwap's Just-in-Time Liquidity operates, and a comparison of their token economics.

The Current Landscape of Lending Market Design

It is important to clarify that when I refer to "lending markets" in DeFi, I mean over-collateralized, variable-rate lending protocols that support instant entry and exit. The existing lending markets in DeFi exhibit a range of different design choices.

On one hand, there are funding pool or monolithic models like Aave. All assets are cross-collateralized in a single funding pool, and risk parameters such as loan-to-value ratio, borrowing limits, liquidation thresholds, and liquidation penalties are applied on a "one-size-fits-all" basis per asset. In the case of Aave, these parameters are managed by a DAO.

The advantage of this approach is deep liquidity, benefiting from network effects, so borrowers can borrow large amounts without significantly pushing interest rates. At the same time, it is user-friendly; anyone can borrow any supported asset as long as they deposit whitelisted collateral. The downside is that the interest rates paid by borrowers do not accurately reflect the risks they bring, exposing all lenders to the weakest collateral in the pool, which forces risk management to be more conservative.

On the other hand, there is the isolated lending market model, similar to Morpho Labs. Here, each market is limited to two assets, one serving as collateral and the other as the borrowable asset. This design allows for more granular risk management and market isolation. The trade-off is that liquidity is dispersed, making it harder for borrowers to find depth, and idle liquidity in one market cannot benefit another market.

So, where do Euler and Fluid fit within this spectrum? Let's start with Euler.

Euler: A Modular Lending Market Toolkit

Euler is best understood as a toolkit that allows for the construction of permissionless credit markets within the "pooling-isolation" spectrum. If you want a simple dual-asset isolated vault like Morpho, that is achievable; if you want a large cross-collateral pool similar to Aave, that is also possible; if you want something in between, it can be configured as well.

This flexibility comes from Euler's composable vault architecture. Each asset is stored in its own ERC-4626 vault, accumulating interest (if configured to accept collateral and support lending). In Euler, a lending market is merely a collection of mutually recognized vaults (i.e., accepting another vault as collateral, thus allowing lending).

The simplest example is: a vault that only collateralizes WBTC and a USDC lending vault that accepts WBTC as collateral.

Another example of a configurable market in Euler is a network formed by multiple interwoven vaults, approximating a pooling model like Aave. As we will see in the second part, this ability to combine one vault with multiple vaults allows EulerSwap's LPs to provide liquidity to multiple markets simultaneously.

For this composability between vaults to work, they need to authenticate each other. This is achieved through the Ethereum Vault Connector, which ensures secure communication between vaults. When users deposit collateral, the assets are stored in vaults under the user's account (users can have multiple isolated accounts). Once a user borrows, the lending vault becomes the controller of that account. The controller enforces lending rules (such as LTV, etc.) and has the authority to prevent withdrawals or additional borrowing when these rules are about to be violated.

Anyone can easily deploy vaults and create markets using the Euler Vault Kit. A very cool aspect is that this flexibility allows vaults to be deployed as immutable instances, enabling completely trustless lending markets.

Lastly, it is worth mentioning that Euler allows operators to be installed on accounts. These operators can be smart contracts or EOAs, acting on behalf of users, such as self-liquidating early to avoid penalties. As we will see in the second part, EulerSwap itself is such an operator, coordinating the execution of trades on behalf of accounts.

Fluid: A Shared Liquidity Layer

Fluid takes a completely different approach. It is not a modular vault but rather inserts modular building blocks on top of a shared Liquidity Layer. This foundational liquidity layer hosts all tokens, tracks debts and supplies, sets interest rates based on utilization, and manages risk by imposing utilization caps on downstream applications.

You can think of it as a centralized liquidity hub. Each application—whether Fluid Lending, Fluid Vault, or DEX—connects to this hub and shares its liquidity. This design keeps the liquidity layer simple and secure while allowing applications to handle complexity at the edges. As we will see in the liquidity section at the end of this article and in the second part, this design of pooled liquidity is very advantageous for providing liquidity to DEXs.

In theory, anyone can build on top of the liquidity layer and benefit from its liquidity and network effects by implementing the IProtocol interface and obtaining governance approval.

Fluid's traditional lending market consists of two applications that connect to the central liquidity layer: Fluid Lending and Fluid Vault.

Fluid Lending is the yield-generating side. The Lending Vault supplies assets to the liquidity layer and earns the current interest rate. Deposits mint ERC-4626 shares that accumulate value over time. Lenders automatically benefit from any lending demand in the system without having to migrate their liquidity. This contrasts with non-modular designs (like Aave), where liquidity must be migrated from v2 to v3 to benefit from lending demand in the new version. Note: Aave v4 will evolve towards Fluid's modular direction through its Hub-Spokes model.

Fluid Vault empowers the borrowing side in the market. It exists in the form of dual-token markets, such as WETH/USDC, with each market having its own risk parameters, such as LTV, liquidation thresholds, and penalties. Collateral tokens are supplied to the liquidity layer, while borrowing tokens are drawn from it. This allows borrowers to enjoy the benefits of deep pooled liquidity while the protocol still maintains more granular risk control on the dual-asset dimension. This can be compared to Aave's e-mode, which allows borrowers to enjoy higher LTVs than a "one-size-fits-all" approach as long as they are limited to supplying a restricted set of assets. For example, if you supply stETH and borrow ETH, it is more reasonable to enjoy a higher LTV than if you supply stETH and borrow USDC.

Liquidation Mechanism

In Euler, liquidation is done on an account basis. Liquidators repay debts and sell collateral through the vaults they control. Euler employs Dutch auctions to determine liquidation penalties, with fierce competition leading to lower costs for users. This means that, compared to protocols that use traditional 5-10% liquidation penalties, large accounts can pay less in liquidation costs on Euler.

Fluid's liquidation engine operates on different principles. It does not target individual positions but aggregates them into discrete ticks, inspired by Uniswap v3's range liquidity splitting. In Fluid, the debt-to-collateral ratio is divided into ticks. For example, if you deposit 2 ETH and borrow 3,000 USDC at a price of 2,000 USD/ETH (with a loan-to-value ratio of 75%), your position will be assigned to the tick corresponding to that ratio.

As the price of ETH fluctuates, once the price movement breaks through the liquidation threshold, the liquidation engine will immediately liquidate all positions that exceed the vault's configured liquidation threshold. Importantly, it will only liquidate enough collateral to bring the position back to the next healthy price movement. This means that the actual loss for borrowers will be much smaller. For example, if the penalty is 1% and only 10% of the position is liquidated, the actual loss is only 0.1%.

The post-liquidation state is where all quotes and their positions return to below the liquidation threshold quote.

What’s really cool here is that since the liquidation engine operates only on aggregated quotes from thousands of positions, individual positions are often unaffected. This means that the Gas cost varies only O(1) with the number of positions, while all other liquidation engines operate individually, resulting in Gas costs of O(n). The cost savings for liquidators directly translate into the profitability of liquidations, which is one of the reasons Fluid can safely set liquidation penalties at 1%.

Another advantage of this aggregation is that Fluid avoids the accumulation of bad debts from small positions, whereas in other lending systems, when Gas prices spike (which is often when liquidations occur and the market is under pressure), liquidating these bad debts becomes unprofitable. Fluid's liquidation engine also has the advantage of being easily integrated into DEX aggregators, as liquidation is just a swap: buying collateral assets and selling debt assets. In position-based systems, this is not feasible because aggregators need to track and interact with many individual positions. In Fluid, traders executing regular swaps through aggregators can obtain better trade prices (due to liquidation penalties) while actively protecting lenders from bad debts. This is a great example of how the composability of DeFi can create beneficial synergies.

Liquidity

I am adding this section on liquidity because, in my view, aside from the efficiency of the DEX design itself, liquidity is the second most important factor determining how well a "lending market DEX" performs and attracts trading volume. As we will see in the second part, Fluid's Smart Debt and EulerSwap's Just-in-Time Liquidity can only operate effectively with sufficient TVL. This is because Smart Debt in Fluid and Just-in-Time Liquidity in EulerSwap fundamentally operate by treating the swap out portion of trades as funds borrowed from the underlying credit market. This means that liquidity not only needs to meet the demand for swap amounts but also needs to be deep enough to ensure that borrowed funds do not immediately push up borrowing rates. Borrowing rates, as we will discuss in more detail later, are key drivers of liquidity provider profitability in both models. In this case, TVL is a clear and accurate measure of the actual borrowable amount, as it equals total deposits minus total borrowings.

That said, the original TVL figure itself does not provide much information. What really matters is the composition of the TVL. To this end, I will only consider blue-chip assets such as USDT, USDC, ETH, and BTC. These assets drive most trading activity, so their availability ultimately determines the utility of TVL for the DEX.

At the time of writing, Euler has a TVL of about $1.5 billion in EVM deployments, while Fluid has about $1.4 billion on EVM and $500 million on Solana (not accounted for here).

Looking at the token composition of Euler, a large portion of the TVL comes from regular stable loan markets (allowing for circular USD0++ and borrowing USD0) and PT tokens. This liquidity is not particularly valuable for EulerSwap. If we focus only on high-quality TVL tokens (BTC, ETH, USDC, USDT), they actually only account for about 13.7% of Euler's TVL, approximately $200 million.

In contrast, Fluid's TVL composition shows that high-quality tokens (BTC, ETH, USDC, USDT) account for 22.5% of its TVL, approximately $315 million. In this sense, Fluid currently has a structural advantage in blue-chip liquidity for its DEX. Of course, TVL is dynamic, and these figures may change.

One last point: the token composition of Euler is measured across all its markets, but the liquidity provider holdings in EulerSwap cannot span all markets, as we will see in the second part. Each EulerSwap instance can only utilize the liquidity of a specific market. I could not find token composition data for each market, but the six largest markets are shown below. This fragmentation is not ideal for providing deep liquidity to EulerSwap. On the other hand, it is this design of composable vaults that allows anyone to build custom credit markets according to their preferences.

Summary of Part 1

Euler and Fluid represent two distinctly different philosophies. Euler provides a modular toolkit for creating lending markets of any form and scale, while Fluid builds around a shared liquidity hub and constructs modular building blocks on top of it.

免责声明:本文章仅代表作者个人观点,不代表本平台的立场和观点。本文章仅供信息分享,不构成对任何人的任何投资建议。用户与作者之间的任何争议,与本平台无关。如网页中刊载的文章或图片涉及侵权,请提供相关的权利证明和身份证明发送邮件到support@aicoin.com,本平台相关工作人员将会进行核查。

交易瓜分20,000GT !注册送$10K
Ad
Share To
APP

X

Telegram

Facebook

Reddit

CopyLink