Ethereum has contracts. Solana has accounts.
That difference confuses everyone coming from Ethereum. On Solana, everything is an account: your wallet, tokens, smart contracts, even the data those contracts store.
This post covers what accounts are, how programs work, and how a transaction flows through the network.
The mental model
On Ethereum, a smart contract is code and state bundled together. On Solana, a program is code only, and its state lives in separate accounts.
This separation is what lets Solana execute in parallel: different transactions can modify different accounts simultaneously.
Part 1: Accounts are files
Think of Solana as a giant file system. Every piece of data lives in an account, which is a file with an address.
Account structure
Every account has these fields:
┌─────────────────────────────────────────────────────────────┐
│ Account │
├─────────────────────────────────────────────────────────────┤
│ Address (Public Key) 32 bytes │
│ ───────────────────────────────────────────────────────── │
│ lamports u64 (SOL balance) │
│ data [u8] (arbitrary bytes) │
│ owner Pubkey (program that controls)│
│ executable bool (is this code?) │
│ rent_epoch u64 (deprecated) │
└─────────────────────────────────────────────────────────────┘
Address (public key)
Every account has a unique 32-byte address, which works like a file path.
Example addresses:
Your wallet: 7EcDhSYGxXyscszYEp35KHN8sQWD8zAqKJBJRc2n2Kqq
Token Program: TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
USDC Mint: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
Lamports (balance)
1 SOL = 1,000,000,000 lamports (10^9)
Every account holds some lamports. Besides being a balance you can spend, they cover the account’s rent.
Data
Arbitrary bytes. The meaning depends on who owns the account:
- Wallet accounts: no data (empty)
- Token accounts: balance, mint address, owner
- Program accounts: compiled bytecode
Owner
Every account has an owner, and the owner is always a program.
Only the owner program can:
- Modify the account’s data
- Deduct lamports from the account
Anyone can:
- Credit lamports to any account
- Read any account’s data
Executable
If true, this account contains program code. The Solana runtime will execute it when called.
Rent
To store data on-chain, you must deposit lamports proportional to the data size. This is called rent exemption.
Rent formula:
minimum_balance = (data_size + 128) * lamports_per_byte
Example (mainnet, December 2026, 5,080 lamports per byte):
165-byte account (token account) ≈ 0.00149 SOL
10 KB account ≈ 0.05 SOL
The balance is a deposit. You get it back when you close the account.
The per-byte rate is a network parameter. It was 6,960 lamports until September 2026, which made a token account cost 0.00203928 SOL. SIMD-0437 is lowering it in steps toward 696, so ask the network for the current value.
# Check rent for a given size
solana rent 165
# Output: Rent-exempt minimum: 0.00148844 SOL
Part 2: Account types
1. System accounts (wallets)
Your wallet is a System Account, owned by the System Program.
┌─────────────────────────────────────────────────────────────┐
│ System Account (Wallet) │
├─────────────────────────────────────────────────────────────┤
│ address: 7EcDhSYGxXyscszYEp35KHN8sQWD8zAqKJBJRc2n2Kqq │
│ lamports: 5_000_000_000 (5 SOL) │
│ data: [] (empty) │
│ owner: 11111111111111111111111111111111 (System) │
│ executable: false │
└─────────────────────────────────────────────────────────────┘
The System Program handles:
- Creating new accounts
- Transferring SOL
- Assigning ownership to other programs
2. Program accounts
Programs (smart contracts) are executable accounts.
┌─────────────────────────────────────────────────────────────┐
│ Program Account │
├─────────────────────────────────────────────────────────────┤
│ address: TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA │
│ lamports: 240_230_698 │
│ data: [address of program data account] ← 36 bytes │
│ owner: BPFLoaderUpgradeab1e11111111111111111111111 │
│ executable: true ← This makes it a program │
└─────────────────────────────────────────────────────────────┘
Programs are owned by a Loader program (BPFLoader). The loader verifies and executes the bytecode. With the upgradeable loader, which the Token Program uses, the program account holds only a pointer to a separate program data account, and the ELF bytecode lives there.
3. Data accounts
Programs store their state in separate data accounts.
┌─────────────────────────────────────────────────────────────┐
│ Token Account (holds your USDC balance) │
├─────────────────────────────────────────────────────────────┤
│ address: 9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM │
│ lamports: 1_488_440 (rent exempt) │
│ data: [mint, owner, amount, ...] ← 165 bytes │
│ owner: TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA │
│ executable: false │
└─────────────────────────────────────────────────────────────┘
Token Account Data Layout:
┌──────────┬──────────┬─────────┬──────────┬────────┬─────────────────┐
│ mint │ owner │ amount │ delegate │ state │ ... (3 more) │
│ 32 bytes │ 32 bytes │ 8 bytes │ 36 bytes │ 1 byte │ 56 bytes │
└──────────┴──────────┴─────────┴──────────┴────────┴─────────────────┘
4. Mint accounts
A Mint is a token type (like USDC or a memecoin).
┌─────────────────────────────────────────────────────────────┐
│ Mint Account (USDC) │
├─────────────────────────────────────────────────────────────┤
│ address: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v │
│ data: [mint_authority, supply, decimals, ...] │
│ owner: TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA │
└─────────────────────────────────────────────────────────────┘
Mint Data:
mint_authority: Who can create more
supply: About 8.3 billion USDC (December 2026)
decimals: 6 (1 USDC = 1,000,000 units)
freeze_authority: Who can freeze accounts
Part 3: Programs are stateless
How programs work
Programs are stateless. They store no data internally and only read and write the accounts passed to them.
The program:
- Receives accounts as input
- Validates permissions (Alice signed? Accounts owned by Token Program?)
- Modifies account data (subtract from Alice, add to Bob)
- Returns success or error
Why stateless?
Statelessness is what makes parallel execution possible. The Solana runtime (called Sealevel) can process multiple transactions simultaneously if they touch different accounts:
Transactions that touch different accounts can’t conflict. If they touch the same account, they’re serialized (e.g., Alice → Bob then Bob → Carol must wait because they share the Bob account).
Common programs
A few programs show up in almost every transaction:
| Program | Address | Purpose |
|---|---|---|
| System Program | 1111...1111 | Create accounts, transfer SOL |
| Token Program | Tokenkeg... | SPL tokens (USDC, etc.) |
| Associated Token | ATokenGP... | Derive token account addresses |
| BPF Loader | BPFLoader... | Deploy and run custom programs |
Part 4: Instructions
An instruction is a single operation: “call this program with these accounts and this data.”
Instruction structure
┌─────────────────────────────────────────────────────────────┐
│ Instruction │
├─────────────────────────────────────────────────────────────┤
│ program_id: Which program to call │
│ accounts: List of accounts to pass │
│ data: Bytes telling the program what to do │
└─────────────────────────────────────────────────────────────┘
Example: Transfer SOL
┌─────────────────────────────────────────────────────────────┐
│ program_id: System Program (1111...1111) │
│ accounts: [ │
│ { pubkey: Alice, is_signer: true, │
│ is_writable: true }, │
│ { pubkey: Bob, is_signer: false, │
│ is_writable: true } │
│ ] │
│ data: [2, 0, 0, 0, // instruction type (transfer)│
│ 64, 66, 15, 0, 0, 0, 0, 0] // 1M lamports │
└─────────────────────────────────────────────────────────────┘
Account permissions
Each account in an instruction has two flags:
is_signer: Does this account need to sign the transaction?
is_writable: Will this instruction modify this account?
┌──────────────────┬───────────┬─────────────┐
│ Account │ is_signer │ is_writable │
├──────────────────┼───────────┼─────────────┤
│ Fee payer │ Yes │ Yes │
│ Sender's tokens │ No │ Yes │
│ Token owner │ Yes │ No │
│ Token receiver │ No │ Yes │
│ Token program │ No │ No │
│ Mint (read only) │ No │ No │
└──────────────────┴───────────┴─────────────┘
You declare these upfront because Solana’s scheduler uses the flags to parallelize transactions. Two transactions that both read the same account can run in parallel. Two that write to it must be serialized.
Part 5: Transactions
A transaction bundles one or more instructions into an atomic unit.
Transaction structure
┌─────────────────────────────────────────────────────────────┐
│ Transaction │
├─────────────────────────────────────────────────────────────┤
│ signatures: [sig1, sig2, ...] (64 bytes each) │
│ │
│ message: │
│ ├── header: │
│ │ num_required_signatures: 2 │
│ │ num_readonly_signed: 0 │
│ │ num_readonly_unsigned: 2 │
│ │ │
│ ├── account_keys: [ │
│ │ Alice, // index 0, signer, writable │
│ │ Bob, // index 1, signer, writable │
│ │ Token Account A, // index 2, writable │
│ │ Token Account B, // index 3, writable │
│ │ Token Program, // index 4, read-only │
│ │ System Program, // index 5, read-only │
│ │ ] │
│ │ │
│ ├── recent_blockhash: "5eykt4UsFv8P8NJdTR..." │
│ │ │
│ └── instructions: [ │
│ { program_id_index: 4, │
│ account_indices: [2, 3, 0], │
│ data: [3, ...] }, // Transfer tokens │
│ { program_id_index: 5, │
│ account_indices: [0, 1], │
│ data: [2, ...] } // Transfer SOL │
│ ] │
└─────────────────────────────────────────────────────────────┘
Size, signers, blockhash and atomicity
A legacy or v0 transaction is limited to 1232 bytes, so that it fits in a single network packet (the 1280-byte IPv6 minimum MTU minus 48 bytes of headers). That caps the number of accounts (~35 unique accounts in a legacy transaction), the number of instructions, and the data size. Since September 2026 the opt-in v1 transaction format raises the limit to 4096 bytes.
Unlike Ethereum (1 signer), Solana transactions can have multiple signers:
Transaction: "Alice and Bob both approve this trade"
signatures: [Alice's signature, Bob's signature]
Every transaction includes a recent blockhash as a timestamp. It prevents replay attacks (the same tx can’t be submitted twice), and it makes transactions expire (they’re valid for 150 blocks, about 30 seconds now that slots take 200ms).
blockhash: "5eykt4UsFv8P8NJdTR..." // From recent block
↓
After ~150 blocks, this transaction is invalid
Transactions are atomic: all instructions succeed or all fail, with no partial execution.
Instructions:
1. Create token account ✓
2. Transfer tokens ✓
3. Close old account ✗ (fails)
Result: ALL rolled back. Token account not created.
Transaction fees
The base fee is 5,000 lamports (0.000005 SOL) per signature. On top of that you can add a priority fee, an optional tip to validators for faster inclusion.
Total fee = (num_signatures × 5000) + priority_fee
Example (1 signer, no priority):
Fee = 1 × 5000 = 5000 lamports = 0.000005 SOL
Half of the base fee is burned and half goes to the validator that produced the block. The priority fee goes entirely to the validator (SIMD-0096).
Part 6: Program Derived Addresses (PDAs)
How do programs “own” accounts if programs can’t sign transactions? With PDAs: addresses derived from seeds, with no private key.
The problem
Programs need to control accounts (hold tokens, store state), but programs can’t have private keys. Without a private key you can’t sign transactions, and without signing you can’t authorize changes.
The solution: PDAs
A PDA is an address mathematically derived from:
- Seeds (arbitrary bytes)
- Program ID
- A “bump” value
PDA = hash(seeds, program_id, bump)
Example:
seeds = ["vault", user_pubkey]
program_id = MyProgram
bump = 255 (or lower until we get a valid PDA)
PDA = hash(["vault", Alice], MyProgram, 255)
= 8xK2v9bLqNmV5... (deterministic address)
Why the bump?
Normal addresses are on the Ed25519 elliptic curve (they have private keys). PDAs must be off the curve (no private key possible).
hash(seeds, program_id, 255) → On curve? → Has private key → BAD!
hash(seeds, program_id, 254) → On curve? → Has private key → BAD!
hash(seeds, program_id, 253) → Off curve? → No private key → GOOD! ✓
The first bump that produces an off-curve address is the "canonical bump"
How programs sign with PDAs
Programs never sign anything. The runtime grants them authority instead:
// In program code:
invoke_signed(
&transfer_instruction,
&[vault_account, destination],
&[&[b"vault", user.key.as_ref(), &[bump]]] // Seeds prove ownership
)?;
The runtime verifies:
- The PDA can be derived from these seeds + this program
- If yes, the program can modify this account
┌──────────────────────────────────────────────────────────────┐
│ Runtime Check │
│ │
│ Program: MyProgram (address: Abc123...) │
│ Trying to modify: 8xK2v9bLqNmV5... (PDA) │
│ │
│ Verify: hash(["vault", Alice], Abc123..., 253) = 8xK2v9b? │
│ ↓ │
│ YES → Program can modify this account │
│ NO → Access denied │
└──────────────────────────────────────────────────────────────┘
PDA example: token vault
Part 7: Token accounts and how USDC works
The Token Program
Most SPL tokens (USDC, BONK, etc.) use the same Token Program. It’s like ERC-20, but as a shared program. Newer tokens can use Token-2022, a second program with the same core design plus extensions.
Two account types
A Mint Account defines the token: supply, decimals, and who can mint. A Token Account holds the balance for one user, for one token type.
Associated Token Accounts (ATAs)
Token account addresses are random, so how does Bob know Alice’s USDC address? The answer is a deterministic address derived from (owner, mint):
ATA address = derive(Alice's wallet, USDC mint, ATA program)
= deterministic!
Anyone can compute Alice's USDC address without asking Alice.
┌─────────────────────────────────────────────────────────────┐
│ Associated Token Account Derivation │
├─────────────────────────────────────────────────────────────┤
│ │
│ Inputs: │
│ wallet_address: Alice (7EcDh...) │
│ mint_address: USDC (EPjFW...) │
│ ata_program: ATokenGPvbdGVxr... │
│ │
│ PDA = find_program_address( │
│ [Alice, Token Program, USDC], │
│ ATA Program │
│ ) │
│ │
│ Output: │
│ Alice's USDC ATA: 9WzDX... (deterministic!) │
│ │
└─────────────────────────────────────────────────────────────┘
Token transfer flow
Alice sends 100 USDC to Bob:
┌──────────────────────────────────────────────────────────────┐
│ Transaction │
├──────────────────────────────────────────────────────────────┤
│ Signatures: [Alice's signature] │
│ │
│ Instruction: │
│ program: Token Program │
│ accounts: │
│ - Alice's USDC ATA (writable) │
│ - Bob's USDC ATA (writable) │
│ - Alice's wallet (signer) │
│ data: Transfer { amount: 100_000_000 } // 100 USDC │
│ // (6 decimals) │
└──────────────────────────────────────────────────────────────┘
Token Program executes:
1. Check: Alice signed? ✓
2. Check: Alice's ATA owned by Token Prog? ✓
3. Check: Alice's ATA owner == Alice? ✓
4. Check: Alice's balance >= 100? ✓
5. Alice's ATA: amount -= 100_000_000
6. Bob's ATA: amount += 100_000_000
Part 8: Transaction lifecycle
This is what happens when you click “Send” in your wallet.
Step 1: Build the transaction
The wallet builds the transaction:
- Fetches a recent blockhash from RPC
- Constructs instructions
- Estimates fees
- Adds accounts
Step 2: Sign
The user signs with their private key. They sign the message (not the whole tx), which produces a 64-byte signature.
Step 3: Submit to RPC
The wallet sends the transaction to an RPC server, which forwards it to the leader validator:
- Basic validation
- Forwards to current leader
- Also forwards to next 2 leaders (redundancy)
Step 4: Leader processing
Step 5: Confirmation
Solana has three commitment levels:
| Level | Meaning | Time |
|---|---|---|
processed | The RPC node has seen the transaction in its most recent block. The block can still be skipped. | a few hundred ms |
confirmed | The same state as finalized. Kept so existing code keeps working. | under 1s |
finalized | Validators holding at least 80% of stake (in one round) or 60% (in two rounds) have certified the block. Can’t be reverted. | under 1s |
These timings are from after October 2026, when Alpenglow replaced the TowerBFT consensus on mainnet. A block is now final roughly 150ms after it is produced. Under TowerBFT, confirmed meant a supermajority of stake had voted for the block, about one slot later, and finalized took about 12.8 seconds. No confirmed block ever failed to finalize.
Timeline
The diagram shows the older TowerBFT timings.
What if it fails?
- Blockhash expired: resubmit with a fresh blockhash
- Insufficient funds: top up and resubmit
- Account locked: another tx is using the same account, so retry
- Program error: fix the bug in your program
Part 9: Practical example
Here’s a complete USDC transfer, traced end to end:
Alice (wallet): 7EcDhSYG...
Bob (wallet): 9BzKqR4W...
USDC Mint: EPjFWdd5...
Alice's USDC ATA: derive(Alice, USDC) = 3xLp8mKw...
Bob's USDC ATA: derive(Bob, USDC) = 7yNq2vRt...
The transaction
// Using @solana/web3.js and @solana/spl-token
const transaction = new Transaction().add(
createTransferInstruction(
aliceUsdcAta, // source (Alice's USDC account)
bobUsdcAta, // destination (Bob's USDC account)
aliceWallet, // owner (Alice, must sign)
100_000_000, // amount (100 USDC, 6 decimals)
),
);
transaction.recentBlockhash = (await connection.getLatestBlockhash()).blockhash;
transaction.feePayer = aliceWallet;
// Sign
const signed = await wallet.signTransaction(transaction);
// Send
const signature = await connection.sendRawTransaction(signed.serialize());
// Wait for confirmation
await connection.confirmTransaction(signature, "confirmed");
What gets sent
┌─────────────────────────────────────────────────────────────┐
│ Raw Transaction (serialized) │
├─────────────────────────────────────────────────────────────┤
│ 01 // 1 signature │
│ [64 bytes: Alice's sig] │
│ │
│ 01 // 1 signer required │
│ 00 // 0 read-only signers │
│ 01 // 1 read-only non-signer │
│ │
│ 04 // 4 accounts │
│ [32 bytes: Alice wallet] // index 0, signer, writable │
│ [32 bytes: Alice ATA] // index 1, writable │
│ [32 bytes: Bob ATA] // index 2, writable │
│ [32 bytes: Token Program] // index 3, read-only │
│ │
│ [32 bytes: recent blockhash] │
│ │
│ 01 // 1 instruction │
│ 03 // program index (Token Program) │
│ 03 // 3 accounts in instruction │
│ 01 02 00 // account indices │
│ 09 // data length │
│ 03 // instruction type (Transfer) │
│ [8 bytes: 100_000_000] // amount │
└─────────────────────────────────────────────────────────────┘
Summary diagram
Takeaways
- Everything is an account: wallets, programs, tokens, state
- Programs are stateless and read/write to the accounts passed to them
- Accounts have owners, and only the owner program can modify data
- PDAs let programs own accounts at addresses without private keys
- Transactions are atomic: all instructions succeed or all fail
- Parallelism comes from declaring upfront what you’ll read/write