> For the complete documentation index, see [llms.txt](https://hweippy.gitbook.io/copychain/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hweippy.gitbook.io/copychain/getting-started/intro.md). Agents can also search and read this documentation through its [MCP server](https://hweippy.gitbook.io/copychain/~gitbook/mcp).

# Introduction

{% hint style="info" %}
This documentation covers every part of CopyChain, so it can feel like a lot. You don't have to read it all: point your AI agent (Claude, ChatGPT, Codex or another) at `https://hweippy.gitbook.io/copychain/llms-full.txt`, the whole documentation in one file, and ask it your questions in chat.
{% endhint %}

## What CopyChain is

[CopyChain](https://copychain.cc/) is a Solana arbitrage terminal. It runs on your Linux server and you use it from a browser, on a desktop or a phone.

<figure><img src="https://591094602-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfAbmrVzryv9CpULapTxA%2Fuploads%2FtERDT8RpaeQSZ7VMlCBp%2Fcopychain-intro-desktop.png?alt=media" alt="CopyChain web terminal on a desktop: landed arbitrages chart, wallets table, live pools and successes feed"><figcaption><p>The web terminal on a desktop</p></figcaption></figure>

<figure><img src="https://591094602-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfAbmrVzryv9CpULapTxA%2Fuploads%2F3cvdHylv6Wr5xQTIwsB5%2Fcopychain-intro-phone.png?alt=media" alt="CopyChain web terminal on a phone: the successes feed with the Live, Pools and Successes tabs" width="320"><figcaption><p>The same terminal on a phone</p></figcaption></figure>

CopyChain does two jobs:

* **It watches the arbitrage market.** It reads every transaction of the known arbitrage programs in real time. It shows which wallets land arbitrages, on which mints and pools, with their profit, their fees and how they send. It also shows the pools that move now.
* **It runs your own arbitrage.** A config tells CopyChain what to trade and how to send. Each config runs in one of three modes:

| Mode           | What it trades                                                                                                         | Config key       |
| -------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------- |
| Copy wallets   | The mints and pools of the wallets you pick. A copy session starts when the wallet starts one and stops when it stops. | `copy_pubkeys`   |
| Static markets | Groups of pools that you pick. They run continuously.                                                                  | `[[markets]]`    |
| Auto Markets   | Pools that CopyChain picks itself, from the live price movement and activity of the market.                            | `[auto_markets]` |

Several configs can run at the same time, each with its own signing wallet. See [Trading modes](https://hweippy.gitbook.io/copychain/using-copychain/trading-modes.md) for the flow.

{% hint style="info" %}
Since v5, the web terminal (`copychain server`) is the way to use CopyChain. Most of the command line is deprecated: `update` and the lookup table commands are not. See [Command line](https://hweippy.gitbook.io/copychain/using-copychain/commands.md).
{% endhint %}

{% hint style="info" icon="gem" %}
CopyChain sends its arbitrage through **Prism**, an on-chain execution engine ([Solscan](https://solscan.io/account/Prism8hsRo6Ww5jiN5Zeh3YDPLZHqHduCPSAV7JF7qv), [Prism SDK on GitHub](https://github.com/Hweippy/prism-client-sdk)). Prism checks the profit while the transaction runs. When there is none, the transaction reverts (it fails and changes nothing), so a failed attempt costs only its fees.
{% endhint %}

## Supported markets

<table><thead><tr><th width="207.333251953125">Market</th><th>Address</th></tr></thead><tbody><tr><td>Raydium v4</td><td>675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8</td></tr><tr><td>Raydium CP</td><td>CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C</td></tr><tr><td>Raydium CLMM</td><td>CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK</td></tr><tr><td>Whirlpool</td><td>whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc</td></tr><tr><td>Meteora DLMM</td><td>LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo</td></tr><tr><td>Meteora DAMM V2</td><td>cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG</td></tr><tr><td>Meteora Pools</td><td>Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB</td></tr><tr><td>PumpfunAmm</td><td>pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA</td></tr><tr><td>PancakeSwap</td><td>HpNfyc2Saw7RKkQd8nEL4khUcuPhQ7WwY1B2qjx8jxFq</td></tr><tr><td>Byreal</td><td>REALQqNEomY6cQGZJUGwywTBD2UmDT32rZcNnfxQ5N2</td></tr><tr><td>Humidifi</td><td>9H6tua7jkLhdm3w8BvgpTn5LZNU7g4ZynDmCiNN3q6Rp</td></tr><tr><td>Manifest</td><td>MNFSTqtC93rEfYHB6hF82sKdZpUDFWkViLByLd1k1Ms</td></tr><tr><td>AlphaQ</td><td>ALPHAQmeA7bjrVuccPsYPiCvsi428SNwte66Srvs4pHA</td></tr><tr><td>Goonfi v2</td><td>goonuddtQRrWqqn5nFyczVKaie28f3kDkHWkHtURSLE</td></tr><tr><td>SolFi v2</td><td>SV2EYYJyRz2YhfXwXnhNAevDEui5Q6yrfyo13WtupPF</td></tr><tr><td>Futarchy</td><td>FUTARELBfJfQ8RDGhg1wdhddq1odMAJUePHFuBYfUxKq</td></tr><tr><td>Fusion</td><td>fUSioN9YKKSa3CUC2YUc4tPkHJ5Y6XW1yz8y6F7qWz9</td></tr><tr><td>BisonFi</td><td>BiSoNHVpsVZW2F7rx2eQ59yQwKxzU5NvBcmKshCSUypi</td></tr><tr><td>Tessera</td><td>TessVdML9pBGgG9yGks7o4HewRaXVAMuoVj4x83GLQH</td></tr><tr><td>ZeroFi</td><td>ZERor4xhbUycZ6gb9ntrhqscUcZmAbQDjEAtCf4hbZY</td></tr><tr><td>Meteora DLMM Pro</td><td>dPro1D5wiqnGMH8vMDG23jh35btTHoWdyqXjqkqxe8n</td></tr><tr><td>Hylo</td><td>HYEXCHtHkBagdStcJCp3xbbb9B7sdMdWXFNj6mdsG4hn</td></tr><tr><td>Archer</td><td>Archer8kgiavM61GyusMzaaS2ft5sALtNsD1HxkUPMhy</td></tr></tbody></table>

Copy wallets and static markets can use every market in this table. Auto Markets picks its pools from a shorter list of venues. See [Auto Markets](https://hweippy.gitbook.io/copychain/using-copychain/trading-modes/auto-markets.md).

## Arbitrage styles on Solana

CopyChain is made for one style of arbitrage. This part explains the two common styles, so you can pick the wallets and markets that fit.

### Backrun

A backrun sends a transaction as soon as possible after a target transaction, usually a large swap, to take the price gap that the swap leaves. The goal is to land in the same slot as the target or in the next one, so backrun bots send directly to the leader.

* Pros: lower total fees, because the bot sends only when it sees a specific opportunity.
* Cons: it needs top infrastructure, low-latency access to transactions before they land, or private partners.

The image below shows a wallet whose backrun attempts land in slots apart from each other, just after the trades they target:

<figure><img src="https://591094602-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfAbmrVzryv9CpULapTxA%2Fuploads%2FFkYSKP1PaJvkkm38HAOl%2Fimage.png?alt=media&amp;token=1014cf82-1a0c-472b-9be1-2f5527417781" alt="Transaction history of a backrun wallet: attempts in separate slots, each just after a target trade"><figcaption></figcaption></figure>

{% hint style="warning" %}
CopyChain is not made for backrunning. Bots with direct access to the leader or to private transaction flows land before it.
{% endhint %}

### Scan (blind spam)

A scan sends a continuous stream of transactions without a specific trigger. Each transaction tries to close a possible price gap between pools. An on-chain program checks the profit when the transaction runs and reverts it when there is none.

* Most scan transactions revert. The strategy pays when the profit of the hits is larger than the fees of all the attempts.
* Pros: always on chain, ready for any change of state. It needs no special infrastructure. A steady landing rate matters more than raw speed.
* Cons: a constant cost in fees for the transactions that revert.

The image below shows a scan wallet: many reverted transactions, then a successful arbitrage:

<figure><img src="https://591094602-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfAbmrVzryv9CpULapTxA%2Fuploads%2FoVx59IY5PEaFX1uwj65f%2Fimage.png?alt=media&amp;token=e28f72ab-9d89-40b7-b892-b9848602b5e5" alt="Transaction history of a scan wallet: many reverted attempts and one successful arbitrage"><figcaption></figcaption></figure>

{% hint style="success" %}
CopyChain is made for scans. It keeps a steady flow of transactions on chain, and Prism reverts the ones that find no profit.
{% endhint %}

## Next steps

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Requirements</strong></td><td>The server, RPC and gRPC that CopyChain needs.</td><td><a href="https://hweippy.gitbook.io/copychain/getting-started/requirements.md">Requirements</a></td></tr><tr><td><strong>Quick start</strong></td><td>Install, start the web terminal and run a first config.</td><td><a href="https://hweippy.gitbook.io/copychain/getting-started/quick-start.md">Quick start</a></td></tr><tr><td><strong>Web terminal</strong></td><td>Every view of the terminal, on desktop and phone.</td><td><a href="https://hweippy.gitbook.io/copychain/using-copychain/web-terminal.md">Web terminal</a></td></tr><tr><td><strong>Trading modes</strong></td><td>Copy wallets, static markets and Auto Markets.</td><td><a href="https://hweippy.gitbook.io/copychain/using-copychain/trading-modes.md">Trading modes</a></td></tr></tbody></table>
