Skip to content
Gallery
Blockchain One Pager
Share
Explore
Fundamentals

icon picker
On chain & Off chain

image.png

On-Chain Transactions/Data

On-chain analysis is a research strategy that leverages information found on the public blockchain to help traders enhance their crypto trading strategies. On-chain data usually includes information regarding all transactions that occur on a certain public blockchain network.
transaction details such as sending and receiving addresses
transferred tokens or currencies, transaction amount, transaction fee, and the remaining funds for a certain address.
It also contains block data such as timestamps, miner fees, rewards, and the smart contract code.

On-Chain Governance

On-chain governance is a system for managing and implementing changes to cryptocurrency blockchains.
On-chain governance includes rules for instituting changes that are encoded into the blockchain protocol.
Developers propose changes through code updates and each node or participant votes on whether to accept or reject the proposed change.
Typically, on-chain governance involves the following stakeholders:
Miners—who operate the nodes, which validate the transactions
Developers—who are responsible for core blockchain algorithms
Users or participants—who use and invest in various cryptocurrencies
The participants or nodes can vote to accept or decline the proposed change.
However, not all nodes have equal voting power.
Nodes with greater holdings of coins have more votes as compared to nodes that have a relatively lesser number of holdings.
If the change is accepted, it is included in the blockchain and baselined. In some instances of on-chain governance implementation, the updated code may be rolled back to its version before a baseline, if the proposed change is unsuccessful.

image.png

Off-Chain Transactions/Data

In contrast, an off-chain transaction takes the value outside of the blockchain. It can be executed using multiple methods.
There can be a transfer agreement between transacting parties.
Using a third party such as a guarantor who guarantees to honor the transaction. Present-day payment processors such as PayPal work on these lines. (P1 to PayPal to Bank)
A participant purchases coupons in exchange for the crypto-tokens and gives the code to another party who can then redeem them. Redemption is possible in the same cryptocurrency or in different ones, depending on the coupon service provider.
In the simplest way, two parties can even exchange their private keys involving a fixed amount of crypto coins. This way, the coins never leave the address/wallet, but the currency receives a new owner off-chain.
WX20211127-181800@2x.png

Off-Chain Transactions Advantages

They can be executed instantly.
Off-chain transactions usually don't have a transaction fee, as nothing occurs on the blockchain. Since no miner or participant is required to validate the transaction, there is no fee, making it an attractive option, especially if large amounts are involved.
Off-chain transactions offer more security and anonymity to the participants because details are not publicly broadcast. In the case of on-chain transactions, it is possible to partially determine a participant’s identity by studying transaction patterns.

简而言之

on-chain

on-chain 就是比特币的常规交易方式: 给我一个比特币地址 (公钥), 我用客户端创建交易发送比特币给你, 这笔交易在全网广播, 被确认, 被打包进区块. 显然, 交易是直接发生在链上的.

off-chain

至于 off-chain 其实玩过比特币的人也都用过, 我们在交易所里的交易就是 off-chain 交易. 这是如何运作的呢?
A, B 分别在某交易所开户, 交易所会分别为 A, B 生成一对公钥私钥, 但是 A 和 B 都不知道平台给他们生成的私钥, 只知道自己的公钥. 然后, A 和 B 用自己的钱包往平台给他们开的公钥地址里冲值比特币, 注意这个操作依然是 on chain 的.
再然后, A 通过交易所转了 0.5BTC 给 B, 但由于 A 没有私钥, 所以需要交易所拿 A 的私钥去签名并广播这个交易, 然而交易所真的需要去广播这个交易吗? 不需要的, 交易所只需要在自己的数据库里, 将 A 的账户余额 -0.5BTC, 将 B 的账户余额 +0.5BTC. 这一步, 只是交易所自己维护的信息在更新, 没有上链, 所以这个操作是 off chain 的.
最后, 当 A, B 从交易所取现时, 交易所将他们线上账户的比特币转给他们自己的比特币地址时 (A, B 自己拥有私钥的地址), 这个操作才会重新 on chain.
Bibliography:

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.