Everything is an account, including the code
On Ethereum, a contract is a single entity that bundles its own code and its own private storage. If you want to know a token balance, you call into that contract and ask it, because the contract owns the data and mediates access to it. Solana throws that bundling out. Every piece of state on Solana, whether it's a token balance, a program's compiled bytecode, or a piece of arbitrary application data, lives in an account. An account is just a fixed structure: an address, a data byte array, an amount of SOL for rent, and, critically, an owner field naming which program is allowed to modify it. There is no special 'contract' type that behaves differently from everything else.
This has a consequence that trips up developers coming from Ethereum: programs on Solana are stateless. A program (Solana's term for a smart contract) doesn't hold its own storage the way a Solidity contract does. Instead, a transaction explicitly lists every account it intends to touch, including the program's own account and any data accounts involved, and passes them all in. The program reads and writes to those accounts during execution, then returns. The next time it runs, it has no memory of what happened before beyond whatever was durably written into those same accounts. Code and data are cleanly separated, and that separation is what makes several of Solana's other architectural choices possible.
