What does onchain mean?
Onchain means that data or an operation has been written to the ledger of a particular blockchain, where the network's nodes verify and store it according to the protocol's rules. When people say a transfer is "already onchain," they mean it has been included in a block and has become a record that the chain's nodes verify together, with each node keeping its own copy.
"Onchain" always refers to one specific chain. The same token can be issued separately on several chains, and a transfer completed on Ethereum does not appear in the ledger of Bitcoin or any other blockchain. Records that are not written to a blockchain ledger are called offchain.
What is recorded onchain
Different blockchains do not store exactly the same things. Taking Ethereum as an example, there are three main kinds of onchain content:
| Content | What it is | Example |
|---|---|---|
| Transactions | Instructions that an account signs and submits to change the state of the network | Sending ether (ETH) to another address, or calling a contract |
| Account state | The result after transactions are executed | The balance of each address, and the data stored in a contract |
| Contract code | Smart contract programs deployed onchain | The transfer and approval rules of a token contract |
Bitcoin's ledger does not directly record the balance of each address. Instead, it records how many coins each transaction sent to whom; an address's balance is the total of the amounts it has received and not yet sent on. For how this is recorded, see digital asset.
How a transaction becomes an onchain record
On Ethereum, a transaction is first signed and broadcast, then included by a validator; after inclusion, it still has to wait for finality. The whole process can be divided into four steps:
- After the user signs and submits a transaction, the wallet or node computes a transaction hash from the signed transaction, which is used to look the transaction up; see transaction hash.
- The transaction is broadcast to the network and first enters the pool of pending transactions (the mempool).
- A validator packs the transaction into a block and executes it. If an included transaction fails during execution, its state changes are reverted, but the transaction is still recorded in the block, and the fees already consumed are still charged.
- Roughly every 6.4 minutes, the protocol selects a block as a checkpoint, on which validators vote collectively to confirm the history before it. Once the votes reach the threshold, the checkpoint is first marked "justified" and then "finalized"; for details, see finality. When nodes switch to following a different branch and replace existing blocks, this is called a chain reorganization. Once the block containing a transaction is part of finalized history, under normal conditions it will no longer be replaced by a chain reorganization; to overturn it, an attacker would have to lose at least one third of all staked ETH.
A transaction that a wallet shows as "submitted" or "pending" is still at step 2: it is not yet onchain and has to wait until a validator selects it and packs it into a block. For how confirmations are counted once a transaction is in a block, see block confirmation.
Writing data onchain costs fees. On Ethereum, both transactions and storage consume gas, and modifying data stored in a contract is relatively expensive.
Three features of onchain records: public, independently verifiable, hard to tamper with
Onchain records have three characteristics:
- Public: On public blockchains such as Bitcoin and Ethereum, anyone can read transactions and state. The network needs participants to be able to read the data so that they can verify state changes independently. Data written into a transaction stays in the block history for good, so once information such as an ID number or a private key is written onchain, anyone can read it.
- Independently verifiable: Every full node checks each state change against the same set of rules. Users can run their own node to check for themselves instead of having to trust what any single institution says.
- Hard to tamper with: Once a record has been confirmed by subsequent blocks, changing it usually requires controlling a considerable share of the network's mining computing power (hashrate) or of its staked assets; for the specific conditions, see finality.
Four things onchain records cannot prove: identity, outside information, token rights, offchain data
An onchain record proves "what this chain recorded according to its rules." On its own, it cannot prove any of the following:
- Who is behind an address: The chain shows only addresses, not identities. One person can control multiple addresses, and an address may also be controlled by a contract program. The Bitcoin white paper says that transactions themselves are public, but the public keys used to receive payments are not linked to their holders' identities: outsiders can see that someone is sending an amount to someone else, but not whom the transaction involves. The white paper also cautions that multiple addresses may be linked to the same owner, and once the identity behind one address is identified, other transactions associated with it may be traced as well.
- Whether external information is true: Smart contracts cannot by themselves read information from outside the blockchain, so data such as exchange rates or match results has to be written onchain by an oracle. An onchain record shows only that the oracle submitted this data; whether the data itself is true depends on the oracle and its data sources. If the data is wrong, contracts that rely on it will also execute on the wrong data.
- The rights behind a token: An onchain balance shows how many tokens you hold, but the stock, debt claims or rights to physical assets that a token claims to represent depend on offchain legal arrangements; see tokenized stocks.
- Raw data stored offchain: Because onchain storage is relatively expensive, some applications write only a hash of the data onchain and keep the raw data offchain. The onchain hash can prove whether the data has been altered, provided that someone still keeps the raw data.
So when you see a claim that something is "onchain," first ask: what exactly was written onchain, on which chain, and which part can the onchain record actually prove?
FAQ
Is something safe once it's onchain?
Being onchain only means the record has been accepted by the network. It does not mean the counterparty can be trusted, nor that the contract is free of vulnerabilities. A transaction sent to a scam address is recorded onchain just as faithfully, and it is very hard to reverse.
Do trades and transfers in a trading platform account count as onchain?
Usually not. Buying and selling in a trading platform account, or making an internal transfer to another user of the same platform, only changes the platform's own ledger. An onchain transaction occurs only when you deposit from an external address or withdraw assets to an external address. For the difference between a platform's ledger and onchain records, see offchain.
Do transactions on layer 2 networks count as onchain?
It depends on which chain you mean. Ethereum's documentation classifies layer 2 networks as offchain scaling solutions: transactions are processed outside Ethereum mainnet, and layer 2 networks such as rollups then submit transaction data or proofs to mainnet. On the layer 2 network's ledger, a transaction is an onchain record; until it is submitted to Ethereum mainnet, however, it is not yet a record on Ethereum mainnet. See offchain.
Related terms
Learn more about offchain, blockchain, smart contracts, transaction hashes, block explorers, and cryptocurrency, or return to the cryptocurrency glossary.
References
Digitaalisiin varoihin liittyy volatiliteettia, eikä niitä ole vakuutettu. Ei ole taloudellista neuvontaa tai sijoitusneuvontaa. Kaikkia tuotteita ja palveluita ei tarjota kaikilla alueilla. Poikkeukset ja käyttöehdot pätevät.
© 2026 OKX. Tätä artikkelia saa jäljentää tai jakaa kokonaisuudessaan, tai siitä saa käyttää enintään 100 sanan katkelmia, edellyttäen että tällainen käyttö on ei-kaupallista. Koko artikkelin jäljentämisessä tai jakelussa on myös näkyvästi mainittava: ”Tämä artikkeli on © 2026 OKX ja sitä käytetään luvalla.” Sallituissa katkelmissa on mainittava artikkelin nimi ja tekijätiedot, esimerkiksi ”Artikkelin nimi, [tekijän nimi tarvittaessa], © 2026 OKX.” Osa sisällöstä saattaa olla tekoälyn (AI) työkalujen tuottamaa tai avustamaa. Tästä artikkelista ei sallita johdannaisteoksia eikä muuta käyttöä.









