How to Calculate Solana Wallet PnL from On-Chain Transactions
A reliable cost-basis and PnL pipeline for Solana wallets across swaps, transfers and token-account changes.
A reliable cost-basis and PnL pipeline for Solana wallets across swaps, transfers and token-account changes.
Normalize trades
Decode inner instructions and net token changes by owner. A transfer is not automatically a trade and failed transactions must be excluded.
Cost basis
Choose FIFO, average cost or another explicit method. Treat inbound transfers with unknown basis separately rather than inventing profit.
Prices and fees
Attach timestamped prices, SOL fees, priority fees and token transfer fees. Preserve the price source for auditability.
Reconciliation
Compare computed holdings with live token accounts and flag unsupported programs or missing history.
Start with our Solana TX Inspector or build a wallet tracker.
Need a bot like this built?
We design, build and run trading bots on Solana, Hyperliquid and Polymarket.
Start a projectMore from the blog
Public vs Paid RPC: How to Run a Fair Benchmark
A fair comparison of public and paid RPC endpoints must account for quotas, workload, freshness and support guarantees.
Read articleRPC Benchmark Percentiles Explained: p50, p95 and p99
Why averages hide the latency spikes that break trading bots, wallets and production blockchain applications.
Read articleHyperliquid REST vs WebSocket Benchmark: What to Measure
A benchmark plan for Hyperliquid market data that separates request latency from streaming freshness and recovery.
Read article