paint-brush
How CKB's Public Blockchain Tech Accelerates Bitcoin's Orthodox Layer 2 by@ckb
5,322 reads
5,322 reads

How CKB's Public Blockchain Tech Accelerates Bitcoin's Orthodox Layer 2

by Nervos CKB5mMay 15th, 2024
Read on Terminal Reader

Too Long; Didn't Read

This article breaks down the intricate technology of the CKB public blockchain, showcasing how it amplifies speed and capabilities for Bitcoin's Layer 2 solutions. From the UTXO model to open transaction formats, discover the transformative potential of Nervos Network's contributions to blockchain innovation.
featured image - How CKB's Public Blockchain Tech Accelerates Bitcoin's Orthodox Layer 2
Nervos CKB HackerNoon profile picture
0-item
1-item
2-item


When I first heard about Nervos Network's dedication to building a BTC Layer 2, I wasn't surprised. That's because the CKB public blockchain technology not only matches but also goes beyond BTC. It not only maintains BTC's native UTXO features but also allows for more complex programmable extensions. While surpassing BTC may seem challenging for CKB public chain, aiming to be a top-notch BTC Layer 2 seems like a smart choice. Why? Let's delve into my take on CKB.


The current BTC Layer 2 market is constrained by the mainnet’s limited validation capabilities, resulting in diverse alternative solutions. The simplicity of BTC's scripting language, combined with its near-zero computation and validation power, has created significant opportunities for market innovation.


As of now, aside from limited transaction validation and multisig functionalities within UTXO unlocking conditions, the BTC mainnet is incapable of directly handling more complex transaction logic involving data validation, state changes, etc. It relegates BTC to an asset settlement layer, relying on extending through a powerful public chain for local consensus and computational validation capabilities.


This leads to a lack of uniform standards or 'orthodoxy' for BTC Layer 2 solutions, making it challenging to rank them.


However, distinctions can be made based on the community's perception between narrow and broad interpretations:


Narrowly defined, only solutions like the Lightning Network state channels and the one-time seal approach of RGB qualify as truly 'orthodox' BTC Layer 2s. They effectively utilize BTC's limited script validation capacity without relying on or minimally depending on external local consensus.


In a more general sense, any extension chain that gains acceptance for its local consensus, along with a cross-chain bridge solution that ensures the safe migration of assets, can theoretically serve as a BTC Layer 2. This includes contemporary Ethereum EVM chains, Solana with its high-concurrency capabilities, and others.


Clearly, the BTC Layer 2 market is divided: on one end are highly-specific solutions like the slowly evolving Lightning Network and RGB, facing substantial challenges; on the other end are broadly defined solutions, where any performance chain capable of securely interacting with the BTC mainnet qualifies as a BTC Layer 2.


But is there a 'middle-of-the-road' option? Yes, and it lies in the Nervos Network, which adheres to the UTXO model at its core, enhancing its performance. Notable features include:


The CKB Network aligns closely with BTC, sharing the same 'UTXO model and mining consensus mechanism,' unlike the account balance model of mainstream public blockchains like Ethereum. The UTXO model has distinct advantages in transaction privacy, flexible transaction structuring, and parallel processing capabilities to prevent double-spending, which may be one of Satoshi Nakamoto’s most brilliant inventions. This is why post-Ethereum projects like Sui and Aptos have also adopted similar UTXO models. Bitcoin's capacity and block speed may be constrained by its era, but the UTXO model is remarkably forward-thinking. CKB adopts this UTXO model, evolving it into the 'Cell model', which preserves the pure transactional nature of Bitcoin’s UTXO model while also supporting the data states found in account models like Ethereum’s.


To simplify: In the Bitcoin UTXO model, the creation and destruction of coins resemble a continuous minting and melting process. The Cell model, however, omits the destruction aspect, focusing on verifying and persistently storing states. Each Cell includes Capacity and Data: Capacity measures the balance in bytes, similar to UTXO, while Data holds any kind of information, including the history of transaction states. Thus, the Cell model can accurately represent balances and manage asset transfers, and also handle a variety of complex smart contract states.


In summary, the Cell model is a more persistent and flexible transaction model that greatly broadens the scope of the UTXO model. It is crucial for CKB’s ability to maintain the security of the BTC mainnet while offering a 'speed boost' to slower Bitcoin expansion initiatives like the Lightning Network and RGB.


For instance, the recent rollout of RGB++ by CKB illustrates this. In the BTC ecosystem, developing a mature RGB solution involves challenges that are not so much about the one-time sealing process of the BTC mainnet, but rather the communication, coordination, and mutual state maintenance among off-chain client validation nodes, particularly in a decentralized setting. In simpler terms, RGB's theory might seem straightforward, but its practical implementation is hindered by foundational infrastructural limitations and various barriers. Recognizing this, CKB integrates these off-chain client validation nodes into its on-chain public validation process. This approach significantly accelerates the intended UTXO client extension pathway that RGB aims to achieve. Complex P2P consensus among off-chain nodes is notoriously challenging, fraught with complexity and obstacles such as potential data synchronization delays or inconsistencies, and susceptibility to fraud and attacks. Transposing this process onto the blockchain can simplify these issues.


With the increasing discussions around RGB++, let’s also look at CKB's Open Transaction data format, showcasing the chain's forward-thinking features. Open Transaction allows multiple participants to collaboratively build and aggregate different transactions over time. It supports partial construction, amendability, and incremental build-up and aggregation. For example, Alice initiates an Open Transaction to exchange a certain amount of Token A for Token B with Bob. The transaction, once started, remains in an editable state. Bob, upon agreeing to the transaction terms, can then add his Token B and finalize the conditions.


It might initially seem abstract. Take cross-chain scenarios as an example: Alice and Bob could independently execute asset trades on various distinct chains, significantly boosting the CKB chain's cross-chain interaction capabilities. In the realm of complex DeFi transactions, where market-driven dynamic adjustments are often necessary, Open Transaction allows contract participants to adapt trading conditions fluidly during the contract's execution. This undoubtedly enhances the ability to manage transactional complexities.

From my perspective, Open Transaction mirrors the UTXO transaction unlocking conditions, capable of amalgamating intricate unlocking conditions, multi-party signatures, and complex transactional environments. This represents an evolutionary and valuable innovation that builds on the foundational principles of the BTC main chain.


Interestingly, Jan Xie, a core developer from the Ethereum team, chose to embrace the BTC UTXO model for his inaugural major project. Despite the broader application of Ethereum's smart contract model, Jan and his Nervos team decisively chose to expand and refine the BTC UTXO model. This choice reflects a deep respect for Satoshi Nakamoto’s simplistic UTXO transaction model and also subtly lays the groundwork for its transformation into a native BTC Layer 2.


In conclusion, I am quite bullish about CKB’s potential as a BTC Layer 2. In the short term, it certainly has the potential to expedite the implementation of projects like the Lightning Network and RGB within UTXO-based chains, offering valuable insights for these 'orthodox' expansion solutions on the BTC mainnet. Looking long-term, the inherent features of CKB's chain and its innovative architectural compatibility may enable it to excel in the complex and standardless arena of BTC Layer 2s.


Note: There’s much more to explore regarding the technical nuances and standout features of CKB, which I plan to analyze in greater depth later. It's fascinating to see how BTC Layer 2 not only provides a platform for new chains to rise but also opens up endless possibilities for rejuvenation within established chains.


Author: Haotian, Independent Researcher

This article is the translation of a Haotian’s tweet.