When Solana introduced versioned transactions in 2022, it represented one of the most significant protocol upgrades since mainnet launch. This feature fundamentally changed how transactions are structured, enabling developers to build more complex applications while actually reducing on-chain costs.
Understanding the difference between legacy and versioned transactions is crucial for anyone building on Solana today.
The Legacy Transaction Problem
Legacy Solana transactions have a hard limitation: they can reference a maximum of 35 accounts. While this sounds like plenty, it becomes a severe bottleneck for complex DeFi operations.
Consider a typical DeFi aggregator routing a swap through multiple liquidity pools:
• User account (1)
• Token accounts for source and destination (2)
• DEX program accounts (3-4 per pool)
• Pool state accounts (2 per pool)
• Oracle accounts for price feeds (1-2 per pool)
By the time you route through just 3-4 pools, you've exhausted the 35-account limit. This forced developers to choose between transaction complexity and optimal routing—a terrible tradeoff.
Enter Address Lookup Tables
Versioned transactions solve this through Address Lookup Tables (ALTs). Instead of including full 32-byte account addresses in every transaction, ALTs let you store frequently-used addresses in an on-chain table and reference them by a single-byte index.
Think of it like contacts in your phone: instead of typing out a full phone number every time, you just select "Mom" from your contacts. The lookup table is your contacts list.
The benefits are dramatic:
Transaction Size Reduction: A transaction with 20 accounts drops from ~700 bytes to ~250 bytes—a 3x reduction. Smaller transactions mean lower fees and faster propagation.
Account Limit Increase: Versioned transactions can reference up to 256 accounts through lookup tables, enabling complex multi-hop swaps, yield aggregators, and advanced DeFi strategies.
Reusability: Protocols can create shared lookup tables for their programs and token accounts. Jupiter, for instance, maintains public ALTs that any aggregator can use.
How Versioned Transactions Work
The transaction structure includes a version byte at the beginning. Legacy transactions have an implicit version of 0, while versioned transactions explicitly declare version 0 or higher.
A versioned transaction message contains:
1. Message header: Number of signatures required, read-only accounts, etc.
2. Static account keys: Accounts included directly (payer, program IDs)
3. Recent blockhash: For replay protection
4. Instructions: The actual program calls
5. Address lookup tables: References to ALTs and which indexes to load
When validators process a versioned transaction, they first load all referenced ALTs, resolve the indexes to full addresses, then execute the instructions with the complete account list.
Creating and Using ALTs
Creating an ALT involves several steps:
Creation: Call the Address Lookup Table program to create a new table account. You'll receive a unique address for your ALT.
Populating: Add addresses to your table. You can add up to 30 addresses per transaction. There's a one-slot waiting period after creation before you can extend the table.
Activation: After adding addresses, wait one slot before the table is usable. This prevents race conditions.
Usage: Reference your ALT address in versioned transactions, specifying which indexes you need for each transaction.
Important considerations:
• ALTs cost rent (about 0.00144 SOL for 256 addresses)
• You can close ALTs to reclaim rent, but only after a deactivation period
• ALTs can be made immutable (frozen), preventing further modifications
• Multiple ALTs can be referenced in a single transaction
Real-World Impact
Versioned transactions have enabled an entire class of applications that were previously impossible:
DeFi Aggregators: Jupiter can now route through 8+ pools in a single transaction, finding optimal prices that would require multiple transactions with legacy format.
NFT Marketplaces: Batch buying multiple NFTs from different collections in one transaction, with all the associated metadata accounts.
Yield Optimizers: Protocols can rebalance across dozens of lending markets and liquidity pools atomically.
Gaming: Complex game actions involving many assets and accounts (crafting, trading, quest completion) fit in single transactions.
Adoption has been rapid. As of 2024, over 60% of transactions on Solana use the versioned format, and most major dApps have migrated their transaction construction logic.
Developer Considerations
If you're building on Solana today, here's what you need to know:
When to use versioned transactions:
• You're hitting the 35-account limit
• You need to reduce transaction size for faster propagation
• You're building a protocol that will be integrated by many apps (shared ALTs)
• You want to optimize costs for high-frequency transactions
When legacy is fine:
• Simple transactions with few accounts
• You need to support very old wallets (though almost all have updated)
• Quick prototypes where optimization doesn't matter yet
The migration path is straightforward. Most client libraries (web3.js, Anchor) have built-in support for versioned transactions. You'll need to:
1. Create and populate your ALTs
2. Update your transaction construction to use `TransactionMessage` and specify version 0
3. Reference your ALTs when building transaction messages
4. Test thoroughly—versioned transactions have slightly different serialization
Looking Forward
Versioned transactions represent a mature approach to protocol evolution. By introducing explicit versioning, Solana created a framework for future transaction format improvements without breaking existing applications.
The community is already discussing potential v1 features like native multi-sig support, programmable transaction expiry, and enhanced priority fee mechanisms. When these arrive, dApps can migrate incrementally rather than requiring ecosystem-wide coordination.
For developers building on Solana, versioned transactions aren't just a nice-to-have optimization—they're essential infrastructure for building complex, composable applications. The combination of address lookup tables and explicit versioning gives Solana a clear path to evolve transaction capabilities while maintaining backward compatibility.
The next time you execute a multi-hop swap or batch multiple NFT purchases, you're leveraging one of Solana's most impactful technical improvements. Versioned transactions transformed what's possible on-chain—from theoretical limitations to practical capability.