# Slingshot Integration

## Scope

This guide consolidates integration-critical details for Slingshot modules:

* Swap
* Bridge
* Migrate
* Yield

Related product docs:

* [Swap](/defi/slingshot/swap.md)
* [Bridge](/defi/slingshot/bridge.md)
* [Migrate](/defi/slingshot/migrate.md)
* [Yield](/defi/slingshot/yield.md)

## Network Context

| Network              | Chain ID   | RPC URL                                       |
| -------------------- | ---------- | --------------------------------------------- |
| **Goliath Testnet**  | `8901`     | `https://rpc.testnet.goliath.net`             |
| **Ethereum Sepolia** | `11155111` | `https://ethereum-sepolia-rpc.publicnode.com` |

{% hint style="danger" %}
XCN decimal behavior differs by context. Re-check [XCN Decimal Handling](/developer-guide/decimal-handling.md) before integrating value math across RPC/UI/contracts.
{% endhint %}

## Contract Registry

| Domain             | Contract                 | Network | Address                                      | Status                                                                             |
| ------------------ | ------------------------ | ------- | -------------------------------------------- | ---------------------------------------------------------------------------------- |
| **Yield**          | stXCN Proxy (UI/testing) | Goliath | `0x18da8D438a030B530Aba59Ae0aD1942bEB14a9cE` | Live                                                                               |
| **Yield**          | stXCN Implementation     | Goliath | `0xb351e224466F45fe652F7Dfd577dAB7A6717aBfC` | Live                                                                               |
| **Yield/Migrate**  | BridgeStakingAdapter     | Goliath | `0x899fd7C568e9040F4320e3f23B05DC340ec2aA78` | Live                                                                               |
| **Migrate**        | Sepolia Staking          | Sepolia | `0xc50B664BA11F5558b8FF7358bb7C576542655D54` | Live                                                                               |
| **Migrate/Bridge** | Sepolia XCN (ERC20)      | Sepolia | `0x7a8adc542A35c93da263A188367F4bF4c445B8E9` | Live                                                                               |
| **Migrate**        | Sepolia Staked XCN       | Sepolia | `0xc50B664BA11F5558b8FF7358bb7C576542655D54` | Staked position contract in this codebase (no separate ERC20 staked token address) |
| **Bridge**         | Bridge Contract          | Sepolia | `0xA9FD64B5095d626F5A3A67e6DB7FB766345F8092` | Live                                                                               |
| **Bridge**         | Bridge Contract          | Goliath | `0x2c1d218B5a97a26D144ffd12d5C813590f93FFEB` | Live                                                                               |
| **Bridge**         | Bridged ETH Token        | Goliath | `0xEd02AA7dd3f105EDab8702D859781CAfF111324b` | Live                                                                               |
| **Swap**           | UniswapV2Factory         | Goliath | `0x561B0342878bcdeF1a7E7D9BA7654B3C84A81819` | Live                                                                               |
| **Swap**           | UniswapV2Router02        | Goliath | `0x1D6B8ad12C72893f89844418DC03999298D9ABF4` | Live                                                                               |
| **Swap**           | WXCN                     | Goliath | `0x88A07F7BBb61A2945D8Ac541461fc62efb1F4066` | Live                                                                               |
| **Swap**           | Multicall3               | Goliath | `0xF912C1ad454aaaE03A1d72C53702F3dc0B4fcb69` | Live                                                                               |

## Integration Notes by Module

### Swap

* Use router quotes (`getAmountsOut`) before submitting swaps.
* Normalize decimal handling per-token (USDC 6, WXCN 8, ETH 18).

### Bridge

* Typical write methods: `depositNative`, `deposit`, `burn`.
* Monitor progress with bridge API + chain events.

### Migrate

* Migrate flows span Sepolia and Goliath transactions.
* Build reconciliation around source tx hash, bridge status, and destination settlement.

### Yield

* Rewards accrue by cumulative index; no explicit claim tx loop.
* Use `unstake()` path for exit to XCN.

## Test Setup (Faucet)

Use the [Telegram Faucet Bot](https://t.me/GoliathFaucetBot):

```
/request <ADDRESS>
/request <ADDRESS> sepoliaxcn
/request <ADDRESS> sepoliaxcn staked
```

`/request <ADDRESS>` now returns XCN on Goliath, XCN on Sepolia, and ETH/BTC on Goliath.

## Recommended Validation Checklist

* Verify contract addresses against explorer before deployment.
* Confirm chain ID before every write transaction.
* Add monitoring for both Sepolia and Goliath in cross-chain flows.
* Keep contract addresses externalized in config so upgrades can be rolled out without app redeploys.


---

# 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.goliath.net/developer-guide/slingshot-integration.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.
