What are off-chain transactions vs. on-chain transactions?
Understandably, on-chain transactions are transactions on the blockchain whereas off-chain transactions works outside the blockchain, what are the main differences/implications to blockchain as a whole?
To post an answer, please !
2 answers
33 views
As mentioned, on-chain transactions are done entirely on-chain. The history of the transaction and all its details are available on the blockchain. However because transaction fees and gas costs are dependent on the complexity, this can be somewhat expensive. Off-chain transactions are done through some other means, such as another blockchain or a trusted entity. At some point, the results of the off-chain transactions may eventually be recorded back on-chain as its final outcome. Consider people trading ETH on a centralized token exchange. The ETH started onchain, and was transferred to the wallets held by the centralized exchange. Users of the exchange then buy and sell on the exchange, where the results of each transaction are recorded in the exchange's database. At some point, the current holder may withdraw their ETH back to the blockchain again. From the blockchain's point of view, ETH got sent to a wallet, and likely a different amount got sent back later. All the transactions in-between that happened are not known. And because of that, for all of those trades in between, gas did not need to be paid to the blockchain.
On chain transactions are the transactions available on the blockchain (distributed ledger) and are also visible to all the nodes on the blockchain network. Off-chain transactions, on the other hand,is the movement of value outside of the blockchain. Hope that helps
Not the answer you're looking for? Browse other questions tagged #Web3 #General #Crypto or ask your own question.