# Swap Tutorial

### Introduction <a href="#introduction" id="introduction"></a>

The swapping process on a DEX involves selling a user's existing tokens for a proportional amount of the desired tokens. During this process, a small swap fee is deducted and distributed as incentives to liquidity providers.&#x20;

### Price Impact[​](https://docs.uniswap.org/concepts/protocol/swaps#price-impact) <a href="#price-impact" id="price-impact"></a>

In a traditional order-book market, large buy orders can deplete available liquidity and result in higher execution prices. Swapping on a DEX differs from order book markets, as it executes against a passive liquidity pool rather than following a first-in-first-out policy.

In an protocol like Kriya supporting both AMM and CLMM, the relative value of assets continuously changes during a swap, causing the final execution price to fall between the starting and ending price. This dynamic is inherent to liquidity pool design and impacts every swap. Price impact depends on liquidity at different price points; higher liquidity leads to lower price impact, while lower liquidity results in higher price impact.&#x20;

Kriya's interface provides real-time price impact estimates, including warnings for unusually high impacts, allowing users to assess the circumstances before executing a swap.

### Slippage <a href="#slippage" id="slippage"></a>

Slippage is the potential price change during transaction processing on platforms like Kriya. To protect users, Kriya allows setting a slippage tolerance, limiting acceptable price impact. If the final execution price stays within this range, the transaction executes; otherwise, it fails.


---

# 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.kriya.finance/kriya-swap/swap-tutorial.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.
