> For the complete documentation index, see [llms.txt](https://docs.shadowdex.fi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.shadowdex.fi/introduction-to-shadow/amm-dex-functionalities/swaps.md).

# Swaps

## <mark style="color:orange;">Please visit</mark> [<mark style="color:orange;">docs.shadow.so</mark>](https://docs.shadow.so/) <mark style="color:orange;">these are depreciated.</mark>&#x20;

## <mark style="color:orange;">Web app is available at</mark> [<mark style="color:orange;">shadow.so</mark>](https://www.shadow.so/)

On SHADOW, similar to other decentralized exchanges (DEXs), users engage with the platform to make swaps of tokens from available liquidity pairs.  The slippage and trade price for a swap are determined based on the total value locked in the liquidity pairs and whether arbitrage activities have balanced the pool to its market rate. &#x20;

SHADOW features two types of Liquidity Pools, each with its own swap curve:

* Volatile (UniV2-Style): This is the basic type of pool where tokens are paired with equal weights in terms of dollar value. The volatile swap curve is used to facilitate trades within these pools and is best suited for tokens with prices that may be subject to fluctuation in market prices.
  * The volatile swap curve used is:

$$
x\*y=k
$$

* Correlated (Andre Cronje-Style): Shadow also makes available a high efficiency stable swap curve that is designed for stable coins and other tokens that do not fluctuate greatly in price.  The stable swap curve, devised by Andre Cronje, offers near-zero slippage and allows for ultra-efficent stable swaps.
  * The stable swap curve used is:

$$
x^{3}y \ +y^{3}x \geq k
$$

## Graphical Representation of The Swap Curves

To provide a graphical representation of the swap curves, the graph below illustrates the variance between 0 and 100. It demonstrates that the Green (Correlated) curve exhibits less slippage from the mean as the K value fluctuates.

{% embed url="<https://www.desmos.com/calculator/5l0tnmuqh9>" %}
Green = StableSwap Curve, Red = Volatile Swap Curve
{% endembed %}

This visualization helps users understand the behavior of the swap curves and the corresponding slippage levels associated with different values of K. SHADOW aims to provide an optimized trading experience with minimal slippage, enhancing liquidity provision and ensuring efficient token swaps for users.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.shadowdex.fi/introduction-to-shadow/amm-dex-functionalities/swaps.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
