Ethereum vs Solana for developers: accounts, execution, fees, finality and data compared

GoldRush TeamUpdated 15 min read

How Ethereum and Solana differ for developers: account and state models, parallel vs sequential execution, fees, finality, tokens, tooling and reading data.

Ethereum and Solana are both general-purpose smart contract platforms, and they are built on different ideas. Ethereum runs every transaction in a block one after another against a single global state, and contracts hold their own storage. Solana keeps all state in accounts that programs own but do not contain, and because every transaction declares the accounts it touches up front, the runtime can execute transactions that don't conflict in parallel.

That one design choice explains most of what a developer notices when moving between them: how you write contracts, what a token is, how fees are charged, when a transaction is final, and how you read data back. This guide compares the two on those points, with sources, and shows how to read both chains with the same API key.

Ethereum vs Solana at a glance

Ethereum Solana
Execution environment Ethereum Virtual Machine (EVM), a stack machine Solana Virtual Machine (SVM): programs compiled to sBPF bytecode, scheduled by Sealevel
Execution order Transactions in a block run sequentially Transactions that write different accounts can run in parallel
Where state lives Inside each contract's storage In separate accounts, each owned by a program; programs are stateless
Addresses 20 bytes, hex with a 0x prefix 32 bytes (an Ed25519 public key or a program-derived address), base58
Native unit 1 ETH = 1018 wei 1 SOL = 109 lamports
Fees Gas used × (base fee + priority fee), base fee burned 5,000 lamports per signature, plus an optional prioritization fee per compute unit
Storing data Gas to write storage A refundable minimum balance held by each account, proportional to its size
Block cadence 12-second slots Slots of about 400 ms
Finality Finalized checkpoints via Casper-FFG finalized commitment: 31+ confirmed blocks on top
Tokens One contract per token (ERC-20, ERC-721, ERC-1155) One shared program (SPL Token or Token-2022); each token is a mint account
Upgrades Contract code is immutable; upgrades use proxy patterns Programs are upgradeable while an upgrade authority is set
Main languages Solidity, Vyper Rust (Anchor, native, Pinocchio)

Sources for each row are linked in the sections below.

Architecture: global state vs accounts

On Ethereum, the state is one map from address to account. An account is either an externally owned account (EOA), controlled by a private key, or a contract account, controlled by its code. A contract account carries its code and its own storage, so an ERC-20 token's balances live inside that token's contract. What are Ethereum accounts covers the account types and how addresses are derived.

On Solana, "everything is an account": the network is a key-value store from 32-byte addresses to accounts, and every account has the same five fields: lamports, data, owner, executable and rent_epoch. A program is an account with executable set, and programs are stateless: the data a program works on lives in other accounts that it owns. Only an account's owner program can change its data or debit its lamports.

The practical difference: on Ethereum you deploy a contract and it keeps its own data. On Solana you deploy a program once, then create data accounts for it (often at program-derived addresses, PDAs, that the program can sign for) and pass those accounts into every instruction that needs them.

Execution: EVM vs Sealevel

The EVM executes transactions in a block one at a time, in the order the block producer chose. Any transaction may read or write any contract's storage, so the client can't know in advance which transactions conflict; running them in sequence is what keeps the result deterministic. Each opcode costs a fixed amount of gas, and a transaction stops when it runs out (ethereum.org: EVM).

On Solana, a transaction lists every account it will read or write, and marks which are writable, before it runs. The runtime (Sealevel) uses those lists to schedule transactions that don't write the same accounts at the same time on different cores. Two swaps in different pools can execute in parallel; two swaps in the same pool can't. Programs are compiled to sBPF and metered in compute units: by the Solana fee docs, an instruction gets 200,000 compute units by default and a transaction at most 1,400,000. A legacy or v0 transaction is limited to 1,232 bytes, which is why Solana has address lookup tables for transactions that touch many accounts.

What this means when you write code:

  • On Solana, you plan accounts first. Every account an instruction touches is an input, and the program must check that each one is the account it expects (owner, signer, PDA seeds). Missing account checks are a common class of Solana program bug. Frameworks such as Anchor generate those checks from declarations.
  • On Ethereum, you plan storage and gas. Contracts call other contracts freely and look up any state they need, but every storage write costs gas, and reentrancy (a called contract calling back before you have updated your state) is the classic bug.
  • Contention behaves differently. A popular Ethereum contract competes for block space with everything else. A popular Solana account (a hot pool or mint) is a write lock that serializes the transactions touching it, while unrelated transactions keep running in parallel.

Fees and storage costs

Ethereum prices computation in gas. Since EIP-1559, a transaction pays gas used × (base fee + priority fee): the base fee is set by the protocol from recent demand and burned, and the priority fee is a tip to the validator. Prices are quoted in gwei; what is gwei works through a fee step by step. Writing contract storage is one of the most expensive operations, and you pay for it once, when you write it.

Solana charges a base fee of 5,000 lamports per signature, half burned and half paid to the validator, plus an optional prioritization fee: a compute-unit price (in micro-lamports) times the compute-unit limit you request, all of which goes to the validator (Solana fees). Storage is paid differently: every account must hold a minimum balance proportional to its data size to stay onchain. It is a deposit, not a fee, and you get it back when the account is closed (Solana accounts).

In practice: on Ethereum, gas used varies with what your contract does, and the price per gas varies with demand across the whole chain. On Solana, the base fee is fixed per signature, the priority fee is what moves under congestion, and creating accounts (for example, a token account for every new holder) is a cost your design should account for.

Consensus, block times and finality

Ethereum uses proof of stake. Time is divided into 12-second slots and 32-slot epochs; one validator proposes the block in each slot, and committees of validators attest to it. A block becomes finalized when two-thirds of staked ETH votes for a pair of epoch checkpoints, through Casper-FFG; reverting it would cost at least a third of all staked ETH (ethereum.org: proof of stake). JSON-RPC reads accept the block tags latest, safe and finalized, so you choose how settled the data must be.

Solana also uses proof of stake, with a leader schedule that assigns each roughly 400 ms slot to a validator; a leader may skip its slot, so block height is at or below the slot number. Its consensus has combined Proof of History (a verifiable sequence of hashes that orders events) with Tower BFT voting, and the network is replacing Tower BFT with a new protocol, Alpenglow. For developers the knob is the RPC commitment level (GoldRush docs: Solana RPC concepts):

Commitment Meaning
processed The node has processed the slot; it may still be skipped or rolled back.
confirmed A supermajority of the cluster has voted on the block. The usual default.
finalized The block has 31+ confirmed blocks on top; treat it as irreversible.

Use finalized on either chain for accounting, settlement and anything you can't undo; use latest or confirmed for responsive UIs, and handle reorgs or skipped slots.

Tokens and NFTs

On Ethereum, each token is its own contract implementing a standard interface: ERC-20 for fungible tokens, ERC-721 and ERC-1155 for NFTs. The contract stores balances in its own storage, and a transfer emits a Transfer event. Two ERC-20s can behave differently, because each is separate code.

On Solana, fungible tokens and most NFTs share one program: the SPL Token program or its successor, Token-2022, which adds optional extensions. A token is a mint account (supply, decimals, mint authority), and each holding is a separate token account that records the owner, the mint and the amount. A wallet usually holds each token in its associated token account, an address derived from the wallet and the mint. So "what does this wallet hold" on Solana is "which token accounts list this wallet as owner", and sending a token to a new holder may first create their token account (and its storage deposit).

Languages, frameworks and tooling

Ethereum contracts are mostly written in Solidity, with Vyper as the main alternative. Solana programs are mostly written in Rust, with Anchor as the common framework and Pinocchio or plain Rust for programs that need tighter control of compute. Web3 programming languages compares these and other smart contract languages in depth.

Task Ethereum Solana
Build and test contracts Foundry, Hardhat, Remix Anchor, Solana CLI, solana-test-validator, LiteSVM
Client libraries (TypeScript) viem, ethers @solana/kit (successor to @solana/web3.js)
Audited building blocks OpenZeppelin Contracts SPL programs (Token, Token-2022, associated token accounts)
Contract interface for clients ABI (JSON) IDL (generated by Anchor)
Upgrades Proxy patterns (for example EIP-1967); code itself is immutable Upgradeable while the program has an upgrade authority; revoke it to freeze the program

An Ethereum skill set also transfers to every EVM chain (Base, Arbitrum, Optimism, Polygon and many more), which run the same bytecode and use the same tools. Solana's tooling is specific to the SVM.

Reading data from Ethereum and Solana

The chains also differ in how you get data back out.

  • Events. Ethereum contracts emit logs with indexed topics, and eth_getLogs filters them by contract and topic across a block range: the backbone of most Ethereum indexing. Solana has no topic-indexed log query. Programs write log lines that appear in each transaction's metadata (Anchor emits events as base64 Program data: lines), so Solana indexers usually decode transactions and instructions, or subscribe with logsSubscribe.
  • State. On Ethereum, you read contract state with eth_call against the contract's view functions. On Solana, you read accounts directly with getAccountInfo, or every account a program owns with getProgramAccounts, and decode their bytes with the program's layout or IDL.
  • History. Neither chain's JSON-RPC answers "every transaction for this address" efficiently in one call. Ethereum has no such method at all; Solana's getSignaturesForAddress returns signatures page by page, each needing a getTransaction to decode.

GoldRush covers both chains with one API key, with different depth on each. On the Ethereum API side, the GoldRush Foundational API serves indexed balances, transactions, logs, NFTs, prices and holders, and GoldRush JSON-RPC serves Ethereum's methods with archive depth. On the Solana API side, the Foundational REST API serves token balances (SPL tokens plus native SOL) on solana-mainnet, and its Solana overview lists what it doesn't cover yet; GoldRush JSON-RPC speaks the Solana JSON-RPC method set over HTTP and WebSocket subscriptions; and the Streaming API streams new DEX pairs and OHLCV prices on Solana, which the Solana sniper bot guide builds on.

The same question over JSON-RPC

Here is "what is this address's native balance, finalized" on both chains, through GoldRush JSON-RPC. The envelope is identical; the address format, the finality parameter and the unit are not.

Prerequisites for both scripts in this section: Node.js 22 (the version they were run on; 18 or later has the global fetch they use), a GoldRush API key in GOLDRUSH_API_KEY, and no packages to install. Each is TypeScript with top-level await: save this one as native-balance.mts and run npx tsx@4.23.15 native-balance.mts.

// One GoldRush API key serves both chains.const headers = {    "Content-Type": "application/json",    Authorization: `Bearer ${process.env.GOLDRUSH_API_KEY}`,};const ETH_RPC = "https://rpc.goldrushdata.com/v1/eth-mainnet";const SOL_RPC = "https://rpc.goldrushdata.com/v1/solana-mainnet"; async function rpc(url: string, method: string, params: unknown[]) {    const res = await fetch(url, {        method: "POST",        headers,        body: JSON.stringify({ jsonrpc: "2.0", id: 1, method, params }),    });    const body = await res.json();    if (body.error) throw new Error(`${method}: ${body.error.message}`);    return body.result;} // Integer amount in the smallest unit -> decimal string, without floating-point loss.function formatUnits(amount: bigint, decimals: number): string {    const s = amount.toString().padStart(decimals + 1, "0");    const frac = s.slice(-decimals).replace(/0+$/, "");    return frac ? `${s.slice(0, -decimals)}.${frac}` : s.slice(0, -decimals);} // Ethereum: a 20-byte hex address; the result is a hex string of wei (10^18 per ETH).// The block tag picks how settled the data is: "latest", "safe" or "finalized".const ethAddress = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045";const wei = BigInt(await rpc(ETH_RPC, "eth_getBalance", [ethAddress, "finalized"]));console.log("ETH", formatUnits(wei, 18)); // Solana: a base58 public key; the result is lamports (10^9 per SOL) plus the slot it was read at.// The commitment picks how settled the data is: "processed", "confirmed" or "finalized".const solAddress = "4ZJhPQAgUseCsWhKvJLTmmRRUV74fdoTpQLNfKoekbPY";const { context, value } = await rpc(SOL_RPC, "getBalance", [solAddress, { commitment: "finalized" }]);console.log("SOL", formatUnits(BigInt(value), 9), "at slot", context.slot);

Solana returns lamports as a JSON number. It is exact up to 253 lamports (about 9 million SOL); for accounts that might hold more, parse the raw response with a big-integer-aware JSON parser.

The same question over the Foundational API

The token balance API answers "every token this wallet holds" on both chains with the same path: only the chain name and the address change (credit cost: 1 per call). On Ethereum, it saves scanning Transfer logs to discover which tokens a wallet holds; on Solana, it saves walking the wallet's token accounts and looking up each mint.

This is a separate file that shares nothing with the script above: save it as token-balances.mts and run npx tsx@4.23.15 token-balances.mts.

const API = "https://api.covalenthq.com/v1";const headers = { Authorization: `Bearer ${process.env.GOLDRUSH_API_KEY}` }; type BalanceItem = {    contract_ticker_symbol: string | null;    contract_address: string; // ERC-20 contract on Ethereum, SPL mint on Solana    contract_decimals: number | null;    balance: string | null; // integer string in the token's smallest unit    quote: number | null; // value in the quote currency, where a price exists}; async function tokenBalances(chain: string, wallet: string): Promise<BalanceItem[]> {    const res = await fetch(`${API}/${chain}/address/${wallet}/balances_v2/?quote-currency=USD`, { headers });    // Check the status first: a request with no Authorization header gets an HTML 401, not JSON.    if (!res.ok) throw new Error(`${chain}: ${res.status} ${await res.text()}`);    const body = await res.json();    if (body.error) throw new Error(`${chain}: error ${body.error_code}: ${body.error_message}`);    return body.data.items;} const wallets: [string, string][] = [    ["eth-mainnet", "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"],    ["solana-mainnet", "4ZJhPQAgUseCsWhKvJLTmmRRUV74fdoTpQLNfKoekbPY"],]; for (const [chain, wallet] of wallets) {    const items = await tokenBalances(chain, wallet);    console.table(        items            .filter((t) => t.balance && t.balance !== "0")            .map((t) => ({                symbol: t.contract_ticker_symbol,                token: t.contract_address,                // Number() is fine for display; use BigInt for arithmetic.                amount: Number(t.balance) / 10 ** (t.contract_decimals ?? 0),                usd: t.quote,            }))    );}

On Solana, each item's contract_address is the token's mint, and the native SOL balance is the row with the wrapped SOL mint (So11111111111111111111111111111111111111112), per the Solana wallet docs. On Ethereum, the native ETH row has is_native_token set to true.

Handle errors from both APIs

The two APIs report failures differently. The Foundational API returns its usual envelope with data set to null, error set to true, and an error_code equal to the HTTP status. The docs show this body for a chain name it doesn't recognize:

{    "data": null,    "error": true,    "error_message": "Chain nosuchchain-mainnet not supported.",    "error_code": 501}

A 501 is a stable answer, so fix the chain name rather than retrying. A request with no Authorization header at all gets an HTML 401 page from the edge proxy instead of JSON, which is why tokenBalances checks res.ok before parsing (error handling).

GoldRush JSON-RPC, on both Ethereum and Solana, uses the standard JSON-RPC error envelope with a matching HTTP status. The docs show this body for a missing or malformed Authorization header (HTTP 401):

{    "jsonrpc": "2.0",    "id": 1,    "error": {        "code": -32001,        "message": "missing or invalid Authorization header"    }}

The rpc() helper throws eth_getBalance: missing or invalid Authorization header on it. Set GOLDRUSH_API_KEY and send it as a Bearer header. The other codes, -32002 (no JSON-RPC entitlement), -32003 (out of credits) and -32005 (rate limited), are listed in the JSON-RPC authentication docs.

Which should you build on?

Neither chain is better in general; they make different trade-offs, and many teams ship on both.

  • Choose Ethereum (or an EVM chain) when you want the largest pool of audited contract code, auditors and tooling; when composability with existing DeFi on Ethereum and its rollups matters; or when one codebase should deploy to many EVM chains. Plan for gas costs on mainnet, or deploy to a rollup.
  • Choose Solana when your app makes many small, latency-sensitive transactions (trading, payments, games, consumer apps) and benefits from low per-transaction fees and sub-second slots. Plan your account layout carefully, budget for account storage deposits, and expect to write Rust.
  • Build for both by keeping chain-specific logic at the edges: signing and transaction building differ completely, but reading balances and prices can share one data layer, as the code above shows.

Frequently asked questions

What is the main technical difference between Ethereum and Solana?

Where state lives and how transactions run. Ethereum contracts keep their own storage and the EVM runs a block's transactions one after another. Solana programs are stateless, state lives in separate accounts, and every transaction declares the accounts it touches, so the runtime (Sealevel) can run non-conflicting transactions in parallel.

Is Solana an EVM chain?

No. Solana runs its own virtual machine: programs are compiled to sBPF bytecode, usually from Rust, and use Solana's account model. Solidity contracts and EVM tools such as Foundry and viem don't run on Solana directly. Ethereum rollups and sidechains such as Base, Arbitrum and Polygon are EVM chains.

How do fees on Solana compare to gas on Ethereum?

Ethereum charges gas used times (base fee + priority fee), and the base fee moves with demand across the chain. Solana charges a fixed 5,000 lamports per signature plus an optional prioritization fee priced per compute unit. Solana also requires each account to hold a refundable minimum balance for its storage, where Ethereum charges gas to write storage.

When is a transaction final on Ethereum and on Solana?

On Ethereum, when its block is in a finalized checkpoint, which Casper-FFG reaches after two-thirds of staked ETH votes for it; read with the finalized block tag. On Solana, at the finalized commitment level, when the block has 31 or more confirmed blocks on top. Both chains also offer faster, less settled levels (latest/safe and processed/confirmed).

Do Ethereum developers need to learn Rust for Solana?

Mostly, yes. Solana programs are usually written in Rust, with the Anchor framework handling much of the account validation and serialization. On the client side you can stay in TypeScript with @solana/kit. The Web3 programming languages guide compares the options.

Can I use one API to read data from both Ethereum and Solana?

Yes, with different coverage on each. GoldRush uses one API key for both: on Ethereum, the Foundational API serves balances, transactions, logs, NFTs and prices, and JSON-RPC serves Ethereum's methods; on Solana, the Foundational API serves token balances, JSON-RPC serves the Solana method set over HTTP and WebSocket, and the Streaming API streams DEX pairs and prices.

Next steps

Get new guides by email

New tutorials and best practices for building with blockchain data, sent as they're published.