# 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>


---

# 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.garuda-defi.org/products/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.
