# Swaps

YeiSwap lets you exchange one token for another directly within the Yei ecosystem. Trades are matched based on available liquidity in the pool, enabling fast and permissionless swaps.

### Mechanism

YeiSwap is a decentralized exchange (DEX) that integrates Yei’s native interest-bearing tokens.

* Users swap tokens as usual, with no change in experience.
* Liquidity providers (LPs) earn both **trading fees** and **lending yields**, boosting capital efficiency.

***

## Token Swap

<figure><img src="/files/xEBL2w12kCcmiorjpCRD" alt="" width="563"><figcaption></figcaption></figure>

### Important Concepts

* **Price Impact**: Change in market price caused by your trade. Larger trades experience higher impact.
* **Slippage**: Difference between expected and actual price due to market changes. Set a slippage tolerance to manage this.

### How to Swap

Follow these steps to complete a swap on Yei:

* **Select Tokens:** Choose the token to swap from and to.
* **Set Slippage:** Adjust your slippage tolerance.

<figure><img src="/files/x07AXOzOtFWMHzZb4qxA" alt="" width="257"><figcaption></figcaption></figure>

* **Review Price Impact:** Higher impact = worse rates.
* **Approve Token:** Required only on the first swap for each token.
* **Sign and Confirm:** Approve the transaction in your wallet.

***

## **Security**

View our [audit report here](/security/audits.md#yei-swap).


---

# 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.yei.finance/products/yeiswap/swaps.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.
