What Are On-Chain Transactions?
On-chain transactions are cryptocurrency transactions that occur on a blockchain's main chain. Off-chain transactions occur on second-layer blockchains, networks, or applications and are, therefore, more susceptible to interference.
However, despite their security, on-chain transactions generally 🍃have higher fees and slower processing times than off-chain transactions, which are the main reasons more popular blockchains are adopting methods to accept off-chain transactions.
Key Takeaways
- On-chain transactions are validated, recorded, and confirmed on a main blockchain.
- Off-chain transactions occur off a main blockchain network, such as on a second-layer chain.
- On-chain transactions are more secure since they can't be altered once they're recorded on the blockchain network.
- On-chain transaction speeds are generally a concern across popularly-used blockchains like Bitcoin and Ethereum because fewer transactions can be processed at once compared to off-chain transactions.
Understanding On-Chain Transactions
On-chain transactions occur on a main blockchain. They have been validated, rec♛orded, and agreed upon by the blockchain network. For example, on the Bitcoin blockchain, a user who transfers a bitcoin to another user with their wallet via the main Bitcoin blockchain has conducted an on-chain transaction. The transaction was sent to a mem pool, processed into a block, and broadcast to the network, which confirms the block.
A user who conducts a transaction using Arbitrum One, a second-layer solution for Ethereum, executes an off-chain transaction. This network processes transaction🌳s for the main blockchain, places them in batches called rollups, and sends them to the main chain for validation. Arbitrum One is much faster and cheaper because it bundles transactions for the Ethereum main blockchain.
Concerns About On-Chain Transactions
The most significant concerns about on-chain transactions are the time they take to be processed and their costs. On-chain transactions can take a long time to be confirmed if certain conditions are met, such as times when there are more transactions occurring. More transactions tend to cause network congestion on popular blockchains, which increases confirmation times and 澳洲幸运5官方开奖结果体彩网:network fees.
In some cases, this congestion can cause users to wait hours for transaction confirmations. For example, on July 19, 2024, the average Bitcoin confirmation time was 1,366.4 minutes, or nearly 23 hours—three days earlier, it was 76.8 minutes, or a little more than one hour. That same day, average fees were $0.98, and there were 116,720 unconfirmed transactions waiting in the mem pool.
On new blockchains, when transaction volume is low, on-chain transactions may be sufficient for most users, and fees are usually low. But as a user base grows (depending on the blockchain's design), network congestion occurs, and transaction processing can slow down. The chain will still process as many transactions per second as before, but there will be more waiting than when there were fewer transactions. Most chains charge fees for processing transactions, and fees generally increase when there is more demand.
Developers are working to 澳洲幸运5官方开奖结果体彩网:address congestion𒁃 and fee issues across all blockchains, but the difficulty in doing so concerns scalability, decentralization, and security. To increase one of these factors,ܫ another, or both, must be sacrificed. Some blockchain projects claim to have solved this trilemma, but in reality, they have sacrificed one factor for another in nearly all cases.
Off-chain transactions, while increasing processing speeds and decreasing fees, also decrease a blockchain's security because a bridge is needed to communicate with the main chain. This adds a weakness that can be, and has been, exploited by hackers.
Is On-Chain or Off-Chain Better?
Whether on-chain or off-chain transactions are better depends on the blockchain and cryptocurrency being used and the user's personal preferences. If the goal is security, an on-chain transaction might be preferred, but if low transaction fees and faster speeds are important, an off-chain transaction might be better.
It also depends on the off-chain solution's programming and whether it is a target for hackers and thieves. Arbitrum, the second-layer and off-chain processing solution for Ethereum, has grown into more than just an off-chain processor for Ethereum—in early 2024, it underwent a series of hacks that cost users millions.
What Are On-Chain Payments?
An on-chain payment is a transaction that is facilitated by a main blockchain rather than a sec𒀰ond-layer solution.
What Is the Meaning of On-Chain?
In blockchain and cryptocurrency, on-chain means an action that is recorded and verified only by the main chain.💞 Off-chain means an action that is recorded and verified by another chain or application and sent to the main chain to be officially recorded.
What Does Enable On-Chain Transactions Mean?
You might encounter an option in a wallet to process a transaction on-chain or off-chain. "Enable On-Chain Transaction" would mean you would choose to have your transaction processed by the main blockchain. Depending on the cryptocurrency, this could mean higher fees and slower processing times compared to using an off-chain transaction.
The Bottom Line
An on-chain transaction is when an activity or transfer is recorded and 澳洲幸运5官方开奖结果体彩网:processed by a blockchain's main network. Conversely, an off-chain transaction is when a second-layer application records and processes it and then sends it to the main blockchain to be officially recorde💛d and confirmed.
The comments, opinions, and analyses expressed on Investopedia are for informational purposes only. Read our for more info. As of the date this article was written, the author does not own cryptocurrency.