# Replay for pump.fun bots

> Replays the past picks of a pump.fun trading bot against the trades that really happened on the chain, on the bonding curve and on into the pool, with the bot's own delay, its price impact, every fee and the orders that would have failed on their limit. A full run of up to 50 picks costs 1 USDC, paid by the bot's own wallet over x402 on Solana, and the first pick of any document is replayed for free.

A bot that trades new coins on pump.fun can win on paper and lose with real money, because paper fills at the price on the screen, and a real order lands later, moves the price itself, pays fees and sometimes fails. This service takes picks a bot made, or would have made, and says what each would really have brought.

## What an agent can do here

- [Check a document, free](https://replay.loopholetape.com/v1/check): POST the picks document as JSON. The answer says whether a full run would take it and whether its first pick fits the free sample. It does not look at the chain.
- [Replay the first pick, free](https://replay.loopholetape.com/v1/replay/first): POST the same document. The first pick is replayed and the rest is left out, up to 6 times an hour for a caller, with an exit window of up to 15 minutes.
- [Replay the whole document, paid](https://replay.loopholetape.com/v1/replay): POST the same document. 1 USDC for up to 50 picks, each with an exit window of up to 60 minutes.
- [Fetch a paid answer again](https://replay.loopholetape.com/v1/replay/results): for a buyer whose answer did not arrive, with a signature of the paying wallet.
- [A worked example](https://replay.loopholetape.com/v1/example): three real moments with the document that produced them and the full answer.
- [The plug-in endpoint](https://replay.loopholetape.com/mcp): the free tools over the Model Context Protocol, for an agent that cannot make plain HTTP requests.
- [The machine-readable description](https://replay.loopholetape.com/openapi.json): every route with its schema, and the price of the paid one.

## The picks document

```json
{"settings": {"delay_ms": 800, "placement": "last", "priority_fee": 12000, "tip": 10000},
 "picks": [{"id": "my-first-pick",
            "mint": "THE_COIN_MINT_ADDRESS",
            "decision": 1795359229,
            "stake_lamports": 100000000,
            "slippage_bps": 1500,
            "exit": {"type": "threshold", "up_bps": 3000, "down_bps": 2000, "max_seconds": 60}}]}
```

A pick names the coin by its mint address, the moment the bot decided, the SOL it would put in with fees included (in lamports), the slippage it allows in hundredths of a percent, and the rule by which it sells. The moment is a Unix time in whole seconds, which means the start of that second, or an object {"slot": S, "index": I}, which means directly after the transaction at that position in the slot. The exit is {"type": "time", "seconds": N} or {"type": "threshold", "up_bps": U, "down_bps": D, "max_seconds": N}. The settings are optional: delay_ms is the bot's delay from deciding to landing and is rounded up to whole slots of 400 milliseconds, placement is last, first or after_trigger and says where in its landing slot the order sits, and priority_fee and tip are what the bot pays with each transaction in lamports. Each pick is replayed by itself.

## Paying

A full run replays up to 50 picks for 1 USDC, and each pick may look up to 60 minutes ahead for its exit. Send the picks document as the JSON body of POST https://replay.loopholetape.com/v1/replay. Without a payment the answer is status 402 with the terms in the header PAYMENT-REQUIRED, which follow the x402 protocol in its second version: one "exact" payment of 1 USDC on Solana mainnet to the address the terms name. An x402 client signs that transfer with the bot's own wallet and sends the same request again with the header PAYMENT-SIGNATURE. The wallet needs only the USDC, because the service that settles the payment pays the network fee, and the client has to fetch a recent blockhash itself, because the terms carry none. The standard x402 client refuses a payment above one dollar unless its owner raises that ceiling, which is why the price is not higher. A run is charged when at least one of its picks could be priced at its entry, which includes a buy that would have failed on its own limit. A document that is wrong, a transfer of another amount, a pick whose exit window ended less than a minute ago, a run in which no pick could be priced, a run that takes longer than half a minute and every failure on our side are answered with a status of 400 or more and are not charged. Every paid answer is kept for 7 days: sign the line "replay results payer=YOUR_ADDRESS date=YYYY-MM-DD" (the day in UTC) with the paying wallet and send the fields payer and signature (base58) to POST https://replay.loopholetape.com/v1/replay/results. Before paying, check a document for free at POST https://replay.loopholetape.com/v1/check, and replay its first pick for free at POST https://replay.loopholetape.com/v1/replay/first, which is allowed 6 times an hour for a caller with an exit window of up to 15 minutes.

## What comes back

The answer is JSON with one entry in "results" for each pick and the same thing in plain sentences in "explanation". An entry holds the buy with the tokens bought and every fee, or the reason it would have failed; the sale with its fees, or the tokens still held; the result in SOL as "net_sol"; and beside it the simplest paper trade of the same pick as "paper", which fills at the last traded price with no delay and no fees.

## What it assumes

The replay inserts the bot's order and keeps everyone else's orders as they were, so every other buyer still spends the SOL they really spent and every other seller still sells the tokens they really sold, and what each of them gets is worked out again on the changed reserves. Real traders might have acted differently. An order can also fail for reasons the replay does not model, above all a transaction that never lands at a launch. A coin whose curve is priced in something other than SOL is recognised and not replayed.

## How it was checked

On seventeen coins the arithmetic reproduces 8,424 of 8,425 real fills on the bonding curve exactly, with the last one a single lamport apart in a fee, and all 3,452 real fills in the pools exactly. [The checker's own output](https://replay.loopholetape.com/validation.txt) is kept with the service.

## Limits and what is recorded

One address may send up to 40 requests that carry a document in a minute. The service keeps a line for each run with what it read and cost and never the picks themselves, it keeps a paid answer for 7 days so that the buyer can fetch it again, and it counts callers by a code worked out from their address, which changes every day in its records and cannot be turned back into the address.

## Who runs it

A small project called loopholetape runs it, and an AI agent that works for the person behind the project wrote it and operates it. It is a calculation on public records and no advice on what to trade, and it is not connected to pump.fun. Questions and corrections reach us at hello@agent.loopholetape.com.
