Fluid DEX vs EulerSwap: Part 1 — Comparing the Credit Market Foundations
Composing AMMs and credit markets unlocks new levels of capital efficiency, bringing on-chain spot trading one step closer to surpassing off-chain venues. @0xfluid pioneered this design with the launch of Fluid DEX v1 in early 2025. More recently, @eulerfinance adopted the same principle with EulerSwap.
This two-part article is my attempt to break down how these two protocols compare, where their respective strengths lie, and the tradeoffs each of them make. To understand the differences properly, we first need to study the underlying credit market architectures that power their exchanges.
By the end of this series, you’ll have a clear understanding of how Fluid DEX concepts like Smart Collateral and Smart Debt work under the hood, how EulerSwap’s Just-in-Time Liquidity operates, and how the economics of both compare.
The Landscape of Credit Market Designs Today
To clarify, when I say “credit markets” in DeFi, I mean over collateralised, variable-rate lending protocols with instant entry and exit. The existing credit markets in DeFi today all fall on a spectrum of design choices.
On one end, there are pooled or monolithic models like Aave. All assets sit in a single pool where they are cross-collateralized, and risk parameters such as loan-to-value ratios, borrow caps, liquidation thresholds, and liquidation penalties per asset are applied in a “one size fits all” manner. In Aave’s case, these are managed by the DAO itself.
The advantage of this approach is that liquidity is deep and benefits from network effects, so borrowers can take size without dramatically moving interest rates. It is also simple to use, since anyone can deposit a whitelisted collateral and borrow any supported asset. The downside is that borrowers pay interest rates that don’t precisely reflect the risk they bring to the system, and all lenders are exposed to the weakest collateral in the pool, which forces risk management to be conservative.
On the other end of the spectrum are isolated credit market models such as @MorphoLabs. Here, each market is siloed to two assets, with one serving as collateral and the other as the borrowable asset. This design allows for more granular risk management and isolation of markets. The tradeoff is that liquidity is fragmented, which makes it harder to find depth as a borrower, and idle liquidity in one market does not benefit another.
So, where do Euler and Fluid sit on this spectrum? Let’s start with Euler.
Euler: Modular Credit Market Toolkit
Euler is best thought of as a toolkit for permissionlessly building credit markets anywhere along the pooled-to-isolated spectrum. If you want a simple two-asset isolated vault like Morpho, that is possible. If you want a large cross-collateralized pool like Aave, that is also possible. And if you want something in between, you can configure that too.
This flexibility comes from Euler’s composable vault architecture. Each asset is held in its own ERC-4626 vault that accrues interest (if configured to accept collateral and be borrowed). A credit market in Euler is simply a set of vaults that mutually recognize each other (accept another vault as collateral to allow borrows).
The most minimal example would be a collateral-only WBTC vault paired with a USDC borrow vault that accepts WBTC as collateral.
An example of another Euler configurable market would be a web of many to many vaults that approximate a pooled model like Aave. As we will see in Part 2 this ability to compose a vault with many vaults allows EulerSwap LPs to service liquidity in more than one market at the same time.
For this composability between vaults to to work they need to authenticate one another. This is done through the Ethereum Vault Connector, which ensures secure communication between vaults. When a user deposits collateral, the assets sit in vaults under the user’s account (users can have many accounts, which are isolated from one another). Once a user borrows, the borrow vault becomes the controller of that account. The controller enforces the borrowing rules (LTVs etc..) and has the authority to block withdrawals or additional borrows if those rules would be violated.
Anyone can easily deploy vaults and create markets by using Euler Vault Kit. One really cool thing is that this flexibility allows vaults to be deployed as immutable instances, allowing for fully trustless credit markets. Finally, worth mentioning is that Euler allows operators to be installed on accounts. These are smart contracts or EOAs that can act on behalf of a user, to for example self-liquidate early to avoid penalties. As we’ll see in Part 2, EulerSwap itself is such an operator that orchestrates swaps on behalf of accounts.
Fluid: A Shared Liquidity Layer
Fluid takes a very different approach. Instead of modular vaults, it plugs modular building blocks on top of a shared Liquidity Layer. This foundational liquidity layer custodies all tokens, tracks debts and supplies, sets utilization-based interest rates, and manages risk by imposing utilization caps to downstream applications.
You can think of it as a central liquidity hub. Every application, whether Fluid Lending, Fluid Vault, or the DEX, plugs into this hub and shares its liquidity. This design allows the Liquidity Layer to stay simple and secure, while applications handle the complexity at the edges. As we will see in the liquidity section at the end of this article and in Part 2, this design of pooled liquidity is very beneficial when it comes to effectively providing liquidity to a DEX.
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 receiving governance approval.
Fluid’s traditional credit market is made up of two applications that plug into the central liquidity layer: Fluid Lending and Fluid Vault.
Get letsgetonchain’s stories in your inbox
Join Medium for free to get updates from this writer.
Fluid Lending is the yield-generating side. Lending vaults supply assets to the Liquidity Layer and earn the prevailing interest rate. Deposits mint ERC-4626 shares that accrue value over time. Lenders automatically benefit from any borrow demand across the system without ever needing to migrate their liquidity. This stands in contrast to non modular designs like Aave, where liquidity has to migrate from v2 to v3 to benefit from borrowing demand generated in the new version. Note: Aave v4 will follow this modular direction by Fluid through it’s Hub-Spokes model.
Fluid Vault powers the borrowing side of the market. It takes the form of two-token markets, for example WETH/USDC, each with its own risk parameters such as LTVs, liquidation thresholds, and penalties. Collateral tokens are supplied into the Liquidity Layer, and borrow tokens are drawn from it. This gives borrowers the benefit of deep pooled liquidity while the protocol retains more granular control over risk within a two asset dimension. It can be compared to Aave’s e-mode that allows borrowers to benefit from more aggressive LTVs than the “one size fit all” LTVs as long as they supply only a restricted set of assets. For example it makes sense to allow for higher LTV if you supply stETH and borrow ETH than if you supplying stETH and borrow USDC.
Liquidation Mechanisms
Euler handles liquidations on a per-account basis. Liquidators impersonate the borrower through the controller vault and repay debt by selling collateral. Instead of a fixed liquidation penalty, Euler uses a Dutch auction for the liquidation penalty, meaning the more competition among liquidators, the lower the realized penalty for the user. In practice, this means that liquidations for large accounts often end up costing borrowers far less than the 5–10% penalties typical of traditional lending protocols (as shown in @MessariCrypto graphic below). Note: Since Euler vaults are configurable by whoever deploys them, the liquidation mechanism could in theory be changed, but the Dutch auction is the default.
Fluid’s liquidation engine is built on a different principle. Instead of operating on individual positions, it aggregates them into discrete ticks, inspired by how Uniswap v3 breaks up liquidity ranges. In Fluid, debt-to-collateral ratios are bucketed into ticks. For example, if you deposit 2 ETH and borrow 3,000 USDC at $2,000/ETH (a 75% LTV), your position is assigned to the tick that corresponds to that ratio.
With ETH price evolving once the tick crosses the liquidation threshold the liquidation engine liquidates in on go all positions that were part of any ticks beyond the vault configured liquidation threshold. Importantly it only liquidates enough collateral to merge the position into the next health tick again. This means borrowers face much smaller effective losses. For example, with a 1% penalty, if only 10% of a position is liquidated, the actual loss is only 0.1%.
The post liquidation state is one where all ticks and their positions are back below the liquidation threshold tick.
The really cool thing to realize here is that individual positions were not even touched since the liquidation engine only operates on the ticks that aggregate thousands of positions. This means that gas scales approximately O(1) with the number of positions whereas all other liquidation engines liquidate separately and hence gas scales O(n). This cost saving for liquidators directly translates into the profitability of liquidiations and is one reason why Fluid can safely set liquidations penalties as low as 1%.
Another advantage of this aggregation is that Fluid avoids building up bad debt from smaller positions that would be unprofitable to liquidate in other lending systems when gas prices spike (which is often exactly when liquidations occur and markets are under stress). Fluid’s liquidation engine also has the benefit of being easily integrated into a DEX aggregator, since a liquidation is simply a swap: buying the collateral asset and selling the debt asset. In position-based systems this isn’t feasible, because an aggregator would need to track and interact with many individual positions. In Fluid, a trader executing a normal swap through an aggregator can get a better price for their trade (due to liquidation penalty) while actively contributing to keep lenders safe from bad debt. A nice little example of DeFi composability leading of beneficial synergies.
Liquidity: Euler vs Fluid
I’m adding this section on liquidity because, in my view, it is (besides the efficiency of the DEX design itself) the second most important factor in determining how well a “DEX on Credit Market” can perform and capture volume. As we’ll see in Part 2, Fluid’s Smart Debt and EulerSwap’s Just-in-Time Liquidity can only function effectively if there is sufficient TVL. The reason for this, is that fundamentally both Smart Debt in Fluid and JIT Liquidity in EulerSwap work by sourcing the swap-out leg of a trade as a borrow from the underlying credit market. That means liquidity doesn’t just need to exist to serve the amount of a swap but it needs to be deep enough that borrowing does not immediately push borrow rates higher. Borrow rates, as we will cover in more detail later, are a key driver of LP profitability in both models. In this context, TVL is a clean and accurate measure of what can actually be borrowed, since it equals total deposits minus total borrows.
That said, the raw TVL number isn’t very informative in isolation. What really matters is the composition of TVL. For this purpose I will only take into account bluechip assets such as USDT, USDC, ETH and BTC. These assets drive the majority of trading activity, so their availability is what ultimately determines how useful the TVL is for a DEX.
At the time of writing, Euler has about $1.5 billion in TVL across EVM deployments, while Fluid has around $1.4 billion on EVM and another $500 million on Solana (not counted here).
Looking at Euler’s token composition (source @defillama), a large share of TVL comes from the Usual Stability Loan market (which allows looping USD0++ and borrowing USD0) and from PT tokens. With respect to EulerSwap, this liquidity is not particularly valuable. Focusing only on the quality TVL tokens (BTC, ETH, USDC, USDT), they make up about 13.7% of Euler’s TVL, or around $200 million.
By comparison, Fluid’s TVL composition shows that quality tokens (BTC, ETH, USDC, USDT) make up 22.5% of its TVL, or about $315 million. In that sense, Fluid currently has a structural advantage when it comes to bluechip liquidity available for its DEX. Of course, TVL is dynamic and these numbers can change.
One final point: Euler’s token composition from above is measured across all of its markets, but EulerSwap LP positions cannot span across them as we will see in part 2. Each instance of EulerSwap can only tap into the liquidity of one specific market. I wasn’t able to find per-market token composition data, but the six largest markets are shown below. This fragmentation is not ideal when it comes to providing deep liquidity to EulerSwap. On the other hand, it is this very design of composing vaults that elegantly allows anyone to build custom credit markets as they see fit.
Wrapping Up Part 1
Euler and Fluid represent two very different philosophies. Euler provides a modular toolkit for creating credit markets of any shape or size, while Fluid builds around a shared liquidity hub with modular building blocks built on top.
With these foundations in place, we can now move to Part 2, where I’ll cover how EulerSwap and Fluid DEX actually leverage these designs in practice.
You can read Part 2 and Part 3 below:
Part 2: https://x.com/letsgetonchain/status/1966095252822847924?s=20
Part 3: https://x.com/letsgetonchain/status/1968979878113411430?s=20









