A new advent to Modularity: Hemi Network
The programmability of Bitcoin made possible on the Ethereum Virtual Machine.
This article tackles various aspects for a proper comprehension of what Hemi Protocol solves and offers to developers, builders, and consumers. Before this solution can be brought to the limelight, understanding how what modularity currently offers, what makes the Bitcoin network lack the ability to execute smart contracts, and how programmability on Bitcoin is now made possible through the Hemi protocol with other sub-topics will be relevant.
As a beginner, you can decide to start on the subject of modularity. But still, with an intermediate and expert level, you can go for a quicker dive from the sub-topic on the lack of programmability of Bitcoin and its current pre-state.
On the subject of Modularity
Modularity as a concept was first introduced in a research paper when LazyLedger was proposed, and this concept cycles indirectly around the blockchain trilemma. For a while, scalability, decentralization, and security were factors considered, and one served as the opportunity cost to two others.
For some blockchains, scalability can be given off at the expense of having security and decentralization. An example is the Bitcoin Network, while for some chains, scalability is given off at the expense of being well-decentralized and having security. An example is Ethereum.
However, scalability has been overlooked for a long time on a large scale. As one of the most critical factors when it comes to onboarding many persons to the blockchain industry, without scalability - fast transactions and throughput, users can’t get their transactions done.
Sometimes, due to network congestion, slippage would need to be increased. More gas fees will be spent when processing transactions.
Modularity is introduced explicitly to step up the “scalability problems” Before modular-built blockchains, monolithic chains existed, and these chains experienced a problem of transactions being completely carried out. Every blockchain has a layer where specific tasks run, which could be a;
Consensus layer
Execution Layer and;
Data availability layer.
In as much as some chains or protocols are interested in improving any of these layers, the Bitcoin network runs as a monolithic network where all these specific tasks run on one layer hence reducing the scalability effect but with strong security.
Hemi as a protocol initially identifies the redundancies of Ethereum and Bitcoin and decides to intersect both protocols, hence introducing the possibility of DeFi on Bitcoin, making a Bitcoin node run in an Ethereum environment; hence, communication can now be enabled through the node and the Ethereum environment making Hemi reliable for a network with strong security and smart contracts possibilities.
Why is this a win for DeFi through Hemi?
Bitcoin was initially designed to facilitate peer-to-peer transactions in a decentralized manner in such a way that the contracts were designed to be non-turing such that the codes can’t solve complex algorithms. Complex algorithms can be written through smart contracts such that the contract can keep on performing a particular task for an extended period.
So hence, since its codes are non-Turing, building of applications isn’t possible as these applications would require to be written in a Turing code such that it can repeat a specific function a million times with other functions that are going on in the application.
As stated earlier; bitcoin was explicitly built for censorship-resistant peer-to-peer transactions. Despite the rigid code design, implementation can be made for complete protocol changes such that DeFi can be made possible through Bitcoin, which would demand data changes made to nodes.
This was proposed before the SegWit format was introduced and Bitcoin Cash was soft-forked.
The GitHub repo war was made and marked an insight for the fact that there was and still is a set of persons who believe that if DeFi is made possible on Bitcoin, then DeFi can get attention to traditional institutions and adoption can be made at a larger scale. Hence why, concepts such as Ordinals, Runes, Pre-runes, proto-runes, etc.
Looking at Ethereum, with a code and functionality such as smart contracts, other codes built on Ethereum can run complex algorithms and even infinite loops to carry out a task, test DeFi strategies, and many more.
Hemi now serves as an intersection between Bitcoin’s non-turing design but strong security and Ethereum’s programmability.
Understanding Hemi from a more technical view
Hemi a modular layer-2, is designed as a wrapper where a Bitcoin node is built within the Ethereum Virtual machine (EVM) environment to enable the interoperability of both blockchains. In this system, Hemi contains complete security and the ability for hApps to be built on it - making it possible for applications to run smart contracts while leveraging both chains.
For a mental picture, imagine the EVM as an environment where smart contracts with considerable computational abilities run alongside their nodes. Then, a Bitcoin node is connected to all these nodes in the EVM environment. That’s the simplest structure of how Hemi is built, and this combination makes up the Hemi Virtual Machine (Hemi VM).
Now, this gives two solid compartments;
Compartment 1 - Bitcoin Nodes
This compartment comprises four (4) Bitcoin nodes operating within the Ethereum Virtual Machine.
Proof-of-Proof miners.
Bitcoin finality governors.
Bitcoin-secure sequencers.
A modified GETH node
Proof-of-Proof Miners
A typical example of a modular system is Rollups. An example such as Optimism rollups carries out proofs to verify and prove to the base layer that these transactions are valid before state changes are made to the base layer, and hence the computation is made. These proof systems can be fault-tolerant proofs or zero-knowledge proofs.
Hemi adopts this same system. The PoP miners receive the transactions made on Hemi through its consensus level and pass them into the node on the Bitcoin level.
Bitcoin finality governors (BFG)
This is a different form of node that ensures the security of the transactions processed on Hemi.
As stated, the Bitcoin network was initially designed to enable transactions without censorship. In that manner, Bitcoin used a different form of transactional computation, through the format of UTXOs.
One of the sole duties which the BFG node does is the facilitation of PoP Miner communication with the Bitcoin network to retrieve spendable UTXOs and propagate PoP transactions containing Hemi state publication and other functions such as relaying Hemi block headers to PoP Miners.
Bitcoin-Secure Sequencers (BSS)
This is mainly seen as a mid-way communication as it relays information to the protocol’s publishers and, in hindsight, maintains communication between Hemi and Ethereum.
Due to its modular architecture, Hemi uses Ethereum as a layer for settling transactions and data availability. At the same time, Bitcoin is used for execution, hence why there is a presence of the 4 nodes for specific execution processes.
A modified GETH Node
A typical node is a blockchain program installed and set up on hardware that stores data and state changes made to the blockchain aside from all chains storing data and keeping up to the state of their blockchain. GETH Node is an example of the specific and selective nodes which communicate with applications and send our data and responses through RPC endpoints to data.
This Modified GETH node functions such that to relay, respond and share data to the Bitcoin network on the Ethereum network such that these GETH nodes are modified private networks on the Ethereum network to receive and relay data to the Bitcoin network on Hemi.
Compartment 2: Publishers, challengers and Ethereum Virtual Machine.
Publishers
The publishers serve as actors in the Hemi network, where their work is mainly for relaying transactions done on the consensus layer to Ethereum, which acts as the data availability layer. The transactions passed on to the publishers are packaged by the BSS nodes. Then, verification for execution must have already happened on the Bitcoin network through the proof-of-proof mechanism using a proof mechanism.
Challengers
These actors double verify through a fault-proof mechanism that a transaction is correct and cancel factors such as double spending, which introduces double spending to ensure that it’s worth being recorded on the blockchain.
On a larger scale, to view onboarding and the possibility of users adopting Hemi Protocol as a chain, Hemi integrates a double-way smart contract, The Tunnel.
This tunnel acts as a smart contract for moving assets between the Ethereum and the Bitcoin networks. Still, it is done through an overcollateralized vault of assets with low value and another with high value. This overcollateralized multi-sig protects the total value of all multi-sig placed in the vault from losing its value.
A new wave of developers
Believing programmability on Bitcoin is one thing; seeing programmability on Bitcoin is another. Hemi Network, which encapsulates Bitcoin’s security with Ethereum, builds its virtual machine on which hApps can be constructed and communicated.
These applications leverage the finality of Bitcoin with its security and, at the same time, can run smart contracts on their applications, bringing the usual possibilities of DeFi to Bitcoin without proposal to state changes.
This also advances from mere building applications to infrastructure such as tunnels, which helps easily flow assets between Bitcoin and Ethereum chains.
The Hemi Bitcoin Kit also serves as a tool for direct connection between Bitcoin data and the Ethereum environment such that when data is indexed on Bitcoin irrespective of the kind of data, transactional or arbitrary data, Ethereum, which acts as the data availability layer, can coherently access these data through smart contracts.
Super use-cases of Hemi
Trustless Bitcoin Lending Markets: Hemi enables lending and borrowing of Bitcoin without relying on centralized services. This is done using smart contracts that manage Bitcoin directly, allowing users to trust the system instead of a third party. You can lend your Bitcoin to someone and earn interest without worrying about an intermediary running away with your money.
Trading Bitcoin, Ordinals, and Ethereum Assets: Hemi allows users to trade Bitcoin-based assets (like BTC, Ordinals, and BRC-20 tokens) and Ethereum assets in a single marketplace. This is possible due to Hemi’s ability to understand and interact with both blockchains while you can trade Bitcoin for an Ethereum token on the same platform easily instead of using multiple services.
Bitcoin-Based Financial Products: Hemi makes it possible to create advanced financial tools like Bitcoin options, futures, or other products where payments are handled in Ethereum or Hemi tokens, but settlement happens in native Bitcoin.
Conclusion
The Hemi Network connects Bitcoin and Ethereum seamlessly, unlocking new possibilities for decentralized finance (DeFi) with Bitcoin.
Combining Bitcoin’s strong security with Ethereum’s programmability, Hemi allows trustless lending, advanced trading, and innovative financial tools. It bridges the gap between the two most prominent blockchains, creating a robust and secure system for users and developers.
Most importantly during the period where different token standards are made available on Bitcoin, like the meta-protocols, Runes, Pre-runes, Segwit and Taproot, Hemi provides a platform for these assets to be convertible and used in its ecosystem, hence lowering a barrier for interoperability of these Bitcoin assets.
Other References: