> For the complete documentation index, see [llms.txt](https://docs.garuda-defi.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.garuda-defi.org/products/swap.md).

# Swap

## Constant Product Market Maker

Garuda DeFi Swap using **Constant Product Market Maker**. It maintains a constant product of the quantities of two tokens in a liquidity pool. The formula is:&#x20;

**x \* y = k**

where x and y are the quantities of the two tokens, and k is a constant. As users trade tokens, the quantities x and y change, but the product k remains constant.&#x20;

This ensures that prices adjust automatically based on supply and demand.

## Trading Fees

In Garuda DeFI, trading fees are set to 0.5% \* ( 0.2% for Liquidity providers and 0.3% for [GDEX Shares](/products/gdex-token.md) )  for each trade which will be deducted from the transaction of the asset received by the trader.

| Trading Fees        | 0.5% |
| ------------------- | ---- |
| Liquidity Providers | 0.2% |
| GDEX Shares         | 0.3% |

{% hint style="info" %}
Trading fess are change-able with governance protocols
{% endhint %}

## How to Swap ?

There are 2 type of swap in Garuda DeFi :&#x20;

1. **Pool-to-pool swap,** heads up to <https://garuda-defi.org/swap> this will allow user to swap quickly within liquidity pools or based on the route from the registered pair in Garuda DeFi.

<figure><img src="/files/B7KGpBY2sCb14i2AA21s" alt=""><figcaption><p>Pool-to-pool swap</p></figcaption></figure>

2. **Pool swap,** swap from registered pool on Garuda DeFi  <https://garuda-defi.org/market> with trading graphic and transaction history information.

<figure><img src="/files/ammLqMlwBYImUn3XUOQW" alt=""><figcaption><p>Pool swap</p></figcaption></figure>
