Detecting tokens migrating from Pump.fun to Pump Swap AMM
Real-time Tracking Pump.fun to Pump Swap Migrations for Trading Bots
Last updated
Was this helpful?
Real-time Tracking Pump.fun to Pump Swap Migrations for Trading Bots
Last updated
Was this helpful?
Tokens launched on Pump.fun, a popular Solana-based bonding curve platform, often begin with liquidity controlled by a bonding curve contract. Once a token gains traction and trading volume, its liquidity is typically migrated to the Pump.fun AMM (Automated Market Maker) to enable more efficient trading and integration with the broader DeFi ecosystem.
This token migration process involves shifting liquidity from the bonding curve pool to a standard AMM pool (like Raydium under the hood), providing better price discovery, lower slippage, and compatibility with tools like DEX aggregators, portfolio trackers, and Solana DeFi bots. Developers and traders tracking new tokens can monitor these migrations to identify promising tokens entering the next phase of growth.
The complete source code for this project is available on GitHub.
Please feel free to clone the repository and try it out. Additionally, you will find other relevant and useful code examples related to gRPC and streaming .
This project consists of two key components:
Streaming Pump.fun Transactions via Yellowstone gRPC
Parsing those transactions using the program's IDL
Identify migrate
transactions
The first step involves initializing the Solana Yellowstone Client. You can get Solana Yellowstone gRPC access from the Shyft Dashboard. Please check out our for more details.
Once you have the authentication details, you can initialize the client in the following manner,
You can use any Yellowstone gRPC endpoint with this client. An access token is optional, as some gRPC services don't require authentication.
The Rust client supports several additional options, as demonstrated in the example above. Most of these options are also available for the TS client, where they are passed as the third argument to the Client
constructor.
To specify what on-chain data, we send a SubscribeRequest
over the existing Solana Yellowstone gRPC client. These Request allows you to filter for specific accounts, transactions, slots, or other Solana on-chain events, giving you full control over the data you receive.
To identify when a token migrates from Pump.fun to the Pump.fun AMM, we inspect the parsed instructions. Specifically, we look for transactions containing a migrate
instruction in the decoded instruction list.
You can find out more about here. The example below demonstrates how to initiate a gRPC stream by sending a SubscribeRequest
using a standard gRPC client:
Once established, the stream will begin sending data directly to your application. You have the flexibility to on the fly, allowing you to change the data specifications you receive without stopping your stream. For more details on , or , you can find additional information in our .
Once a raw Solana transaction is received via the Yellowstone gRPC stream, it must be parsed to extract meaningful, human-readable data. For JavaScript/TypeScript applications, we use , which decodes the transactions received from the gRPC into structured data based on the respective program's IDL. On Rust however, we use a interface generated by to parse the transaction instruction.
– In-depth technical docs for implementing real-time streaming with Yellowstone gRPC and Geyser plugin on Solana.
– Guides, use cases, and performance benchmarks for building low-latency Solana applications using gRPC-based infrastructure.
– Ready-to-use code snippets and integrations for common DeFi protocols, transaction parsers, and real-time Solana data streaming use cases.