DEV Community

TateLyman
TateLyman

Posted on

copy trading on solana — how it works and what to watch out for

copy trading sounds great in theory. find a wallet that's been making money, mirror their trades, profit. on solana it's actually possible because everything is on-chain and fast enough to keep up.

but there's a lot of stuff nobody tells you about until you've already lost money. let me break down how it actually works and where it falls apart.

how copy trading works on solana

the basic idea is simple:

  1. you find a wallet address that's been profitable
  2. you monitor it for new transactions
  3. when it buys a token, you buy the same token
  4. when it sells, you sell

on solana you can do this because every transaction is public. you can subscribe to account changes using websockets through an RPC node.

here's what the monitoring part looks like in practice:

const { Connection, PublicKey } = require('@solana/web3.js');

const connection = new Connection('https://api.mainnet-beta.solana.com');
const walletToFollow = new PublicKey('TARGET_WALLET_HERE');

connection.onAccountChange(walletToFollow, (accountInfo) => {
  // wallet state changed — they probably made a trade
  // now you need to figure out WHAT they traded
  console.log('account changed, checking recent txs...');
});
Enter fullscreen mode Exit fullscreen mode

the tricky part isn't detecting the trade. it's figuring out what they actually did. you need to parse the transaction, identify the token swap, extract the mint address, and then build your own swap transaction.

parsing swap transactions

most trades on solana go through jupiter or raydium. each has different instruction formats. you're basically looking at the transaction logs and pulling out:

  • which token they swapped from
  • which token they swapped to
  • how much they spent
  • which DEX they used
async function getRecentSwap(connection, wallet) {
  const sigs = await connection.getSignaturesForAddress(wallet, { limit: 1 });
  if (!sigs.length) return null;

  const tx = await connection.getParsedTransaction(sigs[0].signature, {
    maxSupportedTransactionVersion: 0
  });

  // look through inner instructions for token transfers
  const tokenTransfers = tx.meta.innerInstructions
    ?.flatMap(ix => ix.instructions)
    .filter(ix => ix.program === 'spl-token' && ix.parsed?.type === 'transfer');

  return tokenTransfers;
}
Enter fullscreen mode Exit fullscreen mode

this gives you the raw transfers. from there you need to figure out which token they bought and build your own swap.

where it goes wrong

1. latency kills you

the wallet you're copying gets a better price than you. always. by the time you detect their transaction, confirm it, parse it, build your swap, and submit it — the price has already moved. on memecoins this can be 5-20% slippage easily.

2. MEV bots front-run you

your copy trade transaction is just sitting in the mempool. sandwich bots will see it and extract value from you. the original trader might be using jito bundles or priority fees that protect them. you probably aren't.

3. you don't know their full strategy

maybe that wallet bought 5 SOL of a token as a small test. they might sell in 10 minutes. or they have inside info you don't have. you're copying the action without the context.

4. liquidity issues

if the token has thin liquidity, your additional buy pushes the price up even more. now you've bought at a worse price AND created more sell pressure for when you both try to exit.

5. the wallet might be a honeypot

some wallets are set up specifically to be copy traded. they accumulate followers, then buy tokens where they're the liquidity provider. when copy traders pile in, they pull liquidity. rug complete.

what actually works better

instead of blindly copying trades, it's way more useful to:

  • track multiple wallets and only act when several of them buy the same token
  • set size limits — never copy a trade that's more than a small % of your portfolio
  • add delay filters — if a token pumped 50% since the wallet bought, skip it
  • watch for patterns — some wallets are consistently early on tokens that 10x. those are the ones worth watching
// basic multi-wallet consensus filter
function shouldCopyTrade(tokenMint, recentTrades) {
  const walletsTrading = recentTrades
    .filter(t => t.mint === tokenMint)
    .map(t => t.wallet);

  const uniqueWallets = new Set(walletsTrading);

  // only trade if 3+ tracked wallets bought the same token
  return uniqueWallets.size >= 3;
}
Enter fullscreen mode Exit fullscreen mode

tools i use for this

i built a telegram bot (@solscanitbot) that handles a lot of this. it tracks wallets, monitors for new token buys, and has copy trading built in. the alpha signals feature specifically looks for multi-wallet consensus before alerting.

it's free to use for basic stuff like wallet tracking, token scanning, and trade monitoring. the copy trading and alpha signals are premium features but honestly just monitoring wallets and making your own decisions is usually the better play anyway.

the honest take

copy trading on solana can work but it's not the free money machine people make it seem. the biggest winners are people who use wallet tracking as research rather than blindly copying. find wallets that are consistently early, watch what they buy, do your own analysis, and then decide.

the latency and front-running problems mean you'll almost always get a worse entry than the wallet you're copying. factor that into your expectations.

if you want to try it, start small. like really small. figure out the mechanics before you put real money in. and never copy trade more than you can afford to lose on a single trade.


if you want to play with wallet tracking and copy trading on solana, check out @solscanitbot on telegram. it's free to start and you can see how the tracking works before committing to anything.

Top comments (0)