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

# Swap

## Overview

Swap is Slingshot's AMM module for trustless token trading on Goliath Testnet.

**Access:** <https://slingshot.goliath.net/#/swap>

Swap uses a Uniswap V2-style constant product model:

```
x * y = k
```

A **0.3% fee** is charged on swaps:

* **0.25%** to liquidity providers
* **0.05%** to protocol

## Supported Tokens (Goliath Testnet)

| Token                  | Contract Address                             | Decimals | Status  |
| ---------------------- | -------------------------------------------- | -------- | ------- |
| **WXCN** (Wrapped XCN) | `0x88A07F7BBb61A2945D8Ac541461fc62efb1F4066` | 8        | Live    |
| **ETH**                | `0xEd02AA7dd3f105EDab8702D859781CAfF111324b` | 18       | Live    |
| **BTC**                | `0x8b2a7658acD9CA5b4e207F94a0101598c7B678F8` | 8        | Live    |
| **USDC**               | `0x4BE65Dce1D79B8728485B759eE06cC8053E824F4` | 6        | Live    |
| **USDT**               | `0x03cDCCa25A46Bc5F3F484096217de52C8c417c9D` | 6        | Live    |
| **GOLD**               | `0x3B0F44325fb8AaC485Cbe14502d979008341f652` | 18       | Pending |
| **SILVER**             | `0x6090499ccC04bD65BEd0b02D40f607B5348697F7` | 18       | Pending |

{% hint style="info" %}
XCN is the native gas token on Goliath. WXCN is the ERC20-wrapped form used in AMM pools.
{% endhint %}

## User Flow

1. Connect wallet on Goliath Testnet (Chain ID `8901`)
2. Choose input/output token pair
3. Set amount and review price impact/slippage
4. Approve token (first swap per token)
5. Confirm swap transaction

## Developer Notes

Core Swap contracts (Goliath Testnet):

| Contract              | Address                                      |
| --------------------- | -------------------------------------------- |
| **UniswapV2Factory**  | `0x561B0342878bcdeF1a7E7D9BA7654B3C84A81819` |
| **UniswapV2Router02** | `0x1D6B8ad12C72893f89844418DC03999298D9ABF4` |
| **Multicall3**        | `0xF912C1ad454aaaE03A1d72C53702F3dc0B4fcb69` |

Reference integration snippet:

```javascript
const ROUTER_ABI = [
  'function swapExactTokensForTokens(uint amountIn, uint amountOutMin, address[] path, address to, uint deadline) returns (uint[] amounts)',
  'function getAmountsOut(uint amountIn, address[] path) view returns (uint[] amounts)'
];
```

See full contract map in [Slingshot Integration Guide](/developer-guide/slingshot-integration.md).


---

# 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.goliath.net/defi/slingshot/swap.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.
