Alpha Leak receives every Pump.fun on-chain event the moment it is confirmed — trades, token creations, and graduations — and decodes each one into a typed event before routing it to the relevant pipeline services. Nothing is polled. Nothing is batched at the network level. Every event is handled as it arrives, keeping the gap between on-chain confirmation and downstream processing as small as possible.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/0xW1re/solvedocs/llms.txt
Use this file to discover all available pages before exploring further.
Event types
Every piece of activity on Pump.fun produces one of three event types. The pipeline processes all three.| Event type | Trigger | Key fields |
|---|---|---|
trade | Any buy or sell on a bonding curve | mint, wallet, solAmount, tokenAmount, isBuy, virtual reserves |
create | A new token is launched | mint, name, symbol, uri, bondingCurve, creator |
complete | A token graduates to Raydium | mint, bondingCurve |
Event routing
TheEventProcessor is the fan-out hub. Every decoded event is dispatched simultaneously to the services that need it — nothing waits for anything else.
On create:
CurveManagerinitialises the in-memory bonding curve state for the token.TradeWriterpersists the token record to the database.GenesisWatcheropens a 60-second observation window for the new token.
trade:
CurveManagerupdates the live curve state with new reserve values.TradeWriterbuffers the trade for high-throughput batch persistence.VelocityTrackerupdates rolling 60-second and 300-second buy counts.SignalEmitterevaluates whether the trading wallet is tracked and, if so, assembles a signal.CandleAggregatorupdates 1-minute OHLCV candles.GenesisWatcherfeeds the trade into any active observation window for that token.
complete:
CurveManagermarks the token graduated and emits agraduationevent.WalletDiscoveryfinds new wallets worth tracking from the token’s buyer list.- The token is promoted to enhanced price tracking.
CurveManager
TheCurveManager maintains a live state object for every active token, updated with each trade. This is the system’s ground truth for bonding curve state — it never requires a database query to answer “what is the current price of this token?”
Each state tracks:
- Real and virtual SOL and token reserves
- Total buy and sell counts and unique buyer count
- Total SOL volume
- First buyer wallet and timestamp
- Graduation status and timestamp
When a token crosses 85 SOL in reserves,
CurveManager emits a graduation event, triggering WalletDiscovery and enhanced price tracking automatically.Trade batching
Rather than writing each trade to the database individually,TradeWriter accumulates events in memory and flushes them in batches of up to 200 events, at most every second. This keeps write throughput high during burst periods — when a token goes viral and dozens of trades arrive per second — without adding measurable latency from the signal pipeline’s perspective.
The batch parameters balance two competing concerns:
- Batch size (200 events): large enough to amortise write overhead across many trades.
- Flush interval (1 second): small enough that trades are persisted before downstream services need them for feature computation.
Velocity tracking
VelocityTracker maintains rolling buy counts updated on every incoming trade event:
| Metric | Description |
|---|---|
buysLast60s | Number of distinct buys in the last 60 seconds |
buysLast300s | Number of distinct buys in the last 300 seconds |
solLast60s | SOL volume bought in the last 60 seconds |
TokenLifecycle state transitions in Phase 2.