# Swap

AshSwap uses two algorithms invented by Curve Finance for its liquidity pools.

* Stable-swap algorithm for pegged assets
* Concentrated liquidity with dynamic pegging for volatile assets

### Stable-swap

This algorithm is designed to exchange pegged assets. The most obvious use case is for stablecoins. This is also designed to accommodate more than two tokens in one pool. Our core pool is one having the three most popular centralized stablecoins - USDC/UDST/BUSD.

Further applications are for different wrapped versions of the same tokens or yield-bearing tokens. Liquid staking tokens and lending tokens are of this type.

### Concentrated Liquidity

Concentrated liquidity pools enhance ers' capital efficiency and the dynamic pegging mechanism reduces the impermanent loss of the liquidity provision for volatile assets.

AshSwap currently has pools powered by this technology on Mainnet:

* EGLD/BUSD
* ASH/USDT
* and so on

Further research and verification on impermanent loss implications and comparisons with other AMM algorithms are being conducted by the team and will be released in the future.

AshSwap provides 2 types of swap: Aggregator Swap & Legacy Swap

By default, you will swap via [AshSwap Aggregator](https://medium.com/@ashswap/ashswap-aggregator-get-better-access-to-liquidity-and-pricing-83a510253eb7) in order to optimize the swap rate with our Dynamic Route Trading.

<figure><img src="/files/WdRoF39xr78GvXXjFqgm" alt=""><figcaption></figcaption></figure>

### GUIDE

{% content-ref url="/pages/sYd9vlvgpNT3Sr0Kz6Ff" %}
[Swap Guide](/aggregator/swap-guide.md)
{% endcontent-ref %}

Read more:

{% embed url="<https://medium.com/@ashswap/ashswap-aggregator-get-better-access-to-liquidity-and-pricing-83a510253eb7>" %}

{% content-ref url="/pages/6dhFVLw7MQvFVfwD9k1G" %}
[Dynamic Aggregator](/resources/ashswap-academy/dynamic-aggregator.md)
{% endcontent-ref %}

Open-sourced repo of Aggregator:

{% content-ref url="/pages/3prNUJuZctIP363fDXu3" %}
[Broken mention](broken://pages/3prNUJuZctIP363fDXu3)
{% endcontent-ref %}

### FAQ

<details>

<summary>Tx Failed, slippage too high, what can i do?</summary>

![](/files/ActK7Ycs2xgyNpg6Uhh2)

You just need adjust your slippage tolerance to a higher number and try again, by default it's 0.1%&#x20;

![](/files/PfJRY5J7m17Q95sY0um5)

</details>

<details>

<summary>My swap ratio is not 1:1, e.g. EGLD &#x3C;> JWLEGLD</summary>

![](/files/yluoWZtKDGKF1EMoMRld)

When users sell/buy too many of the same token, the pool becomes unbalanced. The stable pools are designed to hold the peg event even if the ratio is imbalanced; when LPs withdraw, they will receive tokens in a different ratio, but they will receive about the same amount of underlying token; this ensures your value will remain consistent.

</details>


---

# 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.ashswap.io/ashswap-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.
