RGB++ Transaction Process
Last updated
Last updated
Out-of-chain calculations
Select the next one-time seal to be used, e.g. btc_utxo#2
Calculate off-chain and generate an RGB++ transaction to be sent to CKB: CKB_TX_B
Calculate off-chain commitment = hash(CKB_TX_B | btc_utxo#1 | btc_utxo#2)
BTC Transaction Submission
Generate and send a Bitcoin transaction Bitcoin_TX_A, input consumed btc_utxo#1, output added to above commitment via OP_RETURN
CKB Transaction Submission
Send the above CKB transaction CKB_TX_B
Userβs latest state is maintained by CKB_TX_B.output.data
The next change of status requires the use of btc_utxo#2, CKB_TX_B.output.
On-chain validation
Bitcoin validation related utxo can only be spent once by a given user.
There is a light client for Bitcoin on CKB, which can verify that the relevant transactions on Bitcoin exist on the Bitcoin chain.
The relevant transaction on Bitcoin is submitted as a witness to the CKB transaction to assist in the verification
CKB further verifies that the correct utxo was spent on the BTC transaction.
CKB further verifies that the BTC transaction is committed with the correct commitment
CKB verifies that the state transfer on the CKB conforms to the predefined contract rules.
RGB++ Client
Unlike the RGB protocol, all transactions in RGB++ are on CKB and are validated by CKB script constraints, so there is no need for a standalone client for RGB++. Users only need to access Bitcoin and the CKB light client to validate all transactions. The CKB light client also uses the PoW algorithm to validate all historical transactions and state from the nearest block header, which in turn validates all transactions in RGB++ using isomorphic bindings.
Transaction Folding
The RGB++ protocol isomorphically binds the Bitcoin UTXO to the CKB Cell, enabling Turing-complete Bitcoin UTXO transactions supported by CKB Cell validation. If we further utilize the programmability of the CKB Cell, then we can map multiple CKB transactions to a single Bitcoin RGB++ transaction, which allows a low-speed, low-throughput Bitcoin chain to be scaled with a high-performance CKB chain.