Solana Inner Instructions and Token Balance Decoding for Bot Developers
Why top-level instructions are insufficient for understanding Solana swaps and wallet activity.
Why top-level instructions are insufficient for understanding Solana swaps and wallet activity.
Top-level limits
Aggregators invoke multiple programs through CPI, so the economic transfer often appears only in inner instructions and balance deltas.
Account resolution
Resolve versioned transaction address lookup tables and map token accounts back to owners and mints.
Net effects
Compare pre/post SOL and token balances, then subtract fees and temporary wrapped-SOL movements.
Decoder strategy
Use protocol-specific parsers when available but keep a generic balance-delta fallback and preserve raw unknown events.
Building this for production?
We turn this architecture into tested, non-custodial software with monitoring, documentation and deployment support.
Related technical guides
Pump.fun Launch Tooling: Development Cost, Scope and Safe Delivery
How to scope compliant Pump.fun launch execution, liquidity monitoring and operational tooling without wash trading or artificial-volume features.
Read articleJito Bundle Status Monitoring: Pending, Landed, Failed and Invalid
Production-safe Jito bundle reconciliation using getInflightBundleStatuses, getBundleStatuses and Solana signature confirmation.
Read articleBest Solana RPC for Trading Bots: Reproducible Latency Benchmark
Benchmark Helius, QuickNode, Triton and self-hosted Solana RPC endpoints with a reproducible Node.js harness for p50/p95/p99 latency, errors and slot freshness.
Read article