Эта страница предназначена исключительно для справочных целей. Некоторые услуги и функции могут быть недоступны в вашем регионе.

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.

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

Дисклеймер
Материалы представлены исключительно в ознакомительных целях и могут включать информацию о продуктах, которые недоступны в вашем регионе. Они не являются инвестиционным советом, рекомендацией, призывом или предложением к покупке, продаже или хранению криптовалюты / цифровых активов, а также финансовым, бухгалтерским, юридическим или налоговым советом. Криптовалютные и цифровые активы, в том числе стейблкоины, сопряжены с высокими рисками и подвержены сильным ценовым колебаниям. Оцените свое финансовое состояние и тщательно обдумайте, подходит ли вам торговля криптовалютой / цифровыми активами и их хранение. За подробной консультацией обратитесь к специалисту по юридической, налоговой или инвестиционной деятельности. Информация (включая рыночные и статистические данные, при их наличии), представленная на этой странице, предназначена исключительно для ознакомления. При подготовке статьи были приняты все меры предосторожности, однако автор не несет ответственности за фактические ошибки и упущения.

Цифровые активы подвержены волатильности и не застрахованы. Не является финансовым или инвестиционным советом. Некоторые продукты и услуги доступны не во всех регионах. Действуют исключения и условия.

© OKX, 2026 год. Эту статью можно копировать или распространять полностью, а также использовать выдержки из нее объемом не более 100 слов, при условии, что такое использование не является коммерческим. При любом копировании или распространении всей статьи должно быть указано: «Эта статья принадлежит OKX (© 2026 г.) и используется с ее разрешения». Разрешенные выдержки должны содержать ссылку на название статьи и указание авторства, например «Название статьи, [имя автора, если указано], © OKX, 2026 г.». Часть контента может быть создана с использованием инструментов искусственного интеллекта (ИИ). Использование статьи в производных и других работах не допускается.

Похожие статьи

Показать еще
12-03-glossary-thumnail/zero-knowledge-rollup

What is Post-Quantum Cryptography (PQC)?

**Post-quantum cryptography (PQC), also called quantum-resistant or quantum-safe cryptography, is a family of public-key algorithms designed to withstand attacks from quantum computers.** It runs as s
3 дек. 2026 г.
crypto-glossary-cover-v5.contentful

Crypto Glossary A–Z

Explore key crypto, blockchain, and trading terms through concise definitions, organized alphabetically for quick reference. [A](#a) · [B](#b) · [C](#c) · [D](#d) · [E](#e) · [F](#f) · [G](#g) · [H](#
3 дек. 2026 г.
Smart Contract

What is a digital signature?

A digital signature is a string of characters computed from a piece of data with a [private key](/learn/what-is-private-key). Anyone who has the matching [public key](/learn/what-is-public-key), the s
3 дек. 2026 г.
12-03-glossary-thumnail/zero-knowledge-rollup

What is a ZK rollup?

**A zero-knowledge rollup (ZK rollup) is a type of [rollup](/learn/what-is-a-rollup): it hands the results of a batch of transactions to the main chain together with a proof, and the main chain accept
3 дек. 2026 г.
12-03-glossary-thumnail/zero-knowledge-proof

What is a zero-knowledge proof?

**A zero-knowledge proof (ZKP) lets someone convince another party that a statement is true without revealing any information beyond the statement itself.** The party that submits the proof is called
3 дек. 2026 г.
12-03-glossary-thumnail/validator

What is a validator?

**A validator is a participant in a [proof-of-stake](/learn/what-is-proof-of-stake) blockchain that proposes new blocks and votes on other blocks.** It must first [stake](/learn/what-is-staking) the a
3 дек. 2026 г.
Показать еще