What are off-chain transactions?
When we talk about transactions in a blockchain network like Bitcoin, we normally talk about the transactions that occur on the Bitcoin blockchain network. These are known as on-chain transactions.
Bitcoin networks can only process transactions that transfer Bitcoins from one person/entity to another. However, if we're trading a small number of Bitcoins, the transaction fees could quickly climb, making it difficult for users to make transactions with few Bitcoins. To solve this issue, layer 2 (off-chain) protocols have been built on top of the Bitcoin blockchain and its counterparts.
Note: Read more about a blockchain transaction here.
What are off-chain transactions?
An off-chain transaction is a transaction that is processed on a system other than the main blockchain. Thus, these transactions are not recorded on the blockchain. These transactions are not sent to the miners for processing. These are processed faster than on-chain transactions, and there is no transaction fee in off-chain transactions.
How do we carry out off-chain transactions?
Off-chain transactions can be carried out using the following methods and/or protocols:
such as the Lightning Network.Layer 2 protocols These are secondary protocols or frameworks that are built on top of an existing blockchain. such as the Liquid Network.Sidechain protocols A sidechain is a secondary blockchain connected to the main network. This blockchain can have its own protocols and consensus algorithms (which can be different form the main network's protocols). Exchanging a private key with the buyer/payee and thus indirectly giving them access to a wallet and transferring the money.
Making a third party in charge of the transaction using the
.multi-signature transactions These are transactions in which at least two signatures are required to approve the transaction.
Comparing off-chain and on-chain transactions
Let's compare the off-chain and on-chain (regular) transactions to understand them better.
Attribute | On-chain transactions | Off-chain transactions |
Processing | Processed on the blockchain network by the miners/validators | No need to be processed |
Transaction fees | Transaction fee is charged according to the size of the transaction | No additional fee is charged |
Speed | Slow because a certain number of confirmations are required to finalize the transaction, which can take hours | Fast because no confirmations are required and only one central authority confirms the transactions |
Security | Transactions stored in the blockchain are immutable ensuring security | Relatively less secure because transactions are not immutable |
Reliability | More reliable | Less reliable |
Free Resources