What is offchain?
Offchain describes transactions that are not processed and recorded one by one by the nodes of a given blockchain, but are completed in a system outside that chain; some approaches later submit the results or transaction data back to that chain. Records written to a blockchain and jointly verified and stored by the nodes in its network are called onchain records. Offchain records, by contrast, are kept by systems outside the chain, such as a trading platform, the two parties to a transaction, or the rollups described below.
"Offchain" is always relative to a particular chain. A sidechain, for example, is a separately operated blockchain connected to Ethereum mainnet through a cross-chain bridge. Transactions on a sidechain are offchain relative to Ethereum, yet they are onchain records on the sidechain's own ledger. A sidechain has its own validators and consensus rules, its security does not come from Ethereum, and moving assets between the two chains also requires trusting the bridge. So when you say "offchain," first make clear which chain you mean.
Offchain transactions are recorded in three places
Common offchain transactions are recorded in three places: a trading platform's own ledger, a channel between the two parties to a transaction, and rollups, which execute transactions offchain and then submit the data onchain. All three reduce the number of transactions that must be written to the blockchain, but they differ in how offchain records make their way back onchain.
A trading platform's internal ledger
After a user deposits crypto assets with a trading platform, the platform records each account's balance in its own system. When users buy, sell, or transfer assets to one another within the platform, the platform only needs to update these account records instead of sending a transaction to the blockchain each time. On OKX, withdrawals come in two kinds: an onchain withdrawal moves assets over the blockchain network to an external wallet or another platform and requires a network fee set by the blockchain; a withdrawal to an OKX user is an internal transfer within the platform that arrives in real time, carries no fee, and does not go through blockchain confirmation. This feature is not available in every region; the OKX help page is the authoritative reference.
The platform ledger connects with the chain at only two moments: a deposit from an external address is an onchain transaction the user sends to a platform address, and an onchain withdrawal is an onchain transaction the platform sends from its own address to the address the user entered. Between these two onchain transactions, the account balance is the platform's own bookkeeping record for the user. Users cannot see these internal changes on a block explorer, and whether a balance can be withdrawn depends on whether the platform holds sufficient assets and continues to operate normally; see crypto custody for more.
Channels between the two parties
A payment channel lets two people first lock assets into a contract on the blockchain, or into a multisignature address whose funds can be moved only with both of their signatures. They then exchange balance updates signed by both of them offchain, as many times as needed, and finally write only the result back onchain. Bitcoin's Lightning Network and state channels on Ethereum both follow this approach.
Suppose Alice and Bob each lock 0.5 bitcoin (BTC) to open a channel, then pay each other 10 times, and the last balance they have both signed is Alice 0.3 BTC and Bob 0.7 BTC. If they agree to close the channel, only two transactions appear onchain: the opening and the closing. At closing, the chain's rules split the 1 BTC between them according to the final balance (excluding onchain fees). The 10 payments in between are kept only by the two parties.
If one party tries to close the channel with an old balance, the other can contest it onchain within a set period. On Ethereum, the state channel contract adopts the more recent signed state and can confiscate the funds the cheating party locked in the contract; in the design described in the Lightning Network paper, the party that follows the rules broadcasts a penalty transaction and takes all the funds in the channel. This protection requires the user, or a service they delegate, to watch the chain within that period.
Rollups: offchain execution, onchain data
This article uses Ethereum as the example. Rollups on Ethereum execute transactions outside mainnet. The node that processes transactions and submits batches is called the operator: it bundles a large number of transactions and publishes the transaction data, or enough data to reconstruct the state, to Ethereum, where a contract records the rollup's state and the assets users have deposited. Relative to Ethereum mainnet, these transactions are executed offchain, yet their data returns onchain; on the rollup's own ledger, they are onchain records.
Contracts on Ethereum confirm these results in one of two ways. An optimistic rollup presumes that the bundled results are correct: during a challenge period, anyone can submit a fraud proof to overturn an incorrect result, which requires at least one honest node to execute the transactions and raise a challenge when it finds an error. A zero-knowledge rollup instead attaches to each batch a cryptographic proof that the computation is correct, called a validity proof, and the contract updates the state only after the proof passes its check. Because the data is published on Ethereum, users can still act on the onchain data if the operator goes offline: in an optimistic rollup, for example, other nodes can use the data to recover the latest state and keep processing transactions, and users can use it to prove their balances and withdraw their assets. A specific rollup's contracts, operator, and proof mechanism can still fail, and publishing data to Ethereum does not make those risks disappear.
How trading platform ledgers, channels and rollups differ
The table below compares them on four points: who keeps the records, when they return onchain, what is relied on in a dispute, and what users need to do:
| Trading platform ledger | Payment/state channel | Rollup | |
|---|---|---|---|
| Who keeps the offchain records | The trading platform | The two channel parties | The rollup operator, with data published to Ethereum |
| When records return onchain | On deposits from external addresses or onchain withdrawals | When the channel opens or closes, or when a dispute arises | After each batch of transactions is bundled |
| What is relied on in a dispute | The platform's operations, asset safekeeping, and user agreement | Onchain rules settle disputes based on records signed by both parties | Contracts on Ethereum check fraud proofs or validity proofs |
| What users need to do | Trust that the platform can pay out the recorded balance | Keep the signed records and watch the chain within the deadline | Rely on onchain data and the proof mechanism, as well as the specific rollup's implementation |
Approaches that rely on onchain rules also involve waiting and operating costs. For example, withdrawing from an optimistic rollup back to Ethereum generally means waiting for a challenge period of about seven days to end, and channel users who delegate a dedicated "watchtower" service to monitor the chain for them add to their costs.
Benefits and trade-offs of offchain transactions
The benefit of moving transactions offchain is straightforward: transactions on chains such as Ethereum and Bitcoin must be processed by the nodes in the network and involve network fees, so moving large numbers of transactions offchain reduces the work mainnet does transaction by transaction and spreads out onchain fees, although actual speed and cost still depend on the service's design and usage. The trade-off is that users must place additional trust in some party or take on additional operating requirements; the comparison table above shows what each approach requires. When assessing an offchain service, start by asking who keeps the records, when they return onchain, and what rules settle disagreements.
FAQ
Are offchain transactions always cheaper than onchain transactions?
Not necessarily. Offchain processing avoids the fee of submitting each transaction to mainnet, but there may still be service fees. Opening and closing a channel, a rollup publishing data to Ethereum, and onchain withdrawals from a platform all still require onchain fees; those fees are simply shared across many transactions or incurred at only a few points in time.
Can offchain records be changed?
It depends on who keeps them. A platform ledger is maintained by the platform; a channel balance can be updated only with both parties' signatures. Neither platform ledgers nor channel balances are protected by the blockchain network's consensus. Once a rollup's transaction data is published to Ethereum, overturning it would require overturning the records on Ethereum.
Related terms
Learn more about onchain, blockchain, blockchain nodes, smart contracts, gas fees, crypto custody, block explorers, and cross-chain, or return to the cryptocurrency glossary.
References
Digital Assets subject to volatility and not insured. Not financial/investment advice. Not all products and services offered in all regions. Exclusions and T&Cs apply.
© 2026 OKX. This article may be reproduced or distributed in its entirety, or excerpts of 100 words or less of this article may be used, provided such use is non-commercial. Any reproduction or distribution of the entire article must also prominently state: “This article is © 2026 OKX and is used with permission.” Permitted excerpts must cite to the name of the article and include attribution, for example “Article Name, [author name if applicable], © 2026 OKX.” Some content may be generated or assisted by artificial intelligence (AI) tools. No derivative works or other uses of this article are permitted.








