# Introduction

## Introduction

Welcome to the [CopyChain](https://copychain.cc/) documentation.&#x20;

`copychain` is a Linux tool that allows you to copy onchain trading sessions of any arbitrage bots.

A session in `copychain` refers to a set of transactions, with mints and pools, performed by a wallet for a given time. The tool starts copying when the target wallet begins a session and stops when it ends.

{% hint style="warning" %}
This tool is designed to work exclusively for Linux copying "onchain" arbitrage bots, without "offchain" router.
{% endhint %}

What this tool is able to copy:

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

## 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 %}


---

# 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://hweippy.gitbook.io/copychain/getting-started/intro.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.
