homecryptocurrency NewsThe difference between off chain and on chain transactions

The difference between off-chain and on-chain transactions

The difference between off-chain and on-chain transactions
Profile image

By CNBCTV18.com Jun 22, 2022 7:15:55 AM IST (Published)

Think of a blockchain as a cloud storage facility, which is divided into two parts — private and public. On-chain transactions are like the public cloud — visible to all, whereas off-chain transactions are like the private cloud; the data is not publicly accessible.

On-chain and off-chain transactions can be challenging to understand, so let’s use an analogy to make things easier. Think of a blockchain as a cloud storage facility. This cloud storage facility can be divided into two parts — private and public. On the one hand, data stored on the public cloud is visible to all. On the other hand, only a select few can view the data stored on the private cloud. Yet, both are part of one main cloud storage facility.

Recommended Articles

View All

In this scenario, on-chain transactions are like the public cloud — visible to all. And off-chain transactions are like the private cloud; the data is not publicly accessible. Keeping this example in mind, let us dive deeper into on-chain and off-chain transactions.
What are on-chain transactions
They are transactions that occur on the blockchain. These transactions are stored on the distributed ledger and visible to anyone who has a copy of the ledger. Therefore, every time an on-chain transaction occurs, it leads to an update of the overall blockchain network.
In theory, these transactions should happen in real-time. However, in practice, they can take forever. First, the transaction needs to be validated by several network participants. Then miners must solve complicated mathematical problems to bundle the validated transactions into blocks and add them to the blockchain ledger. This process can be extremely time-consuming.
Plus, as the popularity of Bitcoin and blockchain increases, the transaction volume rises. This makes the network congested, so more time is required to verify a transaction and add it to the public ledger. This also simultaneously increases the transaction fees.
This is where off-chain transactions can step in and solve these problems.
What are off-chain transactions
Off-chain transactions are processed outside the blockchain. They involve a third party that plays the role of a guarantor. The transacting parties enter an agreement outside the blockchain. However, they depend on a third party to facilitate the execution of the agreement. The third party sets the terms and conditions of the agreement. The transaction is executed and recorded on the blockchain when all the terms are met.
The third party here is usually a layer-2 solution designed to carry out transactions independently and therefore reduce the burden on the mainchain. One example of such a layer-2 solution is the Lightning Network.
The Lightning Network is a layer-2 protocol built on the Bitcoin blockchain — it speeds up the transaction and reduces the fees. Here’s how it works: it creates a channel between two transacting parties. Once this channel is established, the two parties can instantly send BTC to one another at minimal costs. These transactions are not transmitted to the Bitcoin blockchain.
Once the parties conclude their transactions, the channel is closed. The final amounts are sent to the participating parties as per the transfer history recorded on the channel — this is the only transaction stored on the Bitcoin blockchain.
On-chain vs off-chain transactions
At the end of the day, both on-chain and off-chain transactions have their fair share of features and drawbacks. Off-chain transactions can be executed almost instantly, have lower transaction fees, and offer more privacy since the transaction records are kept off the blockchain.
Plus, the on-chain transactions are not scalable. It is because layer one solutions can only process seven transactions per second. Therefore, people prefer off-chain transactions for lower–value transactions, which reflect immediately.
Check out our in-depth Market Coverage, Business News & get real-time Stock Market Updates on CNBC-TV18. Also, Watch our channels CNBC-TV18, CNBC Awaaz and CNBC Bajar Live on-the-go!

Top Budget Opinions

    Most Read

    Market Movers

    View All
    Top GainersTop Losers
    CurrencyCommodities
    CompanyPriceChng%Chng