> 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).

# Introduction

## Introduction

Welcome to the [CopyChain](https://copychain.cc/) documentation.

CopyChain is a Linux tool for running Solana arbitrage in two distinct modes:

* **Copy trading:** Copy on-chain arbitrage sessions from selected wallets. CopyChain detects when a target wallet starts a session, reproduces its configured markets and transaction settings, and stops when that session ends.
* **Static markets:** Run continuously against fixed, user-configured sets of pools, without following or copying another wallet.

In copy-trading mode, a session is a time-bounded set of transactions, mints, and pools performed by a wallet. CopyChain starts copying when the target wallet begins that session and stops when it ends.

What CopyChain can copy in copy-trading mode:

* Another user's complete transaction (mints + pools) as "session": it starts when they start and stops when they stop
* Their Address Lookup Tables
* Their `compute_unit_limit`
* Their priority fees/third-party forwarders tips (optional)

What this tool is not meant to copy:

* Snipers
* Backrunners

{% hint style="info" icon="gem" %}
:rocket: CopyChain is powered by **Prism**, its on-chain execution engine ([Solscan Link](https://solscan.io/account/Prism8hsRo6Ww5jiN5Zeh3YDPLZHqHduCPSAV7JF7qv), [Github Prism SDK](https://github.com/Hweippy/prism-client-sdk)), built from the ground up in Pinocchio for low-CU, high-performance atomic arbitrage across supported DEX markets.
{% endhint %}

&#x20;Supported markets are:

<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></tbody></table>

## Backrun on Solana

Backrunning is the practice of executing a transaction as soon as possible after a specific "target" transaction—typically a large swap—to capture the resulting price imbalance. This strategy focuses on extracting value from the "state noise" or price displacement left in the wake of a trade.

On Solana, the goal is to land in the immediate wake of the target. Backrunning usually occurs via high-frequency submission directly to the leader. Searchers aim for a latency of 0 to 1 slots, racing to be the first to interact with the updated pool balances.

### Pros & Cons

* Pros: Lower total fee overhead, as transactions are only submitted when a specific, high-probability opportunity is identified.
* Cons: Requires top-tier infrastructure, low-latency mempool access, or relationships with private partners to see transactions before they are processed.

The following image displays a transaction history where the backrun attempts appear in discontinuous slots, trailing the specific target trades they aimed to capture:

<figure><img src="/files/ZDTODm92K0IzSyGDZd80" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
Copychain is generally not tailored for backrunning; due to the infrastructure requirements mentioned above, users will likely find themselves "behind" the highly optimized bots that have direct mempool or validator advantages.
{% endhint %}

## Arbitrage "Scans" (Blind Spamming)

Arbitrage Scanning, often referred to as "blind" or "probabilistic" arbitrage, is a strategy where searchers send a continuous stream of transactions to the network without waiting for a specific trigger. Instead of reacting to a single known trade, the bot "scans" the current market and maintains a steady flow of transactions that attempt to close potential spreads across liquidity pools.

This approach relies on the statistical probability of being present when an opportunity arises. By maintaining a constant flow, the "scan" method ensures that the searcher has a transaction ready to be processed at any given moment, catching opportunities that reactive bots might miss.

### Key Characteristics

* Blind Execution: Transactions are crafted based on the current or expected state of the chain, operating under the assumption that a profitable discrepancy will exist by the time the transaction is processed.
* High Reversion Rate: A significant majority of "scan" transactions fail. The strategy remains profitable as long as the gains from a single successful hit outweigh the cumulative cost of the fees paid for the failed attempts.
* On-chain Logic: Bots utilize custom smart contracts to perform "check-and-swap" routines. If the profit threshold is not met at the exact moment of execution, the contract reverts the transaction.

### Pros & Cons

* Pros: Can often perform better than backrunning since the bot is "always on-chain" and ready for any state change; requires almost no specialized infrastructure or mempool access. Success depends on landing rate consistency rather than raw reactive speed.
* Cons: High operational cost due to the continuous "bleeding" of fees while spamming transactions that ultimately revert.

The following image shows a series of "scan" attempts, highlighting the high frequency of reverted transactions punctuated by a successful arbitrage:

<figure><img src="/files/gGbXbcrh8PzI0qSkYZt7" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
Copychain is perfectly tailored for scanning strategies, as its architecture allows for the high-frequency, consistent transaction flow required to maintain an "always-on" presence on-chain.
{% endhint %}
