Latest news about Bitcoin and all cryptocurrencies. Your daily crypto news habit.
“On-chain” and “off-chain”, are frequently heard in the crypto space, which, in a broader sense, refer to storing data “on or off the blockchain” respectively. However, in a narrow sense, the two terms also mean whether the storing data can be publicly or privately accessible to the blockchain or blockchain-related services, such as transaction, data analysis, escrow and beyond. Here are the definitions and differences between on-chain and off-chain, particularly in processing translations.
What’s an on-chain transaction?
On-chain transaction refers to a transaction that is validated by all the nodes to ensure the transparency, security, and validity of the network’s public ledger. The nodes are formed by many devices, which are usually computers that collectively participate and safeguard the blockchain network. Once the transaction is verified, the record will be stored in different blocks with a timestamp and a unique hash to chain them together in a fixed order within the same network.
And, any add-on data will go through the whole procedure again before getting a new block attached on the chain. For validation, Proof-of-Work (PoW) is the oldest consensus mechanism that rewards miners for successfully cracking mathematical challenges. Meanwhile, Proof-of-Stake (PoS) is another consensus mechanism that requires participants to possess a certain amount of a native crypto token (through holding or staking) of the blockchain so that they have a chance to be the validators for a block of transactions. The typical examples for on-chain transactions are Bitcoin, Burstcoin and NEC, according to Investopedia.
What’re the advantages and disadvantages of on-chain transactions?
The benefits:
Security: The blockchain network encrypts a digital collection of data that can’t be altered once it’s verified and added to the network, which is collectively safeguarded by the nodes. In other words, on-chain transactions are designed to be irreversible to make sure that the data stored is immutable and tamper-proof.
Transparency: thanks to the distributed ledger, all transactions on the blockchain are simultaneously recorded and validated by different nodes, and each node has the same set of data. Put simply, everyone can trace back the transaction and can be notified if there are unusual activities in the network.
Decentralization: For conventional chains such as Bitcoin, there is no single party or authority to run the network other than a collective effort of the nodes, so the risk of an intermediary breaching trust or manipulating data is relatively little.
The drawbacks:
Inefficiency: Transaction speed is slow on blockchain. As the blockchain ecosystem grows, so does its transaction volume. It’s highly likely the processing time is slowed down since all nodes need to validate and replicate the transaction records, which also leads to network congestion. For example, Bitcoin, the largest cryptocurrency by market cap, needs at least 10 minutes to get a new block added onto the network, even though no intermediary is needed during the transaction.
High cost: With the increasing demand for blockchain transactions, the transaction fees are expected to climb as well. For example, Ethereum, the second largest cryptocurrency by market cap with smart contract functionality, has limited storage in each block that requires a higher gas fee to prioritize transactions to be included in the next block due to fierce competition. Therefore, transaction fees can be a major hurdle for the scale-up of blockchain transactions since users will be charged with increasing amounts of cryptocurrencies.
Eco-unfriendliness: As for the environmental aspect, blockchain requires a significant amount of energy, especially for PoW since miners need a lot of computational power and energy to compete with each other to solve a mathematical challenge before getting a reward. According to Joule journal, the average carbon intensity of electricity on the Bitcoin network increased by 17% in one year between 2020 and 2021.
What is an off-chain transaction?
In contrast, off-chain transactions don’t necessarily require the blockchain network to execute transactions, and the data isn’t publicly available. Or else, some off-chain transactions only need the blockchain network for integration after the completion of transactions elsewhere. No matter what, off-chain transactions need to seek individual users’ approvals for handling, validating and authenticating all transactions by a third party, such as PayPal (PYPL). The off-chain approach can even be used to perform coupon-based transactions.
In this case, the parties involved must purchase the coupons in return for the cryptocurrency. Simply put, users possess a private key to gain access to their wallets, which keep the value of the cryptocurrency, but the transferring ownership over the wallet is to someone else. As there are no miners to queue up for validating transactions, so off-chain transactions can speed up the transactions and also lower the transaction fees.
What’re the advantages and disadvantages of off-chain transactions?
The benefits:
Efficiency: As the transactions are executed off the chains, so no miners queue up to validate and record each and every transaction to speed up the whole process and avoid any network congestion, making the transactions faster or even instantaneous to process.
Low cost: Because of the absence of miners (for PoW) or validators (for PoS), off-chain transactions require little-to-no fees, which is extremely beneficial to handle large sums of cryptocurrency.
Greater anonymity: The data won’t be publicly broadcasted to the network, hence off-chain transactions offer more privacy.
The drawbacks:
Less transparency: Off-chain transactions do not follow the same protocol as their counterparts, so the parties involved can’t keep track of the changes on the chain and the transactions process solely depends on the third party, which opens up potential disputes in the future.
No permissionless: Similar to the above point. For off-chain transaction, users own a wallet key, but they don’t have the right of transferring the ownership of the wallet, nor having the right of validating and authenticating all the transactions on the chain, so everything depends on the third party or intermediary, who must have good credibility to avoid any disputes.
Relatively less security: Since immutability is one of the key features of blockchain, if the transaction is executed onto an off-chain network, it indicates that the data is relatively easy to be altered and the network is more vulnerable to fraudulent activity compared with on-chain transactions.
The takeaway:
As blockchain application is still in its nascent stage, it’s hard to say whether on-chain or off-chain transactions are better, but it’s interesting to see some buidlers try harder to adopt the good from both sides and create something new in between, like Chainlink, an oracle solution that enables off-chain data to be transferred to on-chain smart contracts, in the meantime, the nodes are compensated with the network’s native token, LINK, which is available on multiple credible exchanges including Poloniex. Again, it’s always important to DYOR and stay curious to explore the unknown world.
On-chain vs Off-chain: What are the differences? was originally published in The Poloniex blog on Medium, where people are continuing the conversation by highlighting and responding to this story.
Disclaimer
The views and opinions expressed in this article are solely those of the authors and do not reflect the views of Bitcoin Insider. Every investment and trading move involves risk - this is especially true for cryptocurrencies given their volatility. We strongly advise our readers to conduct their own research when making a decision.