Source: Byte Yuan CKB
Cross-chain, which allows encrypted assets to flow freely between different blockchains, has become a rigid demand in the multi-chain world.
However, the blockchain world has suffered from cross-chain bridges for a long time. On the one hand, it is because the mainstream cross-chain bridges on the market often use multi-signatures, which requires a high trust assumption.The trust that the multi-signature parties of the cross-chain bridge will not do evil or steal from the inside, while the cross-chain solutions with relatively weak trust assumptions have not been widely adopted due to poor user experience (for example, the state proof bridge will be very slow) or difficulty in implementation. On the other hand, in the dark forest world of blockchain, cross-chain bridges have always been the target of fierce attacks by hackers, and every time a cross-chain bridge has an accident, it will bring huge losses:
In July 2021, the cross-chain asset bridge project ChainSwap was attacked and lost nearly 8 million US dollars in assets;
In January 2022, the Qubit Finance cross-chain bridge was hacked and the loss exceeded 80 million US dollars;
In February 2022, Wormhole was hacked and the loss exceeded 320 million US dollars;
In August 2022, the cross-chain bridge Nomad was hacked and more than 190 million US dollars of crypto assets were stolen.
The Bitcoin layer 1 asset issuance protocol RGB++ comes with the Leap function, which can realize the free transfer of RGB++ assets between L1 (Bitcoin blockchain) and L2 (CKB blockchain or other chains based on UTXO Stack), and this bridgeless cross-chain transfer does not require permission, trust assumptions, is safe and efficient, and is a new paradigm for cross-chain.
This article will introduce the basic principles, advantages, tutorials and precautions of Leap bridgeless cross-chain in plain language.
Leap: Cross-chain without cross-chain bridge
Before introducing Leap bridgeless cross-chain, it is necessary to first introduce the minting principle and ownership transfer of RGB++ assets.
Issuing encrypted assets on the Bitcoin blockchain through the RGB++ protocol is essentially to associate Bitcoin UTXO or write a commitment on the Bitcoin chain. For example, Alice issued 100 Test tokens through the RGB++ protocol. On the Bitcoin blockchain, a UTXO of 546 satoshis was received in the Bitcoin address controlled by Alice. This UTXO is associated with 100 Test tokens. At the same time, a Cell (Cell is essentially a smarter UTXO) was generated on the CKB blockchain. This Cell contains an explanation of the RGB++ assets (i.e. 100 Test tokens) and their unlocking conditions. This Cell will be spent synchronously only when Alice’s UTXO of 546 satoshis is spent.
When Alice transfers 60 Test tokens to Bob, it is shown on the Bitcoin blockchain that Alice spends the UTXO originally associated with 100 Test tokens and receives a new UTXO of 546 satoshis, which is associated with 40 Test tokens, while Bob receives a UTXO associated with 60 Test tokens. On the CKB blockchain, the original Cell is spent and two new Cells are generated, one containing the explanation of 40 Test tokens and the other containing the explanation of 60 Test tokens. Their spending conditions are that they will be spent synchronously only when the corresponding Bitcoin UTXO is spent.
From the above example, we can see that the ownership of RGB++ assets is bound to Bitcoin's UTXO. Whoever can transfer (spend) this UTXO can unlock the corresponding RGB++ assets, because the unlocking condition set by the Cell containing the RGB++ asset explanation is the transfer of UTXO on Bitcoin.
If we construct an RGB++ transaction on the Bitcoin blockchain, and set its unlocking condition not to Bitcoin's UTXO but to UTXO on other chains, this asset will be Leaped to other chains, because the next time this asset is spent, it needs to be unlocked by UTXO on other chains. This is the basic principle of Leap's bridgeless cross-chain. The whole process is completely decentralized, without any cross-chain bridge, no multi-signature address, and no trust assumptions.
Of course, there are some detailed knowledge points when performing Leap operations, such as in order to prevent block reorganization, you need to wait for a few more blocks to confirm to avoid it. For more knowledge about the RGB++ protocol and Leap, please watch Cipher's open class "Overview of BTC Layer 1 Asset Protocol":
https://youtu.be/mgUxYU5tcJM?si=VWWraXbHu3DMAL64&t=3725
Advantages of Leap's Bridgeless Cross-Chain
From the basic principle introduction above, we can see that Leap does not use any cross-chain bridges, nor does it have multi-signature addresses. It is truly permissionless, trustless, secure and efficient cross-chain.
1. Permissionless
Suppose I newly deployed a BRC20 token today, and I go to the project owner or operator of the multi-signature cross-chain bridge, hoping to cross the chain to L2, and there is a high probability that it will be rejected. Multi-signature cross-chain bridges often only support the pledge of a few head assets and the generation of corresponding wrapped assets, and will not support assets with low transaction volume or not well-known. This is because deploying contracts, setting up multi-signatures, monitoring asset changes in multi-signature addresses, generating wrapped assets, etc. require a lot of manpower and material resources.
The Leap bridgeless cross-chain function that comes with the RGB++ protocol does not have this problem and is completely permissionless. If you issue a meme coin on the Bitcoin blockchain through the RGB++ protocol today, you can Leap to the CKB blockchain at any time and then Leap back, free to come and go.
2. No need for trust assumption
In traditional multi-signature cross-chain bridges, users pledge or lock encrypted assets into multi-signature addresses. Users need to trust that the operator of the cross-chain bridge will not do evil, will not steal, and will not run away, because the moment the asset is locked in, it is out of the user's own control.
RGB++ protocol's Leap cross-chain, because it does not use any cross-chain bridge, nor does it use multi-signature addresses, there is no middleman, so naturally there is no need for trust assumptions.
3. Security
Multi-signature cross-chain bridges have always been the target of fierce attacks by hackers, because everyone's assets are locked in a multi-signature address. As long as the attack is successful, a large amount of assets can be stolen from it. This is why every time a cross-chain bridge goes wrong, it will cause huge losses of millions, tens of millions or even hundreds of millions of dollars.
RGB++ protocol's Leap bridgeless cross-chain, assets are crossed point-to-point, and assets are always controlled by the user's own private key, which is much more secure.
4. Efficiency
RGB++ protocol's Leap bridgeless cross-chain, in order to prevent block reorganization, needs to be circumvented by waiting for a few more block confirmations, which usually takes a little more than an hour (depending on the block speed and network congestion, especially the Bitcoin network). For users, since cross-chain is not a very high-frequency operation, although this time is slower than that of a multi-signature cross-chain bridge, it is within an acceptable range, especially considering the advantages of Leap cross-chain being more secure and trustless.
5. Other advantages
RGB++ protocol's Leap bridgeless cross-chain supports not only fungible tokens, but also non-fungible tokens (called DOBs, Click here to read more about Spore DOB).
Tutorial on Leap Bridgeless Cross-Chain
Currently, JoyID wallet has fully supported Leap cross-chain for RGB++ assets (Coins and DOBs) between L1 and L2. The following is a tutorial on how to enter Leap Bridgeless Cross-Chain through JoyID wallet:
1. From L1 to L2 (BTC → CKB)
After logging into JoyID wallet, switch to Bitcoin network, click the "Leap" button, select the Coins or DOBs you want to Leap, select "Bitcoin L2 (CKB)" on the sending interface and enter the CKB address and quantity, select the mining fee, and finally click "Send" and sign to confirm.
2. From L2 to L1 (CKB → BTC)
The Leap from L2 to L1 is divided into two phases: the Preparing phase and the Complete phase, which require signing BTC transactions and CKB transactions respectively.
Preparing stage:
Log in to the JoyID wallet and switch to the Nervos CKB network;
Click the "Leap" button;
Enter the Bitcoin address;
Select the RGB++ asset you want to Leap back to L1 and enter the amount;
Select the FeeRate (make sure you have enough UTXO balance in your Bitcoin wallet to pay the fee);
Click the "Leap To Bitcoin L1" button;
Click the "Prepare" button;
Sign to confirm the transaction;
You can track the transaction status by clicking "Track Status" or in the redirected "Ongoing Leaps" page.
Complete stage:
Wait for the Bitcoin mainnet to confirm the transaction, and click "Complete" after confirmation;
Check the leap information, click "Complete" again and wait for the CKB mainnet to confirm. You can track the status in Settings-Activity-Leap;
After the CKB mainnet confirms, switch to your Bitcoin wallet to view your RGB++ assets.
Notes
Assets issued through the RGB++ protocol are "parasitic" or "bound" to Bitcoin's UTXO, more specifically, to a UTXO of 546 satoshis. If this UTXO is spent, the corresponding RGB++ asset will also be spent.
How to avoid the UTXO bound to RGB++ assets from being spent by users by mistake? JoyID wallet sets a threshold, which is currently 1200 satoshis. UTXOs below this threshold will not be spent as mining fees or ordinary BTC transfers. Of course, different wallets set different thresholds, so in order to avoid being spent by mistake, it is recommended that you use JoyID wallet to store and send and receive RGB++ assets.
In addition, it is not recommended to use some tools made by community members to Leap assets from CKB chain to Bitcoin chain. This is because some tools do not follow the RGB++ standard when binding Bitcoin UTXO - binding to UTXO of 546 satoshis. If they bind assets to UTXO of more than 1200 satoshis, then when users use JoyID wallet to send BTC transactions, the wallet will easily spend this UTXO as mining fees or ordinary UTXO.