TON vs Solana for High-Frequency Trading Bot Architecture
TON's async sharded runtime vs Solana's parallel single-shard execution: what actually changes for latency-sensitive trading bot architecture.
Two bets on parallelism, one problem: your bot's transaction has to land before someone else's
TON and Solana solved the same underlying problem — how do you get thousands of transactions per second onto a chain without a single sequential bottleneck — with architectures that couldn't be more different. Solana bet on brute-force parallel execution against one shared global state. TON bet on infinite horizontal sharding with asynchronous message passing between contracts that don't share state at all. If you're building a trading bot, this isn't academic. It decides how you write your matching logic, how you think about failed transactions, and whether "confirmed" even means what you think it means.
I've shipped bots on both chains. The mental model swap between them trips up more engineers than the actual SDKs do.
Solana: one global ledger, brutal contention
Solana's Sealevel runtime executes transactions in parallel by statically declaring which accounts each transaction reads and writes, then scheduling non-overlapping transactions concurrently. This is fast when it works — tens of thousands of TPS on paper — but every transaction touching a hot account (a popular AMM pool, a lending market's global state) serializes with every other transaction touching that same account. During a token launch or a liquidation cascade, hundreds of bots are locking the same three or four accounts, and the runtime falls back to sequential execution for that contended set.
This is why priority fees and Jito bundles matter so much on Solana. You're not just paying for inclusion — you're paying to win a local auction for account access inside a single slot. If you're routing through public RPC and standard mempool-adjacent broadcast instead of bundling, you're structurally behind; we've written in detail about how Jito bundles change trade landing versus standard Solana RPC and the numbers aren't subtle — bundle-based landing wins the contended-account race far more often during volatility spikes, which is exactly when your bot needs to land.
The other Solana-specific gotcha: transaction size and compute unit budgets. A bot that batches multiple swap legs into one transaction can blow the 1232-byte packet limit or the 1.4M compute unit ceiling, and unlike an EVM chain where you just pay more gas, Solana forces you to split logic across transactions or write tighter Rust/Anchor instructions. Account rent exemption, versioned transactions with address lookup tables, and the CU budget are all things a Solana bot has to actively manage that simply don't exist as concepts on TON.
TON: no global state to fight over, but no atomicity either
TON's actor model means every smart contract is its own shard with its own state, and contracts talk to each other exclusively through asynchronous messages that can take multiple blocks to resolve across shardchains. There is no global lock to contend for because there's no global anything — the network can (in theory) scale to 2^60 shards, splitting and merging dynamically based on load.
For a trading bot this cuts both ways. On the upside, you're never fighting another bot for a CPU-scheduling slot on a shared account the way you do on Solana — your DEX interaction on TON is a message sent to a contract, and congestion on someone else's hot contract doesn't directly block yours the way Solana's global scheduler can. On the downside, you lose atomic composability. A Solana bot can arb across two pools in a single transaction with a hard guarantee it either all executes or all reverts. On TON, a swap that involves two contract hops is two-plus asynchronous messages, and if the second hop fails after the first succeeded, you're not "reverted," you're in a partial state that your bot has to detect and unwind manually. Every serious TON bot ends up implementing its own saga-pattern state machine to track in-flight multi-hop message chains, because the chain won't do it for you.
Latency also behaves differently. Solana slot time is ~400ms with sub-second-to-few-seconds probabilistic finality depending on how many confirmations you actually trust. TON block time per shard is around 5 seconds, and a cross-shard message adds at least one more block to actually land in the destination shard — so a two-hop TON interaction can realistically take 10-15 seconds to fully settle, versus a Solana transaction that's economically final in a couple of seconds under normal load.
Comparison table
| Dimension | Solana | TON |
|---|---|---|
| Execution model | Parallel, single global state (Sealevel) | Asynchronous, sharded actor model |
| Contention behavior | Serializes on hot accounts under load | No shared-account contention; shard-local |
| Cross-contract calls | Atomic within one transaction | Async messages, no atomicity guarantee |
| Typical settlement latency | ~0.4-2s (slot + confirmations) | ~5-15s (block + cross-shard hops) |
| MEV / priority landing | Jito bundles, priority fees, tip auctions | No mature bundle/MEV market yet |
| Bot failure mode | Transaction simulation fails, atomic revert | Partial multi-hop state, needs manual recovery |
| Tooling maturity for HFT | Extensive (Geyser, Yellowstone gRPC, Jito) | Thin — mostly custom indexers |
| Language / runtime | Rust + Anchor, BPF/SBF VM | FunC/Tact, TVM |
A concrete difference: how you'd write a two-leg arb
On Solana, a two-pool arbitrage is one atomic instruction sequence:
// pseudocode — single tx, atomic
let leg1 = swap(pool_a, token_in, amount, min_out_1);
let leg2 = swap(pool_b, token_out, leg1.amount_out, min_out_2);
require!(leg2.amount_out > amount, ArbNotProfitable);
If min_out_2 isn't met, the whole transaction reverts, and you paid only the base fee plus whatever priority fee you bid — no capital ever left your control mid-flight.
On TON, the equivalent is two separate outbound messages, and your bot's off-chain state machine has to track them independently, apply a timeout, and issue a compensating "return funds" message if leg two never confirms. There's no require! that unwinds leg one automatically — that logic lives in your contract or your bot, not the protocol.
Which to pick when
If your strategy depends on sub-second reaction time, atomic multi-step execution, or competing directly against other bots for the same liquidity pool — sniping, JIT liquidity, cross-DEX arb where you need the "swap through Raydium or Jupiter's router" decision made in milliseconds (a routing tradeoff we cover in Jupiter vs Raydium execution) — build on Solana. The tooling is mature, the gRPC streaming options for real-time data are production-grade, and our Solana sniper bot builds exist specifically because that ecosystem rewards speed engineering.
If you're building something less latency-critical — a treasury rebalancer, a payment-triggered settlement bot, a Telegram-wallet-adjacent product where TON's massive retail distribution matters more than millisecond execution — TON's sharding headroom and lower fees are legitimately attractive, and the async model is fine as long as you design for it rather than fight it.
Don't guess which architecture fits your strategy's actual latency budget before you've committed months of engineering to it. Talk through the tradeoffs with us in a strategy consultation and we'll tell you straight whether your edge survives a 10-second settlement window or needs Solana's atomicity to work at all.
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