Skip to main content

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.

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.

Event types

Every piece of activity on Pump.fun produces one of three event types. The pipeline processes all three.
Event typeTriggerKey fields
tradeAny buy or sell on a bonding curvemint, wallet, solAmount, tokenAmount, isBuy, virtual reserves
createA new token is launchedmint, name, symbol, uri, bondingCurve, creator
completeA token graduates to Raydiummint, bondingCurve

Event routing

The EventProcessor is the fan-out hub. Every decoded event is dispatched simultaneously to the services that need it — nothing waits for anything else. On create:
  • CurveManager initialises the in-memory bonding curve state for the token.
  • TradeWriter persists the token record to the database.
  • GenesisWatcher opens a 60-second observation window for the new token.
On trade:
  • CurveManager updates the live curve state with new reserve values.
  • TradeWriter buffers the trade for high-throughput batch persistence.
  • VelocityTracker updates rolling 60-second and 300-second buy counts.
  • SignalEmitter evaluates whether the trading wallet is tracked and, if so, assembles a signal.
  • CandleAggregator updates 1-minute OHLCV candles.
  • GenesisWatcher feeds the trade into any active observation window for that token.
On complete:
  • CurveManager marks the token graduated and emits a graduation event.
  • WalletDiscovery finds new wallets worth tracking from the token’s buyer list.
  • The token is promoted to enhanced price tracking.

CurveManager

The CurveManager 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
This state is mirrored into the cache layer in real time, so the live trader’s exit monitor can read the current price of any open position without a database round-trip.
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:
MetricDescription
buysLast60sNumber of distinct buys in the last 60 seconds
buysLast300sNumber of distinct buys in the last 300 seconds
solLast60sSOL volume bought in the last 60 seconds
These values are attached to every signal payload and are key features in both the ML models and the rule-based scorer. A spike in velocity is typically the first observable indicator that a token is gaining momentum, and it drives the TokenLifecycle state transitions in Phase 2.

Build docs developers (and LLMs) love