# DEX Protocol

By introducing the **Smart Collateral & Smart Debt**, users will be able to earn additional yield on both their collateral and debt. **Smart Collateral** (essentially DEX’s LP with added composability) enables users to utilize their capital for various activities, such as:

* Lending
* Borrowing against it
* Deploying it as AMM liquidity (earning both lending and trading fees)

**Smart Debt** allows borrowed assets to contribute to liquidity pools. Trades get routed through Smart Debt liquidity, and the generated trading fees are used to pay down the debt (unlike other protocols where debt leaves the lending protocol, Smart Debt is still used as DEX trading liquidity).

1. When a user deposits ETH as collateral.
2. Instead of borrowing directly from an isolated lending pool (as in Aave or Compound), Fluid routes this borrowing through a Smart Debt pool.
3. The borrowed USDC becomes part of the pool and contributes to the overall liquidity. Because of this, the borrowed amount earns trading fees, reducing the interest rate and borrowing costs.

### Oracles on Fluid

Fluid’s DEX has inbuilt **TWAP oracles** designed to effectively track asset prices with minimal gas costs. Includes highest and lowest asset prices during the same period that helps traders analyze price volatility to make smarter decisions while ensuring positions are not unfairly liquidated due to temporary price spikes.

***

## Related Articles:

* [Fluid](https://help.defisaver.com/protocols/fluid)
* [Dashboard & Use-case](https://help.defisaver.com/protocols/fluid/dashboard-and-use-case)
* [Lend Protocol](https://help.defisaver.com/protocols/fluid/lend-protocol)
* [Vault Protocol](https://help.defisaver.com/protocols/fluid/vault-protocol)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.defisaver.com/protocols/fluid/dex-protocol.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
