DEV Community

Nic Jordan
Nic Jordan

Posted on

How SolNexus Trade's ML Scoring Pipeline Turns On-Chain Signals Into Executable Trades

How SolNexus Trade's ML Scoring Pipeline Turns On-Chain Signals Into Executable Trades

A Solana ML trading bot needs more than a preset strategy — it needs an arithmetic engine that can read on-chain flow, assign a confidence score, and execute through verified Jupiter transactions without manual micromanagement. SolNexus Trade ships a four-layer scoring pipeline layered on top of Helius RPC whale/shark wallet polling and Jupiter/DexScreener token-price data, and the Emit Gate before execution. Here is how it works, and why the architecture matters for anyone trading on Solana.

The Four-Layer Scoring Pipeline

Every candidate signal enters the pipeline before it ever touches a trade. The stages run in series:

  1. L1 — Deterministic formula. Raw inputs — whale-flow magnitude, DEX pool breakout velocity, token-quality metrics across Raydium, Orca, and Meteora — are converted into a base confidence score using fixed weights. No hyperparameters drift here; this layer is reproducible and auditable.
  2. L2 — Historical reinforcement. Once enough closed trades exist, the system nudges the score based on how same-type signals actually performed. A breakout signal that consistently gave +15m / +1h / +4h outcomes gains a repunch; a false-breakout pattern gets discounted.
  3. L3 — Contextual Thompson Sampling bandit. This is the core ML layer. For each signal type, the policy maintains Beta(α, β) posteriors. Each closed trade's P&L updates those posteriors, which then influence new score estimates. Fresh bots start with weak posteriors (conservative sizing); the bandit learns aggression as samples accumulate — no retraining, no manual parameter sweep.
  4. L4 — Execution-policy score. Produces the final confidence_score, execution_confidence, and token_quality used downstream.

The pipeline is deterministic in architecture and stochastic only in the L3 posterior updates, which means scores are inspectable, not a black box.

L4 — The Execution-Policy Score

The final layer converts internal state into trade parameters: entry trigger tolerance, position sizing cap, take-profit ladder, and hard-stop distance. Unlike a one-size trading plan, L4 conditions on real-time token_quality and execution_confidence. A high-confidence breakout in a deep Orca pool gets a different sizing algorithm than a shallow Meteora micro-cap alert. This keeps the bot from over-positioning into low-liquidity setups that move against you on slippage.

On-Chain Market Dynamics: DEX Pool Analytics and Whale Flow

Solana speed is a feature, not an enemy, if you have the right data layer. The TokenPricePoller aggregates Jupiter quotes and DexScreener liquidity updates in real time so signals react within milliseconds, not minutes. The WalletAlertPoller tracks whale and shark wallets via Helius RPC, surfacing accumulation or distribution before it shows in aggregate social volume. Pool breakout signals across Raydium, Orca, and Meteora detect liquidity shifts before the candle closes — the same mechanic that fronts whale entries without requiring you to monitor the chain manually.

New-launch token and micro-cap detection plugs into the same pipeline; the token_quality gate ensures only those with minimum baseline metrics reach the Emit Gate.

The Emit Gate — Sending Only What Passes

After L4, the signal hits the Emit Gate, a three-threshold gatekeeper:

  • confidence_score ≥ 50
  • execution_confidence ≥ 58
  • token_quality ≥ 62

Any signal missing a threshold is silently dropped. No low-conviction alert reaches the user's Telegram or Discord. This design choice ships an audit trail instead of a win-rate screenshot: the scoreboard shows what was emitted and why, not just what profited.

Emit Gate logic lives in product code; the thresholds are hard-coded, not tuned per campaign. Every Pro user can add custom tracked wallets to the libs/data/all_fish.csv static whale list, extending coverage without changing the underlying model.

See the scoring behavior in real alerts via solnexus.xyz/bot/guide.

Self-Calibration — The Loop That Learns From Your P&L

When a position closes — whether from take-profit, hard stop, or timeout — its realized P&L streams back into L2 and L3. L2 updates its historical reinforcement weights. L3 updates its Beta(α, β) posteriors. The effect: the bot adapts to regime changes (e.g., a low-liquidity micro-cap environment vs. a trending Solana megacap day) without a model retrain, without a data scientist on call.

For the user, this means your own trade history continuously improves score accuracy for future signals, not some generic backtest.

Wallet-Native Execution and Auditability

Execution uses Jupiter aggregator routes to swap tokens on-chain. Every swap is a self-custody transaction: login via Phantom or another Solana wallet uses Ed25519 signatures — no keys shared. Paper trading requires no wallet at all. Live trading uses a separate dedicated trade wallet you authorize; its key is stored in Azure Key Vault under an RBAC policy scoped to SolNexus. Your login wallet never holds bot funds, and every transaction can be verified on Solscan.

This separates SolNexus from deposit-to-play terminals and answers the custody question at the signer level, not the marketing page.

Why This Architecture Beats the Copy-Trading Terminal

Most Solana "trading bot" sites stop at one link: you copy a whale wallet, or you click a buy button on a pump. SolNexus closes the entire loop — Detect (two independent real-time engines: TokenPricePoller via Jupiter + DexScreener, WalletAlertPoller via Helius RPC), Score (the four-layer pipeline + Emit Gate), Execute (wallet-native Jupiter tx), Review (signal accountability scored on +15m / +1h / +4h / +1d), and self-Calibrate (L2 + L3 update automatically).

The differentiator is not a higher backtest return; it is that the end-to-end loop is auditable, open-source (MIT freqtrade adapter with CI green), and proves the ML actually executes instead of only generating a "buy" Telegram message.

Ready to see the accountability dashboard in action? Join the solnexus.xyz/waitlist and see the Detect → Score → Execute → Review → self-calibrate loop run live.

Top comments (0)