FLUID SMART DEBT: HOW CAN DEBT POSITIONS BECOME “EARN TRADING FEES”?
Understanding how debt turns into DEX liquidity and fee-generating positions.
INTRODUCTION
The most unique and interest thing people talk about Fluid is the ability to turn collateral and debt become Fluid DEX liquidity, which help depositors and borrowers earns trading fee as a passive income. While Smart Collateral is quite easy to understand, Smart Debt is more complicated. The key question of most Fluid researchers should be: If borrowers take out borrowed tokens from the Fluid liquidity layer, how can other traders still trade with those tokens that have effectively “disappeared” from the pool?
This article aims to solve this problem, give logical and technical explanation for a deep understanding of Smart Debt, therefore, you can evaluate by yourself about the capital efficiency of this mechanism.
KEY TAKEAWAYS
This article will explain the following:
The relationship between Fluid Lending, Fluid Vaults, and Fluid DEX—and how lending, borrowing, and trading share one unified liquidity layer.
How Collateral and Debt become “Smart” through share-based accounting.
Why the tokens you borrow can still remain as “DEX liquidity” and earns trading fees inside the system.
Why your Smart Debt position continuously changes in token proportions as the pool ratio updates.
1/ THE RELATIONSHIP OF LENDING, BORROWING AND TRADING (FLUID LENDING, FLUID VAULT AND FLUID DEX): THE UNIFIED LIQUIDITY LAYER
The key point that connects the collateral side (Fluid Lending), debt side (Fluid Vault) and trading side (Fluid DEX) is that they share a unified, interconnected pool of liquidity, which is called Fluid Liquidity layer.
Fluid’s Liquidity Layer gives all of its protocols the access to a shared liquidity pool and also allowing users to migrate between protocols without disrupting rates or capital
Because there’s no separated pool for each protocols, Fluid DEX’s liquidity is from lenders of lending protocol.
The essence of Fluid DEX protocol is DEX-on-lending, a swap actually is deposit and then borrow, or payback and then withdraw from a lending position.
Rather than simply exchanging Token A for Token B, users engage in complex lending activities that achieve the same trading outcome.
Simple example:
Swap 10 USDC for USDT means deposit 10 USDC and borrow 10 USDT (with lending position with USDC as collateral and USDT as debt) or payback 10 USDC and withdraw 10 USDT (with lending position with USDC as debt and USDT as collateral)
But the problem is: When a pair of tokens enables both Smart Collateral and Smart Debt, there must be a mechanism to keep exchange price the same in every operation, no matter which DEX vaults (Smart Collateral or Smart Debt) users interact with. This mechanism is called “two mirrored pool”.
Therefore, each DEX on Fluid will have 2 “mirrored” pools, and each DEX will operate as a user of these two lending positions
Smart Collateral Pool: Supply Token1 / Borrow Token2
Smart Debt Pool: Supply Token2 / Borrow Token1
The flow inside will be:
For incoming tokens, the system performs supply and payback operations
For outgoing tokens, it executes withdraw and borrow functions.
This architecture maintains Uniswap V2-like invariants while leveraging the enhanced capital efficiency of lending protocols.
The DEX layer, in this framework, calculates the amounts for supply/borrow operations according to the Uniswap V2-like invariant and rebalances assets between pools to maintain consistent token1→ token2 and token2 → token1 prices.
This high level design creates Smart Collateral (Collateral of a lending position can be used as DEX’s liquidity) and Smart Debt (Debt of a lending position can be used as DEX’s liquidity).
2/ HOW CAN COLLATERAL AND DEBT BECOME “SMART”?
In case of Fluid, “smart” means more yield, more benefit and more capital efficiency.
As we have mentioned:
+ Smart Collateral means collateral of a lending position can be used as DEX’s liquidity;
+ Smart Debt means debt amount of a lending position can be used as DEX’s liquidity.
Of course, DEX is trading, swapping between two token. Therefore, collateral and debt must be presented as a pair of token (not a single one) to become DEX’s liquidity, or become “smart”.
To enable DEX-on-lending mechanism, Fluid has 3 kinds of vaults for Fluid DEX. While Vault T1 is used for regular lending and borrowing (supply and borrowing single tokens), in Fluid DEX, we have:
Vault T2 for Smart Collateral only (supply 2 token as collateral, borrow 1 token as debt).
Vault T3 for Smart Debt only (supply 1 token as collateral, borrow 2 token as debt).
Vault T4 for combination of Smart Collateral and Smart Debt (supply 2 tokens as collateral and borrow 2 tokens as debt).
Users when creating a Smart Collateral or Smart Debt position will interact with one of three Fluid DEX Vault (Vault T2, T3, T4), and then this vault will interact with the liquidity layer. Liquidity Layer will return shares to this Fluid DEX vault.
When you interact with Fluid ERC-4626 vault, let’s say depositing, you don’t just locked your asset in Fluid, you get fTokens, which represent your share of the vault. This vault has:
totalAssets = the total value of all tokens inside the vault.
totalSupply = the total number of fTokens (shares) issued to users.
Both numbers grow when people deposit, but your profit comes only if the Exchange Price between fToken and its underlying token increases.
For example:
You deposit 100 USDC into the vault. Vault now has totalAssets = 100 USDC and gives you 100 fTokens (so totalSupply = 100), which means 100 fTokens = 100 USDC.
Later, the vault earns 10 USDC from borrowers paying borrow rate. Now totalAssets = 110 USDC but it still has totalSupply = 100.
Each fToken is now worth 1.1 USDC, so now your 100 fTokens = 110 USDC, exchange price has changed, and this is how you made a profit.
Smart Collateral (supply 2 tokens) makes depositors become liquidity providers (LP) of Fluid DEX, they receive their shares of Fluid DEX (representing their deposited portion), and in the same way, Smart Debt (borrow 2 tokens) also means owing Fluid DEX’s shares (representing their borrowed portion).
Example 1: Smart Debt with Vault T3
A user borrows $40,000 USDC + $40,000 USDT.
1/ Deposit and Borrow Request: The user deposits 20 ETH into Vault T3 and requests to borrow stablecoins.
2/ Deposit into Liquidity Layer: Vault T3 secures the ETH as collateral in the liquidity layer.
3/ Borrow from liquidity layer
Vault T3 borrows USDC and USDT from the liquidity layer.
The system lends out $80,000 and also lends out an aligned number of DEX shares back to Vault T3, representing the borrowed liquidity.
4/ Result
The user gets $40,000 USDC + $40,000 USDT as debt and holds share tokens representing their borrow. (Even if you only borrow only one token in Smart Debt, the system will automatically split it into the correct ratio inside the smart debt vault).
Vault T3 holds ETH as collateral and owes DEX shares from Liquidity Layer.
Their debt (DEX shares) still continues to become bigger by borrowing cost but also smaller by earning trading fee.
Example 2: Smart Debt and Smart Collateral with Vault T4
A user deposits $40,000 USDC + 10 ETH and borrows $20,000 USDC + 5 ETH.
1/ Deposit and Borrow Request: The user deposits USDC and ETH into Vault T4 and specifies they want to borrow USDC and ETH.
2/ Deposit into liquidity layer
Vault T4 sends the USDC and USDT to the liquidity layer (Even if you only supply one token when Smart Collateral, the system automatically balances it into the required ratio inside the smart collateral vault).
In return, an aligned amount of DEX shares is minted and sent to Vault T4 representing the user’s liquidity position.
3/ Borrow from liquidity layer
Vault T4 borrows USDC and ETH from the liquidity layer.
The system lends out $20,000 USDC and 5 ETH and also lends out an aligned number of DEX shares back to Vault T4, representing the borrowed liquidity.
4/ Result
The user gets $20,000 USDC and 5 ETH as debt and holds share tokens representing their borrow. (Even if you only borrow only one token in Smart Debt, the system will automatically split it into the correct ratio inside the smart debt vault).
The user’s collateral (DEX shares) earns both trading fees + lending yield while being used to back their ETH loan.
Their debt (DEX shares) still continues to become bigger by borrowing cost but also smaller by earning trading fee.
But essentially, do both the collateral and the debt truly earn trading fees the way we often hear? If so, what happens to the debt portion that has already been withdrawn from the liquidity pool?
3/ WHY TOKEN THAT HAVE TOKEN OUT FOR BORROWER CAN STILL BE USED AS DEX LIQUIDITY?
This question becomes confusing if you think in terms of “How can people swap against my debt when the tokens I borrowed have already left the liquidity pool?”
The fact that both lenders and borrowers essentially do not earn trading fee directly on their collateral and debt.
Trading fees flow back into the liquidity pool, increasing the pool’s total assets (without minting any new supply share). As a result, the exchange price of the share token gradually rises over time. This increase is the yield generated by both smart collateral and smart debt.
Every shares in Fluid systems follow that mechanism. That is the reason why you can earn profit either when supply Smart Collateral (receive shares) or when borrow Smart Debt (owe shares).
Let’s make a simple example: Earning fees as a borrower (ignoring borrow costs)
Suppose you borrow 50 USDC from a Fluid vault. The vault issues you 50 fUSDC (share token) (says totalSupply = 50). These fUSDC represent your borrowed share of the vault.
Later, trading fees on Fluid generate 10 USDC for the vault. These fees are proportionally distributed to all shares of the vault, of course, including debt shares.
Now totalAssets = 60 USDC (original debt + share of fees), but totalSupply = 50 fUSDC still.
Therefore, each fUSDC is now worth 60 / 50 = 1.2 USDC, meaning your 50 fUSDC tokens now can be redeemed for 60 USDC, but you only have to pay back 50 USDC you have borrowed initially.
In this simplified example, the value of your debt shares increases due to the trading fees, effectively reducing part of your debt.
That is a simplified example. In reality, the exchange price between shares and the underlying token depends on the pool and user strategies.
In additional, the “profit” from borrowing only happens if the trading fees distributed to the shares exceed the borrow rate. Otherwise, your debt cost is still higher than any bonus from fees. Therefore, must say that Fluid’s statement about “getting paid to borrow” applies only under conditions where fee income is bigger than interest owed.
4/ WHY YOUR SMART DEBT POSITIONS ARE CONTINUOUSLY CHANGING IN THE PORTION OF EACH TOKEN?
Fluid needs to adjust the user’s borrow composition under borrowPerfect() to make sure that when someone borrows a pair of token, the ratio inside the pool keeps staying balanced. This preserves the core properties of the pool’s liquidity and its fee distribution.
Perfect operations (for example: borrowPerfect(), paybackPerfectInOneToken()) do not change token ratios inside and also between smart collateral and smart debt pools. Since the distribution of underlying tokens stays the same, no rebalancing is required.
A perfect borrow operation is a transaction that does not change the token ratio of a pair in Vault T3 and Vault T4), this means borrowing a balanced liquidity pair
This means if token ratio of USDC–USDT pair in Vault T3 is 50/50, when you using Smart Debt only, Fluid will choose a proportion of USDC-USDT for you while keep the ratio remains 50/50.
For example: Suppose you click Borrow $7 all in USDC and you receive exactly $7 USDC in your wallet.
However, in your debt position on Fluid, you won’t see a clean $7 USDC. Instead, it may show like this:
This happens because Fluid does not record your debt as “100% USDC”. Instead, it expresses your debt in the same token ratio as the pool (Vault T3/T4) at the time you borrow.
So even though you asked for USDC only, your debt shares represent a balanced mix of USDC and ETH, because that is the ratio required to keep the pool perfectly balanced.
Therefore, under borrowPerfect(), Fluid lets you take out any token you want, but your debt shares are always recorded in the pool’s balanced ratio.
This keeps the pool healthy, avoids imbalance, and ensures trading fees are maximized for everyone. And this process is triggered continuously, the ratio you see in your debt will always be adjusted as the pool’s ratio shifts.
CONCLUSION
Fluid’s Smart Debt architecture dissolves the traditional separation between lending, borrowing, and trading by connecting all activities to a single, unified liquidity layer. Instead of leaving collateral and debt idle, Fluid represents them as shares of the pool—meaning every position, whether supplied or borrowed, becomes part of the DEX’s active liquidity.
Because all user interactions happen through these shares, Smart Debt also earns a proportional portion of trading fees, just like Smart Collateral. This allows borrowers to benefit directly from DEX activity: trading flow can offset part of their interest costs, and in high-fee environments, even create net-positive borrowing conditions.
By keeping pools balanced and continuously updating each user’s share composition, Fluid maintains trading efficiency while unlocking a new class of “productive” debt. Smart Debt is not just a way to borrow—it is a liquidity primitive that reshapes how assets, liabilities, and market activity converge in DeFi.
DISCLAIMER
In this article, we focus on examining the logical structure behind Fluid Smart Debt and how debt positions can function as active DEX liquidity within Fluid’s unified liquidity layer. Rather than diving into low-level implementation details or core smart contract mechanics, our objective is to clarify the economic logic and design principles that make this mechanism possible, so readers can understand the underlying intuition and evaluate its capital efficiency.
Throughout the article, we use simplified models and illustrative diagrams to explain concepts step by step. These visuals are intentionally abstracted for clarity; the actual execution flow inside Fluid’s smart contracts is significantly more complex.
For readers interested in a deeper, technical breakdown of the AMM-on-lending architecture: We have deeply dived into it in our previous article:
Fluid DEX: AMM on Lending.












