# SWAP

XSwap is an Automated Market Maker (AMM), and the Exchange is the heart of XSwap. XSwap is the leading AMM on the XDC Blockchain, and as statistics tell, the most popular Decentralized Exchange (DEX) ever!

The XSwap Exchange offers several features that support decentralized trading:

### Swapping/Trading

XSwap lets users trade without the need to go through a Centralized Exchange. Everything you do on XSwap is routed directly to your own XDC wallet—no need to trust someone else with your coins!

### Liquidity Pools

You can only swap tokens on XSwap if there is enough liquidity for those tokens. If nobody has added much liquidity for the token or tokens you want to swap, it will be difficult, expensive, or impossible to do the swap.

When you provide liquidity, you will get Liquidity Pool (LP) tokens. The number of LP tokens you receive represents your portion of the LP.  This enables you to earn rewards   in the form of trading fees.  When someone trades, a portion of the transaction fee that the trader pays is added to the LP of the swap pair they traded on.  The fees collected gets distributed to the LP providers proportionally.

### Yield Farming

Yield farming lets users that are providing liquidity earn XTT rewards by locking their LP tokens into a smart contract. The incentive is to balance out the risk of [impermanent loss](https://academy.binance.com/en/articles/impermanent-loss-explained) that comes along with locking in your liquidity.


---

# 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://docs.xspswap.finance/xswap-protocol/products/v2-dex/swap.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.
