Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
The Hemi Network is a modular Layer-2 protocol for superior scaling, security, and interoperability, powered by Bitcoin and Ethereum.
Whereas other projects approach Bitcoin and Ethereum as ecosystem silos, Hemi views them as components of a single supernetwork. This unlocks new levels of programmability, portability, and potential.
At Hemi's core: the Hemi Virtual Machine (hVM), which incorporates a full Bitcoin node within an Ethereum Virtual Machine.
Combined with the Hemi Bitcoin Kit (hBK), developers have a familiar yet powerful platform for creating Hemi decentralized applications (hApps).
The Hemi Network represents a different way of thinking about Layer-2 scaling, by approaching Bitcoin and Ethereum as components of a supernetwork.
This modular protocol aims to scale these networks and maximize their utility, creating a more connected and efficient blockchain ecosystem.
Through features such as the hVM, Hemi equips developers with robust tools for building next-generation dApps with Bitcoin and Ethereum interoperability.
Ease of Development
The Hemi Virtual Machine (hVM) integrates a full Bitcoin node within an Ethereum Virtual Machine (EVM), providing developers with a familiar programming interface while harnessing the power of both Bitcoin and Ethereum.
Bitcoin Programmability
Building with the Hemi Bitcoin Kit (hBK) provides smart contracts with highly granular indexed views of Bitcoin state, unlocking Bitcoin DeFi applications were previously impractical or impossible to execute via an EVM.
Bitcoin Superfinality
Hemi's Proof-of-Proof (PoP) consensus mechanism ensures transactions surpass Bitcoin's level of security in just a few hours.
Trustless Cross-chain Portability
The hVM's unique awareness of Bitcoin's and Ethereum's states enables secure, seamless asset transfers between Hemi and other chains through its "Tunnels" feature.
Extensibility
Hemi allows external projects to create their own chains secured by Hemi's technology, facilitating Bitcoin-Security-as-a-Service and enhancing dual-chain interoperability.
Superior Asset Handling
Advanced on-chain functionalities, including routing, time-lock, and password protection, are made possible through Hemi, elevating asset management and security.
The Hemi Network champions decentralized roles, leverages Bitcoin's security, promotes open participation, fault tolerance, and fee efficiency to enhance Layer 2 solutions.
In contrast to other Layer 2 (L2) rollup solutions, the Hemi Network introduces a more decentralized approach to data publication and validation, addressing critical issues present in current L2 setups:
✅ Decentralized Roles: Introduces a decentralized approach with Publishers handling key roles asynchronously, mitigating the risks associated with centralized control found in other L2 networks.
✅ Incentivized Participation: Allows open participation through staking tokens with Ethereum-side validation contracts, fostering consistent and incentivized data sharing even during times of increased fee activity.
✅ Fault Tolerance and Reward System: Implements a system to discourage malicious behavior, slashing stakes of Publishers submitting invalid data while rewarding Challengers who identify faults, thereby promoting network integrity.
✅ Efficient Ethereum Fee Management: Manages rewards via Ethereum-side validation contracts, ensuring consistent incentives for Publishers despite Ethereum fee fluctuations.
Incorporates Bitcoin's security to prevent attacks, with PoP Miners embedding consensus data on the Bitcoin blockchain.
Rewards PoP Miners in native tokens for strengthening consensus.
Utilizes Bitcoin confirmations to ensure network integrity, achieving "Bitcoin Finality" for robust defense against reorganizations.
Overview
The Hemi Network's sequencer consensus combines Proof-of-Stake with Proof-of-Proof to address weak subjectivity and censorship attacks inherent in traditional PoS systems.
This hybrid model prevents forged chains through state proofs on the Bitcoin network and allows legitimate sequencers to regain control in adversarial conditions, ensuring the network's resilience and security.
To inherit Bitcoin security, a new type of miner (a “PoP Miner”) publishes Hemi consensus information to the Bitcoin blockchain.
After a state publication to Bitcoin, the Hemi Network’s consensus layer incorporates cryptographic proofs of these publications, with PoP Miners receiving a reward in the protocol’s native token. The network uses these proofs during fork resolution to prevent reorganizations with the full force of Bitcoin’s security.
As they are produced, the Hemi Network’s chain segments initially receive Bitcoin confirmations, which means an attacker would have to control increasingly large ratios of staking power to successfully affect a reorganization.
During normal operation, each block on the Hemi Network reaches full “Bitcoin Finality” after 90 minutes, or nine Bitcoin blocks, on average.
At this point, it is mathematically impossible for anyone to reorganize the network without 51% attacking Bitcoin itself.
🚗 Rollups optimize Ethereum's performance by gathering transactions "off the main Ethereum highway" (Layer 1) and then officially process them on a "side road" (Layer 2).
Ethereum Rollups are a Layer-2 scaling solution designed to enhance the throughput and features of the Ethereum network.
They operate by "rolling up," or bundling, multiple transactions off-chain and submitting them in batches to the Ethereum mainnet for data availability. By doing so, they significantly reduce congestion and gas fees while maintaining interoperability with Ethereum.
Rollups can also add new protocol features that would be impossible directly on Ethereum (e.g., PoP security to inherit Bitcoin Finality and Hemi's hVM Bitcoin Interoperability system).
The Hemi Network operates four kinds of specialized nodes: Bitcoin finality governors, Bitcoin-secure sequencers, Proof-of-Proof miners, and a modified Geth node.
The network’s nodes maintain its EVM and ensure decentralized operability across Bitcoin, Ethereum, and other EVM-compatible chains.
The Hemi Network connects to both the Bitcoin and Ethereum networks, allowing asset portability across both, enabling a third-party cross-chain ecosystem. To create this highly secure multichain ecosystem, the Hemi Network operates several kinds of decentralized nodes: Bitcoin finality governors, Bitcoin-secure sequencers, Proof-of-Proof miners, and a modified Geth node.
Regulate the network's security status by analyzing Bitcoin blocks for Hemi Network state proofs.
Determine the network's finality status, ensuring security.
Coordinate with Bitcoin-secure sequencers and proof-of-proof miners.
Integrate Hemi Network transactions with Ethereum mainnet transactions.
Maintain the network's consensus layer and manage staking, unstaking, and slashing operations.
Ensure a seamless connection between the Hemi Network and Ethereum for asset transfers.
Operates as a customized Ethereum node, providing compatibility and connectivity between the Hemi Network and Ethereum.
Ensures data synchronization and transaction processing within the Hemi Network ecosystem.
Secure the network by embedding state proofs into the Bitcoin blockchain.
Hash network headers to create cryptographic proofs and publish these to Bitcoin.
Receive tokens as rewards for their contributions.
Challengers
Monitor the Hemi Network for data accuracy and completeness.
Initiate challenge-response processes for discrepancies, ensuring integrity.
Receive a portion of the penalized stake for successful challenges.
This innovative approach ensures secure, decentralized interoperability among Bitcoin, Ethereum, the Hemi Network, and other EVM-compatible chains.
This guide provides an overview of the essential steps and resources to get you started with building on Hemi. Whether you’re new to blockchain development or an experienced web3 developer, this guide will help you navigate Hemi’s ecosystem and leverage its full potential.
Begin by familiarizing yourself with the Hemi network’s architecture, key features, and its unique approach to interoperability and scalability.
Prepare your development environment to start building on Hemi by setting up the necessary tools and configurations. This step ensures you have everything in place to interact with the Hemi network effectively.
Dive into the Hemi ecosystem by exploring and interacting with decentralized applications (dApps) built on the network. This hands-on approach helps you understand Hemi’s functionality and how dApps operate within the blockchain environment.
Start developing your own decentralized applications (dApps) on Hemi using its powerful suite of developer tools and resources. This section will guide you through the process of creating, testing, and deploying your projects on the Hemi network.
Congratulations on getting started with Hemi! 🎉
Now that you’ve set up your environment, explored various apps, and begun building on the network, here are the next steps to deepen your engagement and maximize the potential of your development journey on Hemi.
If you encounter any issues or need assistance at any step, the following resources are available to help:
Welcome to the technical documentation for Hemi, a Layer-2 solution for Bitcoin and Ethereum blockchains that offers true scalability and interoperability.
Our documentation is organized into the following sections to help you find relevant information quickly:
⚡ Quickstart: Whether you plan to develop, explore, or mine on Hemi, we have identified some crucial resources to quickstart your journey.
⚡ Foundational Topics: Learn about the architecture, sequencer consensus, PoP consensus & Bitcoin finality, tunneling, and more.
⚡ How-To Tutorials: Whether you are using or developing on Hemi, these basics will get you started! Set up your MetaMask Wallet, tunnel ETH and BTC to Hemi, start with Remix IDE, deploy an ERC-20 token and run a PoP miner.
⚡ Tooling: Understand and access the tools required to build on Hemi.
⚡Incentives: Check out our points, grants, retroactive funding, and one-off spends.
⚡ Additional Resources: Partners inquiry, FAQ, official links, and our brand kit.
⚡ Send Feedback: We'd love to hear from you, good or bad! Found a bug? Got a hackathon coming up? Slide into our DMs.
Whether you're a developer, miner, or explorer, we've got a path for you!
This guide provides an overview of the essential steps and resources to get you started navigating Hemi’s ecosystem and leveraging its full potential.
Begin by familiarizing yourself with the Hemi network’s architecture, key features, and its unique approach to interoperability and scalability.
Prepare your various wallets to start exploring Hemi by setting up an EVM and BTC wallet. This step ensures you have everything in place to interact with the Hemi network effectively.
Dive into the Hemi ecosystem by exploring and interacting with decentralized applications (dApps) built on the network. This hands-on approach helps you understand Hemi’s functionality and how dApps operate within the blockchain environment.
Congratulations on getting started with Hemi! 🎉
Now that you’ve set up your environment, explored various apps, and begun building on the network, here are the next steps to deepen your engagement and maximize the potential of your journey on Hemi.
If you encounter any issues or need assistance at any step, the following resources are available to help:
Optimistic Rollups: Faster, presumed valid until proven otherwise; has delays, user fraud detection, relies on centralization.
Zero-knowledge Rollups: Prior validation is needed, enhanced privacy; complex vulnerabilities, trusted setup, reliance on centralization.
Centralized Influence: Centralized proposers could disrupt decentralized frameworks.
Verifiers and Challenges: Vulnerabilities demand verifiers, lack of incentives leads to centralization.
Denial-of-Service Risks: Centralized "batchers" in L2 networks risk refusing to publish transactions back to Ethereum, potentially causing service denial.
Within frameworks aiming for decentralized sequencing, the presence of a centralized proposer could wield significant influence, potentially disrupting their intended decentralized nature.
Such control might result in the withholding of valid state rollups from Ethereum, leading to coercion of decentralized sequencers into potential censorship or halting communication of specific chain segments back to Ethereum for settlement.
Vulnerabilities in optimistic rollup networks pose risks of asset theft through forged L2 states. To address this, rollups introduce verifiers, but the lack of proper incentives for this role presents challenges.
These lack of incentives can lead to difficulties such as:
🔒 Securing a sufficient number of verifiers to perform the complex and expensive verification process required.
👥 Relying heavily on users or nodes funded by development teams resulting in centralization.
📣 Potential bias or influence.
🌎 Sustainability and scalability issues.
L2 networks' reliance on centralized "batchers" can expose them to denial-of-service risks if batchers refuse to publish transactions back to Ethereum for data availability.
What is the ?
and connect to Hemi Network.
, including Ethereum, to Hemi.
Discover the and .
View our , join our , and !
Learn about Hemi's .
What are Hemi ?
How does secure Hemi?
What is the ?
Which does Hemi currently support?
Read the .
and
.
Join our and collaborate with the community.
Visit and see how we interact with Hemi Network endpoints.
Start PoP mining using the .
to Hemi.
to Hemi.
Mint an OnlyMeID via on Hemi.
Explore the via our
.
.
Learn about developing with .
Discover the and .
.
Learn about and our rewards .
with Hemi assets.
on Hemi.
to Hemi!
Follow us on .
This documentation is designed to guide builders and enthusiasts in understanding and utilizing the . The hVM is Hemi's modular protocol that provides developers with a familiar programming interface.
Explorer:
Explorer documentation:
Explorer:
Explorer documentation:
and connect to Hemi Network.
, including Ethereum, to Hemi.
Discover the .
View our , join our , and !
What are Hemi ?
How does secure Hemi?
What is the ?
Which does Hemi currently support?
and
.
Join our and collaborate with the community.
Visit and see how we interact with Hemi Network endpoints.
Start PoP mining using the .
to Hemi.
to Hemi.
Mint an OnlyMeID via on Hemi.
Explore the via our
Learn about and our rewards .
with Hemi assets.
on Hemi.
to Hemi!
Follow us on .
Optimistic Rollups
✅ Pros:
Allow faster transaction processing on Layer 2
Presume transactions are valid unless disputed within a specific period.
Reduce congestion on the main chain (L1)
❌ Cons:
Introduce finalization delays due to the challenge period for dispute resolution
Place the responsibility of fraud detection on users
Rely on centralized sequencers and proposers, causing hidden transaction queues (mempools) and centralized chain state communication
Zero-knowledge Rollups
✅ Pros:
Validate transactions before confirming them on the main chain (L1)
Potentially enable privacy features by leveraging zk proofs (although current implementations like ZKsync do not currently incorporate significant privacy features)
Reduce congestion on the main chain (L1).
❌ Cons:
Introduce potential vulnerabilities due to complex cryptographic systems
Often require a trusted setup for implementation.
Rely on centralized sequencers and proposers, causing hidden transaction queues (mempools) and centralized chain state communication
The Hemi Network utilizes Proof-of-Proof (PoP) to leverage Bitcoin's renowned security.
PoP Miners enhance security by publishing Hemi's network data on Bitcoin's blockchain.
Bitcoin confirmations further bolster Hemi's defenses, ensuring a robust and secure network.
Hemi's network capitalizes on Bitcoin's formidable security through a mechanism known as Proof-of-Proof (PoP). This approach allows Hemi to inherit the solid Proof-of-Work (PoW) security of Bitcoin.
To achieve this, Hemi deploys specialized miners, referred to as PoP Miners. These miners are responsible for:
Gathering crucial network details and publishing them on Bitcoin's blockchain, thereby linking Hemi's security directly to Bitcoin's proven system.
Employing sophisticated algorithms to generate proofs that are vital for the network's security.
Ensuring Hemi's network integrity by leveraging Bitcoin's security, providing a dual layer of protection.
This integration with the Bitcoin blockchain affords Hemi an additional security layer, utilizing Bitcoin's PoW system as a basis for resolving disputes and ensuring trustworthiness.
New segments in the Hemi chain receive confirmations from Bitcoin, significantly raising the barrier for potential attacks. These confirmations:
Serve as "security bricks," each one strengthening the network's defenses.
Ensure that any attempt to compromise the network requires substantial power, making unnoticed attacks virtually impossible.
As Bitcoin confirmations accumulate, the Hemi Network's "security wall" becomes increasingly formidable, creating an effective deterrent against malicious actors.
The Proof-of-Proof (PoP) consensus mechanism uniquely positions the Hemi Network by:
Allowing Bitcoin miners to secure Hemi indirectly, without direct involvement in Hemi's consensus processes.
Facilitating scalable transaction throughput in the Hemi ecosystem without expanding its Bitcoin footprint significantly.
Setting a high barrier for network reorganizations, as disrupting Hemi would necessitate a highly improbable 51% attack on Bitcoin itself, a task too daunting even for nation-states.
This approach not only extends Bitcoin's security to the Hemi Network but also introduces a scalable, robust framework for transaction processing and network integrity.
Gas Token/Currency Symbol
ETH
ChainID
43111
RPC API endpoint
Explorer
Gas Token/Currency Symbol
ETH
ChainID
743111
RPC API endpoint
Explorer
The Proof-of-Proof (PoP) consensus protocol utilized by Hemi enables PoP miners to independently publish data to the Bitcoin blockchain, cutting off this attack vector.
Bitcoin miners must choose to participate by running nodes for the sidechain, which can curtail decentralization.
This makes the sidechain more susceptible to attack, as Bitcoin miners can collude to attack the sidechain at no cost while reaping Bitcoin block rewards.
Merged mining can introduce new security problems and issues with incentives.
Hemi uses a consensus protocol called Proof-of-Proof (PoP), which allows Hemi to exceed Bitcoin's security at scale.
Bitcoin miners don’t need to participate in Hemi directly; they confirm blocks that include Hemi transactions and collect transaction fees for doing so.
Users who do want to earn rewards in Hemi’s native token can run a super-lightweight PoP miner to publish Hemi consensus data to Bitcoin.
Each new Hemi block receives a Bitcoin confirmation, making reorganization increasingly unlikely until the block reaches finality.
Thus, in the Proof-of-Proof protocol, unlike with merged mining, Bitcoin miners needn’t be active to benefit; they can’t collude to attack the chain, and superfinality comes fast.
allows Bitcoin miners to simultaneously mine a Bitcoin sidechain, which can limit decentralization and lead to an attack on the sidechain.
👉
Bitcoin requires about 60 minutes to reach finality; Hemi takes nine Bitcoin blocks (about 90 minutes) to reach finality and achieves (WIP) in just two hours.
Standard Proof-of-Stake (PoS) systems like Ethereum face two primary risks:
Weak Subjectivity, where attackers could potentially gain majority control by accumulating old PoS keys, enabling them to create alternative chains; and
Censorship, where a current majority stakeholder blocks or ignores transactions, akin to a traditional 51% attack.
This risk involves an attacker accumulating enough keys of old PoS miners to gain majority control at some point in the past. With this control, they could create a valid, alternative/competing version of the blockchain which would appear equally valid to a bootstrapping node attempting to sync the network for the first time, and could also be used to create seemingly valid zero-knowledge proofs of chain state that differs from the legitimate canonical chain.
While Ethereum relies on community consensus to avoid long-range reorganizations of its chain, its PoS protocol doesn’t technically prevent this type of attack.
An attacker with current majority stake could potentially block or ignore certain transactions, exercising a form of majority control that undermines the network's decentralization and fairness.
Since PoS operates entirely within its network, it lacks protocol-level defenses against the types of attacks mentioned above.
Among the vulnerabilities, the limitations are:
No External Correction Mechanism: If internal rules fail or are exploited, there's no external system to protect or correct the network.
Self-Contained Security: PoS systems handle all their security internally within the blockchain network.
By using PoP, Hemi prevents against weak subjectivity attacks because the illegitimate chain an attacker produces when attempting a long-range reorg could not be appropriately published to Bitcoin. Hemi's fork resolution algorithm prevents a reorg from occurring if the new proposed fork does not have PoP publications that are in-step with or before the current chain's publications. As a result, Hemi's consensus algorithm has strong subjectivity and reorganizing a segment of Hemi's chain which has reached Bitcoin finality would require the attacker to 51% attack Hemi and Bitcoin simultaneously.
As a dual-chain L2, Hemi can also provide robust censorship resistance against attacks from majority block-consensus power actors. Any valid Hemi transaction can be published to either Bitcoin or Ethereum, and Hemi's block derivation protocol will force the inclusion of these transactions in Hemi blocks.
Bridging i.e. Tunneling allows the transfer of assets between disparate blockchains (such as between distinct L1s or between an L1 and an L2).
While bridging addresses the siloed nature common to most blockchains, it typically suffers from centralization because most blockchains do not maintain state awareness of other networks.
Hemi Network enables sophisticated asset transfer and decentralization by maintaining protocol-level state awareness of both Bitcoin and Ethereum.
Blockchain networks typically operate as independent systems with no knowledge of other networks, creating a siloed environment. This isolation makes it impossible to transfer assets directly from one chain to another.
Bridges are developed to address this issue, enabling asset transfers between different blockchains. They function by accepting a token from one blockchain (chain A) and issuing a corresponding placeholder or wrapped token on another blockchain (chain B). This wrapped token represents the original token and can be redeemed for it.
To illustrate, consider the process of transferring bitcoin to Ethereum. A user sends bitcoin to a bridge connecting to the Ethereum network. This bridge then issues a wrapped Ethereum token representing the bitcoin.
The user can utilize this wrapped bitcoin within the Ethereum network or return it to the bridge to reclaim the original bitcoin on the Bitcoin network.
Bridges are not limited to transferring assets between distinct blockchains. They can also facilitate transfers between different network layers, like connecting a Layer 1 (L1) blockchain like Ethereum to a Layer 2 (L2) rollup chain. This connection allows assets to benefit from the L2's lower fees and other features.
However, bridges often rely on centralized infrastructure due to the lack of protocol-level awareness between the connected chains. For example, while an L2 might maintain the state of its corresponding L1, the L1 lacks inherent knowledge of the L2. This disconnect necessitates a centralized third party to maintain awareness of both chains.
The security model behind Hemi’s Ethereum Tunnels leverages the strengths of both Ethereum and Bitcoin. By integrating Bitcoin finality, Hemi ensures that cross-chain transactions achieve a level of finality backed by Bitcoin’s Proof-of-Work consensus, widely considered the most secure consensus mechanism in blockchain technology.
This significantly reduces the time it takes to finalize cross-chain transactions and provides strong protection against censorship or fraud attempts during the tunneling process.
The decentralized Challenger role also strengthens Hemi’s security. Rather than relying on a centralized entity to raise disputes, any participant in the Hemi ecosystem can act as a Challenger, further decentralizing the network and increasing its resistance to fraud.
This approach contrasts with centralized bridges, which can be vulnerable to manipulation or collusion by a single entity overseeing the dispute process.
The phased approach to Hemi’s Ethereum and Bitcoin Tunnels aims to progressively enhance the security, decentralization, and asset support for cross-chain transfers. Each phase introduces key improvements to the settlement mechanisms and expands the range of assets that can be tunneled across Ethereum, Bitcoin, and Hemi, all while focusing on increasing trust minimization and reducing reliance on centralized actors.
Introducing Tunnels for Decentralized Asset Transfers
To promote greater decentralization and address the limitations of bridges, the Hemi Network introduces tunnels.
Tunnels allow for sophisticated, noncustodial bidirectional asset transfers between networks, such as Bitcoin and Ethereum. Unlike traditional bridges, tunnels within the Hemi Network maintain state awareness of both networks at the protocol level.
This enables a variety of custodianship approaches, both centralized and decentralized. For instance, BRC-20 tokens can be tunneled from Bitcoin to the Hemi Network or Ethereum, facilitating trading on Ethereum-based decentralized exchanges (DEXes). Additionally, tunnels benefit from the security features of the Hemi Network’s Bitcoin-based superfinality
Ethereum Tunnels:
Optimistic (fault-dispute) model, where disputes are raised within a dispute window.
ETH-based assets tunneled between Ethereum and Hemi.
Bitcoin Tunnels:
Over-collateralized multisig/threshold signatures, providing moderate decentralization.
BTC itself tunneled to and from Hemi.
Ethereum Tunnels:
ZK proof-based settlement with an optimistic fallback if the ZK system fails.
ETH-based assets plus support for Hemi-native assets, including BTC-based assets, tunneled to Ethereum.
Bitcoin Tunnels:
Introduction of BitVM2+hVM, a decentralized 1-of-N trust system for enhanced security.
BTC itself, with groundwork for supporting fungible BTC assets (BRC-20s, Runes).
Ethereum Tunnels:
Redundant ZK proof system (2-of-3), providing higher security with multiple ZK proofs.
Full support for Hemi-native assets, including BTC-based fungible and non-fungible assets (Ordinals) tunneled to Ethereum.
Bitcoin Tunnels:
A mature BitVM2+hVM model for trust minimization.
Full support for fungible BTC assets (BRC-20s, Runes) and non-fungible assets (Ordinals).
Hemi’s Ethereum Tunnels facilitate secure and efficient asset transfers between Ethereum and the Hemi network.
While similar to other “lock-and-mint” cross-chain mechanisms, Hemi’s Tunnels are distinguished by their integration with Bitcoin’s Proof-of-Work finality model and decentralized dispute mechanisms, offering faster settlement times and enhanced security.
By integrating these features, Hemi’s Ethereum Tunnels offer a more efficient and secure mechanism for cross-chain asset transfers, benefiting from both Ethereum’s smart contract capabilities and Bitcoin’s unrivaled security.
The Ethereum Tunnel process involves locking assets on one network while minting corresponding representative tokens on the other network. For Ethereum-native assets, tokens are minted on Hemi once the assets are locked in a Hemi validation contract on Ethereum.
This allows seamless asset transfers across chains, enabling users to leverage the strengths of both networks while minimizing the friction of cross-chain operations.
The process begins with the user initiating a deposit transaction on Ethereum. This deposit locks up Ethereum-native tokens in a Hemi validation contract on Ethereum. The validation contract plays a critical role by securing the assets and ensuring they remain locked throughout the tunneling process.
Once the deposit is secured in an Ethereum block, Hemi’s block derivation protocol kicks in. The Sequencer, responsible for ordering and generating Hemi blocks, is required to include the deposit in the first Hemi block derived from the Ethereum block that contains the deposit transaction. This ensures that the deposit is acknowledged in Hemi’s L2 environment almost immediately after its validation on Ethereum.
After the deposit is included, Hemi mints a representative token on the Hemi Network, which serves as the equivalent of the locked asset on Ethereum. This token can now be freely used within the Hemi ecosystem, allowing users to engage with dApps or perform any transaction that requires the asset. You should receive your deposit within 0-2 minutes.
To return the assets back to Ethereum, the user submits a withdrawal transaction on Hemi. When the withdrawal request is submitted, the representative tokens on Hemi are burned, which signals the user’s intent to withdraw their corresponding Ethereum-native assets.
Hemi’s state transition system updates its rollup state root, which is then submitted to Ethereum by a Publisher. The state root acts as a cryptographic proof of the transactions that occurred on Hemi, including the user’s withdrawal request.
The key to finalizing the withdrawal lies in Hemi’s use of Bitcoin finality, which is a significant differentiator from other optimistic rollup bridges. (In traditional optimistic rollups, the finality of cross-chain transactions is delayed by a dispute window, during which fraud proofs can be raised. Hemi accelerates this process by leveraging Bitcoin’s highly secure Proof-of-Work consensus mechanism to finalize the state root on Ethereum.) This process takes roughly 40 minutes.
Once Bitcoin finality is achieved, and assuming no disputes are raised through the decentralized Challenger role, the state root is confirmed, and the user can submit a withdrawal proof on Ethereum to claim their assets from the Hemi validation contract. A proof may take up to 24 hours.
The withdrawal proof ensures that the burned representative tokens on Hemi correspond to the original locked Ethereum-native tokens. Upon successful validation of the proof, the Ethereum-native assets are unlocked, completing the cross-chain asset transfer.
Hemi’s tunneling process is not limited to Ethereum-native assets. Phase 2 of Hemi's Ethereum Tunnel will support Hemi-native and Bitcoin-native assets, extending the functionality of the tunnels to a broader range of assets. This capability is crucial for enabling the use of Bitcoin within Ethereum’s extensive decentralized finance (DeFi) ecosystem, which traditionally lacks native Bitcoin interoperability.
The process for tunneling Hemi-native assets begins with the user submitting a deposit transaction on Hemi, locking their native assets within Hemi’s native asset tunnel contract.
Similar to Ethereum-native asset transfers, the state root containing this deposit transaction is published to Ethereum.
Once the rollup state root is confirmed (following Bitcoin finality and the absence of any disputes), the user submits a deposit proof on Ethereum to claim the corresponding representative tokens. These tokens represent the Hemi-native assets within the Ethereum ecosystem and can be used in Ethereum dApps or traded just like any other Ethereum-based token.
Deposit to Hemi
Moving Hemi-native assets back to Hemi from Ethereum involves a similar process. The user initiates a withdrawal on Ethereum, burning the representative tokens.
This triggers Hemi’s block derivation protocol to include the withdrawal in the next Hemi block derived from the corresponding Ethereum block.
Once the withdrawal is processed, the Hemi-native assets are transferred from Hemi’s native asset tunnel contract back to the user, completing the return to Hemi’s L2 environment.
One of the core advantages of this system is its flexibility. It allows Bitcoin-native assets, which are traditionally siloed on the Bitcoin network, to be tunneled through Hemi and into Ethereum. This enables Bitcoin to participate in Ethereum’s DeFi ecosystem while maintaining the security and decentralization that Bitcoin’s Proof-of-Work consensus provides.
While Hemi’s Ethereum Tunnels share the foundational principles of traditional bridges like the Standard Bridge, there are several critical distinctions:
The primary distinction between Hemi’s Tunnels and standard bridges lies in the finality model and security architecture. Standard bridges depend on an optimistic model with a delayed dispute window. The withdrawal process on these bridges typically takes a week or longer, as they await the potential for fraud proofs before finalizing the transaction.
Hemi Tunnels enhance this process by incorporating Bitcoin finality. Instead of relying solely on an Ethereum-based dispute window, Hemi uses Bitcoin’s Proof-of-Work consensus as an additional layer of security. This allows Hemi to finalize transactions more quickly, as the Bitcoin network’s finality period is shorter and more secure than the traditional dispute windows of optimistic rollups.
Hemi will decentralize the dispute process by distributing the Challenger role across a wider set of participants. This decentralization mitigates the risk of collusion or centralization of power within the bridging system, offering a more secure alternative to centralized or semi-centralized dispute mechanisms found in standard bridges.
Blocks in blockchain technology are packets of transactions and data, made secure through links to previous blocks.
Altering past blocks requires modifying all subsequent ones, a security feature. The Hemi Network enhances this by segmenting blocks into five-minute "keystone" intervals, with a security proof sent to the Bitcoin network every second interval.
A block is a component of blockchain technology that contains transactions and their associated data.
Its security is enhanced because all subsequent blocks in the chain cryptographically reference it, reinforcing the integrity of the entire blockchain with each new block added. Tampering with an earlier block requires altering not only that block but also every block after it.
In the Hemi Network, blocks are organized into five-minute intervals known as keystones. To inherit Bitcoin’s security, *one Hemi Network state proof must be published to the Bitcoin network every two keystone intervals. *
The first block of each interval cryptographically references the previous two keystone blocks, ensuring that the network cannot be reorganized without a 51-percent attack against Bitcoin itself, a scenario considered highly unlikely even for powerful entities like nation-states.
This approach addresses key PoS vulnerabilities: weak subjectivity and censorship attacks.
Forged chains would be invalidated by the state proofs on the Bitcoin network.
Integration with the Bitcoin network validates the blockchain and helps maintain integrity even under attack.
The Hemi Network uses a hybrid of Proof-of-Stake (PoS) and Proof-of-Proof (PoP) to secure its blockchain.
The Hemi Network utilizes the Bitcoin-Secure Sequencer (BSS), a type of Proof-of-Stake (PoS) node, to achieve consensus, or agreement, on the network’s status. By leveraging the Bitcoin blockchain, the Hemi Network decentralizes its security measures, reducing reliance on internal network validators.
Enhanced Consensus Mechanism
The network combines traditional PoS with Proof-of-Proof (PoP), creating a more secure and robust consensus mechanism than standard PoS systems.
⛓️ It incorporates state proofs from the Bitcoin network to validate the Hemi blockchain, ensuring the network's history cannot be easily altered or falsified.
🛡️ The hybrid model provides a unique defense against majority stake attacks, a common vulnerability in pure PoS networks.
🔐 In the event of an overwhelming attack, the network can offload transactions to the Bitcoin network, ensuring continuous operation and security.
Hemi’s Bitcoin Tunnel enables the secure transfer of Bitcoin and Bitcoin-native assets (such as Ordinals and BRC-20 tokens) between Bitcoin, Hemi, and eventually, EVM-compatible networks.
The Bitcoin Tunnel contract uses hVM to track Bitcoin addresses and outputs tied to custodianship vaults, ensuring efficient and secure asset management.
Hemi will offer two custodianship models: overcollateralized multisig and BitVM. These ensure decentralized, trust-minimized asset tunneling with high security and performance.
The Bitcoin Tunnels allow Bitcoin assets to move between Bitcoin and Hemi by locking assets in custodial vaults and minting representative tokens on Hemi. Users can freely use these tokens on Hemi, and eventually, tunnel them to Ethereum or other EVM-compatible networks.
Users generate a deposit transaction by sending Bitcoin (or Bitcoin-native assets) to the selected custodianship vault’s Bitcoin address, managed by the multisig.
Once sent, the Bitcoin assets are locked in the custodianship vault.
Hemi’s Bitcoin Tunnel verifies the successful deposit on the Bitcoin network by monitoring the UTXO table for the corresponding deposit. If the deposit is successfully verified, the system moves to the next step.
Upon verification, Hemi mints representative tokens equivalent to the deposited Bitcoin assets. These tokens are sent to the user’s Hemi address. Hemi mints the representative tokens after 6 Bitcoin confirmations, or approximately one hour.
The user on Hemi initiates a withdrawal transaction by selecting the amount of representative tokens they want to convert back to Bitcoin.
These representative tokens are burned on the Hemi network, signaling the system that the user intends to withdraw the corresponding amount of Bitcoin from the custodianship vault.
Hemi’s Bitcoin Tunnel updates the rollup state root with the details of the withdrawal transaction. This state root is submitted to Bitcoin by a Publisher to ensure that the withdrawal is accurately recorded.
Hemi’s Bitcoin Tunnel verifies the correct burning of tokens and prepares the custodianship system for withdrawal.
The custodianship vault is notified of the withdrawal request. In the case of a multisig vault, the required number of signatures is collected to authorize the withdrawal.
Once verified, the custodianship vault releases the corresponding Bitcoin or Bitcoin-native assets to the user’s Bitcoin address. It may take up to 12 hours to verify and release withdrawn BTC.
The hVM system constantly monitors for any unauthorized withdrawals. In Phase 0, this requires an externally owned account (EOA) to flag any potential issues. In later phases, event notifications will allow automatic detection of unauthorized actions. If any misbehavior is detected during the withdrawal process, the responsible custodian is slashed on Hemi, and corrective measures are taken to prevent unauthorized fund transfers.
Hemi’s Bitcoin Tunnels leverage the power of hVM (Hemi Virtual Machine) to monitor and secure Bitcoin-based asset transfers.
The Bitcoin Tunnel contract uses hVM to track Bitcoin addresses and outputs tied to custodianship vaults, ensuring efficient and secure asset management.
In hVM Phase 0, an externally owned account (EOA) is required to notify the contract of any irregular withdrawals. Once flagged, hVM can verify the offending transaction and respond by slashing misbehaving custodians.
This contrasts with BTC interoperability solutions like BTC header relay, where users must manually construct cryptographic proofs of misbehavior and relay them to the contract for validation, introducing higher costs and risks of error.
Participants can secure the Hemi Network to Bitcoin and earn rewards by operating the PoP Miner application.
Mining within the Hemi Network involves a specialized process designed to intertwine the security of the Hemi Network with that of the Bitcoin blockchain.
This is achieved through the operation of the PoP Miner application, which plays a pivotal role in this symbiotic security mechanism.
Fetching Headers: The PoP Miner retrieves network headers from the Bitcoin Finality Governor for Bitcoin blockchain publication.
Transaction Construction: The miner constructs Bitcoin transactions embedding aforementioned Hemi Network headers.
Proof of Publication: Miners broadcast transactions through the Governor. These transactions are then integrated into Hemi’s consensus layer after being validated via the Bitcoin network, resulting in miner rewards.
🔍 Tracking Miner Activity
⏳ Payout Processing Time
It takes about 4 hours on mainnet (30 minutes on testnet) after sending a transaction to receive a PoP payout.
⚡️ Quick Confirmation Rewards
You will earn PoP rewards for transactions that are quickly confirmed (within the next 2-3 Bitcoin blocks).
🎁 Rewards
Testnet rewards are fixed, with each successful transaction earning 1
tHEMI. Payouts occur after the transaction is successfully confirmed. You may expect a brief delay between transaction confirmation and the distribution of tHEMI to your address.
In future testnets and on the mainnet, rewards will depend on the number of active PoP miners.
🔗 Additional Links
Protect Your Private Key
Your private key is the most sensitive part of your Bitcoin wallet and should be treated with the highest level of security. Access to your private key grants complete control over the funds associated with the wallet, including the Bitcoin you send to the miner and the rewards you collect. If someone gains access to your private key, they can steal your funds and rewards without your ability to recover them.
🚫 Single Key, Single Miner: Using the same key for multiple PoP miner instances can lead to conflicts, as they may attempt to use the same Bitcoin UTXO simultaneously, causing operational issues.
🗂 Purpose of popm-address.json
: This file serves as a secure storage for your generated keys, meant for reference. The actual Bitcoin key used by the PoP Miner is specified through an environment variable at the program's start.
🔑 Unified Private Key: Your single private key generates both a Bitcoin address and a Hemi address. The Hemi network automatically processes your public key from Bitcoin transactions, converting it into a Hemi address to receive payouts.
⚡ Bitcoin Testnet Dynamics: Bitcoin testnet can undergo periods of rapid block generation due to block difficulty adjustments after inactive periods. This unusual pace can temporarily impact the timing and processing of payouts.
A Bitcoin Secure Sequencer (BSS) generates and broadcasts a new block.
BSS nodes send the block header to Bitcoin Finality Governor (BFG) nodes.
BFG nodes direct the header to PoP Miners.
Miners create and send back signed Bitcoin transactions containing the header.
BFG nodes push these transactions into the Bitcoin network.
Once included in a Bitcoin block, BFG nodes generate PoP Transactions with proofs of Bitcoin inclusion.
These transactions and Bitcoin headers are incorporated into a new Hemi block by a BSS node, updating the EVM with the latest Bitcoin state.
Rewards are calculated and distributed to PoP Miners post-mining.
PoP Miners embed Hemi headers — L2 keystones — into Bitcoin blocks, effectively “anchoring” Hemi state to Bitcoin’s security.
PoP Miners receive Hemi headers from a BFG, create BTC transactions with those headers, and forward them to Bitcoin for inclusion in blocks.
Successful PoP Miners are earn rewards on the Hemi network, incentivizing them to maintain network operation.
Network Miners and Operators: Operators or enthusiasts who want to earn rewards by using their Bitcoin node connectivity. More PoP miners = stronger finality guarantees.
BFG nodes look for Proof-of-Proof (PoP) transactions that embed Hemi headers into Bitcoin, determining if Hemi blocks have attained Bitcoin-level finality.
BFG nodes serve as the “checkpoint” mechanism for finality by confirming whether competing versions of Hemi blocks exist on-chain and identifying possible reorgs. The nodes then supply Hemi data to PoP Miners, parse resulting PoP transactions and communicate finality info to BSS nodes.
PoP Miners: A custom BFG deamon can notify your local PoP miner and this will broadcast them to your Electrs+bitcoind setup so you don't rely on Hemi Labs — or any third party — which may be congested.
Enterprise Node Operators: Exchanges, large dApp platforms, or custodial services that need independent, verifiable finality checks on Hemi transactions.
A PostgreSQL database, bfgd expects the sql scripts in ./database/bfgd/scripts/
to be run to set up your schema.
A connection to:
An Electrs node on the proper Bitcoin network (testnet or mainnet).
bitcoind
bfgd
BSS nodes combine Hemi transactions with Ethereum mainnet batches, creating a hybrid solution that inherits Bitcoin security signals (via BFG) and uses Ethereum’s smart contract capabilities.
These nodes coordinate staking, unstaking, and slashing operations to secure the network, while incorporating finality checkpoints from the BFG. BSS nodes also facilitate cross-chain asset transfers by ensuring that Hemi’s on-chain transactions align with Ethereum-based bridging logic.
Validator/Sequencer Operators: Entities responsible for generating Hemi blocks and maintaining chain consensus.
Hemi Network runs a specialized Geth implementation that supports extended functionalities, enabling seamless interaction between Hemi’s chain state and Ethereum’s mainnet.
This modified Geth node manages Ethereum transactions and block headers in a way tailored for Hemi’s bridging protocols. The node also consolidates Ethereum state so that BSS nodes (and other Hemi components) can quickly verify or execute cross-chain logic.
The (Command Line Interface) version of PoP mining is designed for long-term, continuous operation. It requires some technical knowledge for setup and maintenance but provides robust security and operational efficiency.
Visit the and visit to see your miner's history and activity.
➡️ View complete instructions via the
➡️ View complete instructions via the
Connect to a live instance.
➡️ View complete instructions via the
Clone the and follow instructions for the Modified Geth build.
Developer
I'm a blockchain developer.
Enthusiast
I'm exploring the Hemi Network.
Miner
I'm interested in running a PoP Miner.
In cryptocurrency networks, a node
is a computer (physical or virtual) that connects to the network, while a client
is the software **that allows the node to communicate with the network.
The Hemi Network utilizes five specialized types of nodes — Bitcoin finality governors (BFG), Bitcoin-secure sequencers (BSS), Proof-of-Proof miners (PoP), Challengers and modified Geth nodes — to enhance network reliability by distributing functions, thus mitigating the impact of single node failures.
Cryptocurrency networks are powered by a distributed array of computers, each referred to as a node, functioning in a peer-to-peer manner where each holds equal standing. Nodes, depending on the client software they run, fulfill different roles within the network.
For instance, in the Bitcoin network, full nodes store a complete history of transactions for verification purposes, offering high security, while light nodes, focusing on transaction capability, rely on full nodes for information about the network's current state. This setup allows for a flexible network structure where nodes can freely join or leave without disrupting the network's overall functionality.
In contrast, the Hemi Network employs a more specialized node architecture to optimize network performance and security. It includes:
Bitcoin Finality Governors: Ensures transactions achieve finality on the Bitcoin blockchain.
Bitcoin-Secure Sequencers: Orders transactions in a secure manner, leveraging Bitcoin's security.
Proof-of-Proof Miners: Validates transactions across blockchains without requiring the entire blockchain data.
Modified Geth Node: Manages Ethereum transactions and block headers in a way tailored for Hemi’s bridging protocols.
Challengers: Monitors and verifies the correctness of transactions and state proofs (Note: running a Challenger node will be enabled in the near future).
This segmentation of responsibilities across different node types significantly enhances the Hemi Network's fault tolerance. By isolating specific functions to particular node types, the network ensures that issues within one node type do not compromise the entire network's operations, thereby improving the system's overall reliability.
This architecture allows user clients to interact seamlessly with both the Bitcoin and Ethereum networks without the complexity of managing diverse node functions.
The Ethereum network currently comprises a variety of networks with varying functionality, however Hemi builds primarily on only two: Ethereum mainnet and Sepolia.
The Bitcoin network currently comprises a variety of networks with varying functionality, however Hemi builds primarily on only two: Bitcoin Mainnet and Bitcoin Testnet.
Private Key: A secret code that allows you to access and control your cryptocurrency in your wallet. It is crucial never to share your private key with anyone, as it grants complete control over your funds.
Public Address: An address that you can share with others to receive funds. It is a string of alphanumeric characters that acts like an account number on the blockchain.
Seed Phrase: A series of 12 or 24 words that serve as a backup to restore access to your wallet. This phrase should be stored securely and privately; if lost or compromised, you could lose access to your funds.
Gas Fees: Transaction fees paid to miners or validators on the blockchain to process and confirm transactions. Fees vary based on network congestion and the complexity of the transaction.
dApps (Decentralized Applications): Applications that run on a blockchain network rather than a centralized server. MetaMask allows users to interact with dApps directly from their browser.
The Ethereum network currently comprises a variety of networks with varying functionality, however Hemi build primarily on only two:
Ethereum Mainnet: The primary Ethereum network where real ETH transactions occur. It is the live network that supports the Ethereum economy and decentralized applications (dApps), with transactions being irreversible and involving real value and fees.
Sepolia Testnet: A testing environment for Ethereum that mimics the Mainnet but uses testnet ETH with no real value. It allows developers and users to test applications, transactions, and upgrades without risking real funds, providing a stable and efficient testing ground for Ethereum-based projects.
Private Key: A secret code that allows you to access and control your cryptocurrency in your wallet. It is crucial never to share your private key with anyone, as it grants complete control over your funds.
Public Address: An address that you can share with others to receive funds. It is a string of alphanumeric characters that acts like an account number on the blockchain.
Seed Phrase: A series of 12 or 24 words that serve as a backup to restore access to your wallet. This phrase should be stored securely and privately; if lost or compromised, you could lose access to your funds.
Confirmation: The process by which a Bitcoin transaction is included in a block on the blockchain. Each confirmation represents a layer of verification, with multiple confirmations providing increased security against double-spending.
UTXO (Unspent Transaction Output): A key concept in Bitcoin that represents the amount of Bitcoin available to spend. UTXOs are outputs from previous transactions that have not yet been spent, and they form the balance of your Bitcoin wallet.
Mempool (Memory Pool): The mempool is a holding area for unconfirmed transactions on a blockchain, where they wait to be included in the next block by miners or validators. Transactions are prioritized based on their attached fees; those with higher fees are typically confirmed faster. Monitoring the mempool helps users gauge current network congestion and set appropriate transaction fees for quicker confirmations.
Bitcoin addresses are the unique identifiers used to send and receive Bitcoin. Over time, several address types have been introduced to improve Bitcoin’s efficiency, security, and scalability.
Legacy (P2PKH): This is the original and most widely recognized address format.
Nested SegWit (P2SH-P2WPKH): An interim solution that allows the benefits of SegWit while maintaining compatibility with Legacy wallets.
Native SegWit (bech32): Native SegWit, also known as bech32, introduces significant improvements in transaction efficiency and scalability.
Taproot: Taproot is the latest upgrade to Bitcoin’s address formats, focusing on enhanced privacy, scalability, and flexibility.
The Bitcoin network currently comprises a variety of networks with varying functionality, however Hemi build primarily on only two:
Bitcoin Mainnet: The primary Bitcoin network where real BTC transactions occur. It is the live network that supports the Bitcoin economy and has actual value, with transactions being irreversible and fees applying.
Bitcoin Testnet: A testing environment for Bitcoin that mimics the Mainnet but uses test BTC with no real value. Developers and users can test applications, transactions, and upgrades without risking real funds. (Not to be confused with Bitcoin Testnet4, a version of Bitcoin Testnet with updated configurations and more stability for testing purposes. It offers an alternative and more reliable test environment compared to the older Testnet3, with no real value attached to the test BTC.
Tunnel your ERC20s to Hemi by using the native Hemi Tunnel, enabling interactions within the Hemi Network ecosystem.
Click 'Connect Wallets'
in the top-right corner of the Hemi Portal.
Currently, MetaMask and Rabby are the only EVM wallets Hemi supports. Our team is working to add support for additional wallets.
Ensure that you are connected to the Ethereum Network. If you are not connected, the Portal will prompt you to connect.
Use the token dropdown to select the asset you wish to tunnel. After selecting the asset, input the amount of the asset you wish to move to Hemi.
After you have confirmed the gas fee and wish to proceed with the deposit, click 'Deposit.'
Sign and confirm your deposit transaction in your connected wallet.
Your transaction should now be complete! You can check the status and view the transaction in the 'Transaction History'
tab.
Certain tokens are not yet supported by Hemi’s native Tunnel.
For these assets, you can use one of several third-party tunnel solutions to move tokens between Ethereum and Hemi.
Hemi’s native Tunnel supports a range of popular ERC-20 tokens. However, some assets (e.g., USDC, USDT) are not yet integrated. In these cases, a third-party bridge provides:
• Fast bridging times.
• Established track record of security and reliability.
• Wide token support, including stablecoins like USDC and USDT.
Below is a list of third-party bridges you can use to transfer assets to Hemi. Each bridge has its own UI, fees, and specific token support.
Tunnel your ERC20s to Hemi by using the Stargate third-party bridge.
Supported assets include USDC, USDT, ETH, and more.
Click 'Connect Wallet'
in the top-right corner.
Using the token dropdown, select the asset you wish to bridge to Hemi.
Input the amount of asset you wish to bridge to Hemi.
When you are satisfied with your transaction, click 'Transfer'.
From your connected wallet, approve the asset spend and sign the transaction.
After signing the transaction, look for the pending transaction bar at the top of the screen. It may take a few minutes to confirm the transaction.
Follow along with some of the tutorials to help you get a head start when building your first Hemi project.
🟢 Easy
🟢 Easy
🟢 Easy
🟢 Easy
🟢 Easy
🟢 Easy
🟡 Medium
Set up and run your PoP miner, either by downloading pre-built binaries or by building from source.
🟡 Medium
Earning tHEMI rewards from PoP mining? Add the token contract address and view rewards.
🟢 Easy
Click 'Add extension.'
Open the UniSat extension and click 'Create new wallet.'
Make sure to save your private key. Your private key provides full access to your wallet and funds.
Hemi team members will never ask you for private keys.
Do not share it with anyone.
After you have saved your private key in a secure area, click 'Continue.'
Hemi currently uses two primary address types:
Legacy (P2PKH): PoP mining currently requires a P2PKH address, although this may change at some point in the future.
Native SegWit (P2WPKH): For everything else on Hemi (i.e., Bitcoin tunneling), any address type can be used but P2WPKH will (generally) be the cheapest fee-wise.
After you have selected your address type, click 'Continue.'
This guide walks you through adding the Hemi network to MetaMask, including setting up network details like RPC URL, Chain ID, and Block Explorer URL.
Click on the network-selection dropdown, which is found at the top left of the MetaMask window.
In the "Add a network manually"
settings, input the following information for the Hemi testnet network:
For Hemi testnet, input the following information instead:
Select Save
to add the Hemi network to your MetaMask.
After you have set up your EVM wallet on MetaMask, you may want to explore some of the unique features on Hemi testnet. This requires switching the connected network in your MetaMask wallet.
A decentralized computing platform that allows developers to build and deploy smart contracts. MetaMask is an EVM wallet, meaning it can interact with any blockchain compatible with the EVM, not just Ethereum.
is the primary blockchain explorer for Ethereum, providing a comprehensive interface to view transaction details, address balances, token transfers, and smart contract interactions. It’s an invaluable tool for MetaMask users to verify transaction status, track gas fees, and explore the Ethereum blockchain in depth.
To view transaction details, address balances, token transfers, and smart contract interactions on the Hemi Network, visit the .
If you are ready to get started with Ethereum, you can learn how to and interact with Ethereum on Hemi.
is a blockchain explorer for Bitcoin that visualizes the current state of the mempool, the pool of unconfirmed transactions, and provides insights into transaction fees and block confirmations. It is particularly useful for BTC wallet users to check the status of their transactions and understand current network congestion.
To view transaction details, address balances, token transfers, and smart contract interactions on the Hemi network, visit the .
If you are ready to get started with Bitcoin, you can learn how to and interact with Bitcoin on Hemi.
If you use a hardware wallet and want to interact with Hemi, you can connect it through MetaMask to manage your assets securely. This approach allows you to maintain control of your private keys while accessing the Hemi network. For a step-by-step guide on connecting MetaMask with a hardware wallet, please refer to .
- Set up your EVM wallet and add the Hemi Network before interacting with any Hemi application.
Go to to tunnel your ERC20 asset from Ethereum to the Hemi network.
Stargate
Eigenpie
- Set up your EVM wallet and add the Hemi Network before interacting with any Hemi application.
Navigate to the to tunnel your ERC20 asset from Ethereum to the Hemi network.
Note: You may be eligible to earn Hemi by completing tutorials. Visit our for more information on active quests.
Learn how to set up and get started with an EVM () wallet.
Learn how to set up and get started with a BTC () wallet.
Learn how to (bridge) your ETH assets to and from Hemi.
Learn how to (bridge) your BTC assets to and from Hemi.
Learn about on Hemi.
Learn about multi-sig wallets and set up a Wallet on Hemi.
Learn about gasless transactions, re-routing/recalling, and configurable security with on Hemi.
, available as a browser extension and mobile app, is designed to let users easily manage their Bitcoin assets and interact with dApps.
Navigate to the and click 'Add to Chrome.'
, available as a browser extension and mobile app, is designed to let users easily manage their cryptocurrencies and interact with dApps.
For a step-by-step guide on connecting MetaMask with a hardware wallet, please refer to .
to execute transactions and smart contract interactions within the Ethereum network.
The Hemi Network combines Proof-of-Stake (PoS) with Proof-of-Proof (PoP) for enhanced security which:
Protects against weak subjectivity using Bitcoin's state proofs.
Prevents censorship attacks by offloading transactions to Bitcoin.
Even if an attacker gathers old staking keys, they can't alter the state proofs on the Bitcoin blockchain. These state proofs confirm the Hemi Network's transaction history, so any fake blockchain the attacker creates would be recognized as invalid.
In a worst-case scenario where an attacker controls all the sequencers (the nodes that create blocks in the blockchain), the Hemi Network can still function by using the Bitcoin network.
Transactions can be processed (or "offloaded") to Bitcoin, which prevents the attacker from having total control.
The Hemi Network’s hybrid PoS-PoP consensus model hardens the network protocol against both weak subjectivity and censorship. Even with an overwhelming majority of old staking keys, an attacker would be unable to forge finalized state proofs on the Bitcoin blockchain, and the established state proofs would invalidate the altered Hemi Network chain.
Gas Token/Currency Symbol
ETH
ChainID
43111
RPC API endpoint
https://rpc.hemi.network/rpc
Explorer
Gas Token/Currency Symbol
ETH
ChainID
743111
RPC API endpoint
https://testnet.rpc.hemi.network/rpc
Explorer
Certain tokens are not yet supported by Hemi’s native Tunnel.
For these assets, you can use one of several third-party tunnel solutions to move tokens between Bitcoin and Hemi.
Hemi’s native Tunnel supports tunneling BTC, however, some assets (e.g., pumpBTC, iBTC) are not yet integrated. In these cases, a third-party bridge provides:
• Fast bridging times.
• Established track record of security and reliability.
• Wide token support.
Below is a list of third-party bridges you can use to transfer BTC assets to Hemi. Each bridge has its own UI, fees, and specific token support.
Free.tech
Meson
Magpie
Deposit BTC, ETH, or stablecoins into reward contracts and earn passive income from ecosystem incentives.
Earn rewards from Hemi and its partners, with bonuses for early adopters and high-value deposits.
No Slashing Risk – Assets are never used for network validation.
Flexible Deposits & Withdrawals – No bonding periods; stake and unstake anytime.
Multi-Asset Support – Stake Bitcoin, Ethereum, and stablecoins assets.
Ecosystem-Wide Rewards – Earn incentives from Hemi and partner networks.
Hemi’s staking contracts function differently from PoS staking by offering a reward-based deposit model:
Users deposit assets into smart contracts designed for staking rewards.
Rewards accumulate over time, distributed by Hemi and integrated partners.
No lock-up requirements – Users can unstake at any time.
Hemi’s staking program supports a variety of assets across Bitcoin, Ethereum, and stablecoin categories.
hemiBTC
Hemi
Hemi’s native BTC representation.
uBTC
Unirouter
BTC staked on B2 Network.
pumpBTC
PumpBTC
BTCB & WBTC staked on Babylon.
stBTC
Lorenzo
BTC staked by Babylon.
enzoBTC
Lorenzo
Wrapped BTC token.
iBTC
exSat Network
BTC staked on exSat Network.
M-BTC
Merlin
BTC staked on Merlin.
oBTC
Obelisk
BTC staked on Obelisk.
tBTC
Threshold
BTC staked on Threshold.
mBTC
Magpie
BTC staked on Babylon.
WBTC
Wrapped BTC
Wrapped BTC token.
ETH
Hemi
Native ETH token.
WETH
Hemi
Wrapped ETH token.
rsETH
Kelp
ETH staked on Kelp.
egETH
Eigenpie
ETH staked on Eigenlayer.
VUSD
Hemi
USD-pegged stablecoin from Hemi.
USDT
Tether
Tether's stablecoin.
USDC
Circle
Circle's stablecoin.
DAI
MakerDAO
MakerDAO's stablecoin.
Hemi’s staking program offers rewards based on asset deposits and participation within the ecosystem:
Earn ecosystem rewards across Hemi and partnered protocols.
Points-based incentives may apply for early participants and high-value deposits.
Earn additional benefits on highly-incentivized asset groups.
This guide provides an overview of the essential steps and resources to get you started PoP mining on Hemi.
Begin by familiarizing yourself with some of the key Hemi network terms and features.
Prepare your various wallets to start PoP mining on Hemi by setting up an EVM and BTC wallet.
Congratulations 🎉 Now that you’re PoP miner is running, here are some next steps to deepen your engagement and maximize the potential of your journey on Hemi.
If you encounter any issues or need assistance at any step, the following resources are available to help:
Capsule is an asset transfer protocol that allows anyone to batch and transfer multiple assets in a single package on Hemi.
Additionally, Capsule provides users and developers with advanced functionality like gasless transactions, re-routing/recalling, and configurable security.
Capsule is an asset transfer protocol that allows anyone to batch and transfer multiple assets in a single package on Hemi.
Additionally, Capsule provides users and developers with advanced functionality like gasless transactions, re-routing/recalling, and configurable security.
Connect your MetaMask wallet by clicking the button in the top-right corner.
Click 'Add Asset'
to select the Hemi assets you would like to add to the Capsule. You may add any quantity and any combination of any Hemi assets as desired.
Optional: You may change the name of the Capsule generated in the text box below the 'Add Asset'
button.
When finished, click 'Continue'
.
Capsule comes with a variety of optional features, including:
Gasless Pickup: The assets can be redeemed without pay gas costs.
Time Locked: The assets cannot be redeemed until a specific time.
Password Protection: A password is required to redeem the assets (a unique and random password is provided by Capsule).
Asset Key Verification: The asset cannot be redeemed unless the recipient holds a designated NFT in their wallet (specific ID optional).
After selecting and adjusting any preferred features, click 'Continue'
.
Once you are satisfied with your Capsule, click the checkmark that says 'I've read and I agree to the terms listed in the Capsule Terms of Service and Privacy Policy.'
When finished, click 'Continue'
.
To finalize your Capsule, you must approve all the assets you included inside your MetaMask wallet.
When finished, click 'Continue'
.
Confirm your transaction in MetaMask.
Copy your Capsule transfer link (and if included, your redemption password) and distribute your Capsule as desired!
This guide provides straightforward steps to download, set up, and run your PoP Miner, either by downloading pre-built binaries or by building from source.
Ensure you have your development environment ready and follow the steps below to start PoP mining.
Basic CLI skills are required.
Basic CLI Knowledge
The package you will need to download depends on your OS and architecture:
Windows (Intel/AMD CPU): heminetwork_v1.0.0_windows_amd64.zip
Mac (Intel CPU): heminetwork_v1.0.0_darwin_amd64.tar.gz
Mac (Apple Silicon "M" CPU): heminetwork_v1.0.0_darwin_arm64.tar.gz
Linux (Intel/AMD CPU): heminetwork_v1.0.0_linux_amd64.tar.gz
Linux (ARM CPU): heminetwork_v1.0.0_linux_arm64.tar.gz
After downloading the necessary files, you must extract them from their compressed format before you can use or access the software. On most operating systems, you can right-click on the downloaded archive and choose "Extract" or similar.
Launch your CLI:
Navigate to the folder you extracted by typing cd
(don't press Enter
yet) and then drag the path of the extracted folder into your CLI, or type the path in manually and then press Enter
.
For example on Linux if you downloaded the package to your Downloads folder and extracted it through the GUI, you might run a command like:
cd '/home/<user>/Downloads/heminetwork_v1.0.0_linux_amd64'
List the files:
Your output should be:
Linux & macOS
For Windows
To ensure you downloaded the correct binaries and are able to run them, execute the command below:
This will display the help menu for popmd
, indicating that it's installed and operational.
If you prefer to PoP mine using a preexisting private key, you may skip step 6a and 6b. You may import a private key from either an EVM or BTC address. For your BTC wallet (Unisat for example), use the HEX private key and not the WIF private key.
If you chose to generate a new private key in Step 6a, open your JSON to view your file contents.
You should see a result like:
Find your wallet address:
New Address: If you generated a new public key in Step 6a, check the JSON file from Step 6b for your pubkey_hash
.
Best Practices for BTC Allocation
In your console, execute the following commands while:
replacing <private_key>
with either the value from your JSON file in Step 5 OR your preexisting EVM/BTC private key,
replacing <fee_per_vB_integer>
with the fee in sat/vB you want to pay.
Linux & macOS
Windows
The Bitcoin transaction (normally represented in satoshis per virtual byte or sats/vB) is a fee paid to the Bitcoin miners to include a transaction in a Bitcoin block. It varies with network congestion, typically rising during periods of high transaction volume and decreasing when there is less activity.
The PoP Miner consumes BTC to pay the Bitcoin miners to include PoP transactions in Bitcoin blocks.
In order to ensure PoP transactions from your PoP miner are included in Bitcoin blocks, ensure the configured fee is set to an appropriate value. The PoP miner can be configured to use a certain fee in sats/vB by changing the POPM_STATIC_FEE
environment variable when running the PoP miner. In a future version, the PoP miner will automatically calculate the current network fee to guarantee PoP transactions are included in Bitcoin blocks.
The lower you set the fee, the less BTC you will pay per PoP transaction. If your fees are too low, Bitcoin miners may not include your transaction quickly enough for you to successfully PoP mine.
Bitcoin fee determination:
Set the Static Fee: Re-run the command to set the POPM_STATIC_FEE
environment variable from above (export
on Linux/macOS, set
on Windows) each time you want to change the fee, and restart the PoP Miner afterwards.
When setting up your UniSat wallet, the browser extension will default to the Bitcoin mainnet network.
If you plan on building on or interacting with Bitcoin testnet, you may need to change the network your UniSat wallet is set to in order to view your testnet assets.
This guide walks you through switching the connected network on your UniSat wallet.
Your wallet is now ready to send, receive, and sign transactions on Bitcoin Testnet!
Prior to TGE, users who engage in securing Hemi (mainnet) to Bitcoin will receive PoPPoints tokens, which are distributed based on how many other users are actively PoP Mining. These PoPPoints tokens are initially non-transferrable. During the initial mainnet release, all miners who get a PoP publication for a keystone into Bitcoin within ~1.6 hours will share 100 PoPPoints for that keystone round.
As mainnet evolves, this payout algorithm will be adjusted.
Navigate to Tokens
Click on the three vertical dots on the right of the token menu
Import tokens
Type in the tHEMI token contract address 0xC5D2E164601c59c2cD760669e849BFe498003e21
into the Token Contract Address
field.
If the address is recognized, MetaMask will automatically populate the Token Symbol
and Token Decimal
fields. For PoPPoints, you should see a symbol POP
and 18 decimals.
Confirm the accuracy of the provided information, and then click on Next
.
If successful, you should see your PoPPoints tokens in your wallet's token list:
For now, these tokens are non-transferrable.
The web PoP miner was designed for ease of use, allowing users of any experience level to test and run their own PoP miner.
Due to its lightweight nature, it required no specific hardware, making it accessible from any standard computer.
While it was not intended for long-term mining operations, it served as an excellent entry point for users interested in transitioning to the more durable CLI version, providing an introduction to Hemi's architecture and its unique integration with the Bitcoin network.
The web miner uses the same secure code as the CLI miner. However, it also relies on your web browser, which introduces additional security risks.
When transitioning to the CLI PoP Miner, it is recommended to generate a new public key. Private key information obtained via the web PoP Miner, although encrypted, is not fully secure and is not meant for extended mining operations.
provides a seamless way for users to earn rewards by locking up assets within the Hemi ecosystem. Unlike traditional Proof-of-Stake (PoS) mechanisms, staking on Hemi does not involve securing the network or slashing risks. Instead, it enables users to deposit assets into specialized reward contracts to participate in yield opportunities across partner protocols.
Learn about and run a .
View our , join our , and !
What is (PoP)?
Learn about .
An overview of and .
[Optional] and .
[Optional] .
[Optional] Mint an OnlyMeID via on Hemi.
Join our and chat with the community.
The is designed for long-term, continuous operation, requiring some technical knowledge but provides robust security and operational efficiency.
.
Learn about and our rewards .
to Hemi!.
Follow us on .
Become a .
Earn and track Hemi for completing this tutorial!
Visit to learn more about the Capsule protocol.
(or other Hemi assets)
Capsule currently only supports the Hemi testnet network. View our official to add the Hemi testnet network to your wallet and ensure that you are connected to the Hemi network before proceeding.
BTC (See to understand how much BTC is required to PoP mine)
or . Choose the release you want to use (if unsure, choose the latest), and click on Assets
dropdown:
Existing BTC Address: If you are importing a private key from an existing BTC address, to P2PKH (Legacy) and locate the pubkey hash.
Existing EVM Address: If you are importing a private key from an existing EVM address, and select P2PKH (Legacy) as your wallet type.
We advise against sending large amounts of Bitcoin to the private key connected to your PoP miner. To run the miner, ~0.002 BTC
is required per day assuming a Bitcoin fee rate of 2-3 sat/vB. As a safety practice, consider sending only enough BTC for a week or a month at a time and refilling periodically.
To determine how much BTC to send to your wallet, review .
If you want to test out PoP mining on testnet, you can get tBTC from faucets .
Read the section below if you need help determining what value to set here.
Let us know how this process was for you via . We are constantly looking for ways to improve our documentation.
Check Current Fee Levels: Visit to see the current fee levels. Look at the "sat/vB" numbers for the different transaction fee priorities. It is recommended to set the value to the "High Priority" value or slightly higher.
Click the network dropdown in the top-right corner to view all Bitcoin networks.
Select 'Bitcoin Testnet'
from the list of networks.
From here, the dropdown should expand and you can click on 'Bitcoin Testnet'.
Note: You may be eligible to earn Hemi by completing tutorials. Visit our for more information on active quests.
Support for the Web PoP Miner has since been deprecated. To learn more about how we implemented the application, feel free to view our codebase here: Follow our to run a PoP Miner.
Linux & macOS
⚠️ On Mac you will need to first remove the quarantine by running the following command in your Terminal:
xattr -d com.apple.quarantine ./popmd
Run
./popmd --help
Windows
⚠️ Important Note for Windows Users: To successfully execute this command, you must use the Command Prompt (CMD), not PowerShell (which is the default terminal in environments like Visual Studio Code).
Run
popmd.exe --help
To use hVM directly, you will have to call the appropriate precompile address with the appropriate serialized bytes to pass parameters to the function.
Most dApp developers will use the Hemi Bitcoin Kit (hBK) rather than hVM directly.
To use hVM directly, you will have to call the appropriate precompile address with the appropriate serialized bytes to pass parameters to the function.
Each successful precompile call will return serialized bytes according to the precompile’s return data specification.
Most dApp developers will use the Hemi Bitcoin Kit (hBK) rather than hVM directly.
If you’re looking for an easy way to get started developing Bitcoin-aware dApps on Hemi, check out the “Hemi Bitcoin Kit (hBK)” section. Understanding how Bitcoin Kit uses hVM under-the-hood may be helpful, and dApp developers looking to maximize gas efficiency may benefit from using hVM directly to avoid paying overhead for unmarshalling data they don’t need for a specific use case.
The Hemi Bitcoin Kit (hBK) enables direct interaction with Bitcoin blockchain data within Ethereum’s environment.
hBK utilizes Hemi Virtual Machine (hVM) to embed a fully indexed Bitcoin node inside the Ethereum Virtual Machine (EVM).
hBK allows Ethereum smart contracts to query Bitcoin data using precompiled calls, ensuring efficient, trustless data access.
The hVM is the backbone of the hBK’s interoperability features, embedding a Bitcoin node within the EVM. This setup allows Ethereum smart contracts to directly query Bitcoin data without relying on external bridges or third-party oracles, ensuring trustless, efficient, and secure access to Bitcoin data.
Direct Access: Smart contracts can communicate with Bitcoin data embedded in the EVM, enabling them to make queries and receive data via precompiled calls.
Indexed Data: The fully indexed Bitcoin node maintains transaction history, UTXOs, and meta-protocols like Ordinals and BRC-20 tokens.
The hBK abstracts technical complexities, offering developers straightforward methods for accessing Bitcoin data, allowing them to:
Directly Pass Data to Precompiled Calls: Simple data serialization/deserialization processes provide a transparent gateway to precompiled Bitcoin calls.
Enhanced Query Functions (Upcoming): hBK is set to introduce enhanced functions, combining multiple precompile calls and additional processing steps for advanced operations.
This dual approach ensures developers can create Bitcoin-aware applications without managing low-level integration details, focusing instead on innovation and functionality.
Embedded Node Access: hBK integrates a fully indexed Bitcoin node within Hemi’s EVM environment, exposing robust Bitcoin data for smart contract use.
Precompiled Calls for Direct Data Retrieval: Passthrough functions facilitate Bitcoin data queries with direct calls, automatically handling the data structures.
Enhanced Functions for Advanced Queries: Future upgrades will introduce enhanced functions, combining multiple calls and added processing to support more complex queries and data requirements.
Pure Proof-of-Stake networks rely on social consensus to prevent censorship by majority stakers and long-range attacks using old PoS keys (weak-subjectivity attacks).
Staking is the risking of an asset in return for the chance to construct a block.
A user who acts maliciously will have his stake slashed (reduced) as punishment for attacking the network.
The Hemi Network uses a hybrid staking system that incorporates network state proofs published to the Bitcoin network, preventing both censorship attacks and weak-subjectivity attacks.
In Proof-of-Stake (PoS) consensus protocols, staking is a form of virtual mining in which users risk some amount of tokens (a “stake”) for the chance to construct a block and earn block rewards. If the staker misbehaves (for example, by trying to cheat the system), the network will remove some or all of the stake (a process called “slashing”). Under normal conditions when stakers act honestly, slashing is a rare occurrence. PoS is a popular alternative to Proof-of-Work (as in Bitcoin) because staking is far less energy intensive than mining.
Conventional PoS networks, however, face two security risks inherent to staking. If a malicious actor were to acquire more than half of the staking power on the network, he could censor transactions, including slashing transactions, which would prevent other honest validators from regaining control of the network. PoS systems also suffer from weak subjectivity.
If a malicious actor acquired enough old PoS keys to have the majority of staking power, he could use the old keys to create a valid alternative chain. Pure PoS chains like Ethereum rely on social consensus to address these issues because the protocols themselves are vulnerable.
The Hemi Network's Hybrid Staking Approach
The Hemi Network uses a modified PoS protocol to provide security. Sequencers and publishers on the Hemi Network stake the network’s native token, as part of their normal operations. However, because of the network state proofs which proof-of-proof miners publish to the Bitcoin network, old staking keys cannot be used to construct a valid alternative chain. Constructing a valid alternative chain would require also reorganizing the Bitcoin network to publish corresponding alternative state proofs.
Furthermore, even a staker with an overwhelming majority of staking power on the Hemi Network would not be able to censor transactions. They would still be forced to include Bitcoin block headers in the PoS blocks he produced, and any Hemi Network user could bypass active PoS censorship attacks by offloading transactions to the Bitcoin network. The attacker’s stake would then be slashed and other validators would be allowed to process transactions.
In Proof-of-Proof (PoP) consensus, a PoP miner periodically publishes proof of the Hemi Network’s state to the Bitcoin blockchain.
By building on Bitcoin, PoP consensus inherits the security and finality of Bitcoin’s consensus.
After six Bitcoin blocks, PoP consensus reaches a state of superfinality, where the security of the Hemi Network exceeds that of Bitcoin.
Proof-of-Proof (PoP) is the Hemi Network’s additive consensus protocol, building on Bitcoin’s consensus for superior security. PoP miners publish cryptographic network-state proofs to the Bitcoin blockchain, protecting Hemi consensus with Bitcoin's proof of work.
Hemi blocks achieve finality typically nine blocks (approximately an hour and a half) after their proofs are published to Bitcoin.
The Hemi Network accounts for fluctuations in Bitcoin's transaction fees and block timings, recognizing that network-state proofs might not appear in every block.
To manage this variability, a finality delay of nine Bitcoin blocks is implemented.
If no competing fork publishes proofs to Bitcoin during this period, the network assumes finality, requiring a 51% attack on both the Hemi and Bitcoin networks to alter this.
♾️ Superfinality: A New Benchmark in Blockchain Security
Upon reaching this finality, the Hemi Network attains a state of 'superfinality,' where its chain state's security surpasses Bitcoin's.
How?
This is achieved by combining Bitcoin’s Proof-of-Work consensus with Hemi’s Proof-of-Stake. After superfinality, altering the Hemi Network’s state proof would be economically infeasible even for nation-states. An attacker would need so simultaneously 51% attack Bitcoin and Hemi, which is even harder than attacking Bitcoin itself.
A cryptocurrency transaction updates a network's decentralized ledger.
It requires the sender's cryptographic signature to ensure the transaction is authorized.
To increase the speed and number of transactions, transactions can be offloaded to an L2 network, which bundles transactions before settling them on the main chain.
Transactions on the Hemi Network inherit the programming abilities of Ethereum and the robust security of Bitcoin while still encouraging decentralization and resistance to censorship.
A cryptocurrency transaction fundamentally represents an update to the network's decentralized ledger.
Such a transaction mandates a cryptographic signature from the sender's wallet, serving as a verification mechanism to authorize the transaction. Within the Bitcoin ecosystem, scripting capabilities enable the execution of more complex transaction types.
Conversely, Ethereum operates as a distributed virtual machine, allowing for the execution of sophisticated programs known as smart contracts. These contracts, embedded directly on the blockchain, can operate autonomously based on their programming.
L1 chains like Bitcoin and Ethereum typically have relatively slow transaction times—a problem commonly known as the blockchain trilemma.
The process of improving transaction throughput on a blockchain necessitates an expansion of data storage capacity, as each transaction must be individually recorded on the ledger. This requirement potentially centralizes the operation of full nodes to entities possessing considerable computational and financial resources.
In response, Layer 2 (L2) networks present a strategic solution by aggregating multiple transactions off-chain prior to their collective finalization on the primary Layer 1 (L1) blockchain. This methodology not only preserves the foundational security principles of the L1 blockchain but also contributes to a reduction in transaction fees and an acceleration of transaction processing times, thereby enhancing the efficiency and accessibility of blockchain technology. ⏩
The Hemi Network, as an EVM-compatible Layer 2 network built to bridge Ethereum and Bitcoin, enables rapid transaction settlement and finality. Transactions inherit the complex programming abilities of Ethereum and the robust security of Bitcoin. The Hemi Network’s design also encourages greater decentralization than typical L2 networks, preventing censorship and ensuring open access.
Current Bitcoin interoperability systems like BTC header relays exist, but come with significant limitations.
By embedding a full indexed Bitcoin node directly inside the EVM, hVM allows anyone to access Bitcoin's processed state efficiently and without introducing any trust assumptions.
dApp developers can now build all kinds of Bitcoin-aware dApps and custom Bitcoin interoperability infrastructure directly on hVM.
Various Bitcoin header relay systems have been available on Ethereum as a primitive Bitcoin interoperability technology for nearly a decade. This approach has third-party relayers communicate new Bitcoin headers to a smart contract which maintains a lightweight view of Bitcoin consensus. Smart contracts can then verify a Merkle proof to verify that a specific Bitcoin transaction exists in the canonical Bitcoin chain.
However, this approach has significant limitations:
Relies on third-party relayers
Requires large inclusion proofs with expensive validation
Can only prove a transaction exists in Bitcoin (no UTXO set proofs, no balance proofs, etc.)
Recently, other protocols have designed alternate Bitcoin interoperability primitives like 3-way noncustodial escrow systems validated with zk proofs, or smart-contract-controlled wallets run by the network validator set where network Sequencers facilitate UTXO queries.
However, these other approaches are only designed to serve specific use cases, and still don't provide smart contracts with a complete view of Bitcoin's state. Developers building on these primitives are also forced to accept the governance/security models that these one-off primitives provide, such as trusting a Sequencer doesn't withhold data from a UTXO query.
💡 With hVM, we set out to create something much more powerful and flexible that enabled anyone to build custom Bitcoin interoperability infrastructure directly in the EVM with complete access to Bitcoin state.
By embedding a full indexed Bitcoin node directly inside the EVM, hVM:
Does not involve any relayer system or trust assumption
Does not require validation of any expensive proofs
Supports secure queries for Bitcoin information that requires processing the entire chain like UTXOs, balances, and eventually popular Bitcoin metaprotocols
hVM enables dApp developers to build all kinds of Bitcoin-aware dApps and custom Bitcoin interoperability infrastructure which was previously infeasible or outright impossible on other networks.
Some use cases of hVM include:
Non-custodial BTC<->ETH asset exchanges
Bitcoin MEV marketplaces
Bitcoin lending markets
Bitcoin staking systems
Custom smart-wallets with configurable validator sets and signing technology
Custom Bitcoin tunnels (Hemi’s own standard Bitcoin tunnel is being built entirely on hVM)
🎯 Goal: To lay a solid foundation for the Hemi Network by engaging and incentivizing users, developers, and creators during the testnet phase.
🔗 On-chain Engagement: Points are allocated for transactions and other on-chain activities.
💬 Off-chain Participation: Points are also given for contributions to social platforms and community engagement that support network growth.
Network Utilization and User Onboarding: Prioritizing actions that enhance network usage and integrate new participants effectively.
Active Community Contributions: Recognizing significant community involvement and impactful contributions off-chain.
Customized Financial Support: Crafting grants and investments specifically designed to align with strategic objectives of Hemi's ecosystem.
Open Application for Innovation: Streamlining the process for developers to propose and deploy on-chain solutions, encouraging broad participation, and lowering barriers to entry.
🎯 Goal: To amplify network activity and ecosystem growth on the mainnet during the critical period following the TGE.
🔗 On-chain Engagement: Intensive rewards for activities that demonstrate substantial economic value, such as Total Value Locked (TVL) and transaction volume.
Drive substantial TVL growth through strategic protocol integrations.
Establish sustainable transaction volume via supported LSTs/LRTs on Hemi.
Create network effects through interconnected DeFi activities.
💬 Off-chain Participation: Incentives for community engagement and activities that boost the ecosystem’s visibility.
Economic Contributions: Maximize network activity through strategic liquidity provision and trading.
Ecosystem Growth: Onboard protocols to enhance the network activity targeting user base expansion.
Push for Hemi-native Ecosystem: Promoting the development and integration of native applications though Hemi grants program.
Support for Strategic Projects: Providing tailored support to projects that significantly contribute to network growth.
Community-Driven Activities: Encouraging the community to participate in governance and decision-making processes.
🎯 Objective: Consolidate network growth, enhance economic stability, and transition to decentralized governance on mainnet.
🔗 On-chain Engagement: Prioritizing liquidity provision, DEX trading volume, and supporting projects that significantly contribute to the network’s economic activity, such as AMM liquidity and Bitcoin DEX trading.
💬 Off-chain Participation: Maintaining engagement through community-building initiatives and continued support for established projects.
Transition to Liquidity Mining: Points accumulated in Seasons 1 and 2 are carried over to the next season. Points will be rewarded for strategically interacting with the network.
Retroactive Funding Implementation: Beginning to reward builders retroactively for their impactful contributions made in previous seasons.
Continuation of Grant and Investment Programs: Focusing solely on bespoke agreements, moving away from open applications to more curated and strategic engagements that are aligned with network goals.
New Inflationary $HEMI for Security: Introducing new $HEMI tokens specifically allocated to enhance network security and operational robustness.
Governance Transition: Phasing out direct grant applications and transitioning to a decentralized governance model (DeGov) to manage future grants and investments.
Note: Points awarded by the Hemi Network are intended to encourage user activities that are beneficial to the network. Points are awarded solely to incentivize beneficial network activities and carry no monetary value, or financial rights. The exchange or conversion of points to rewards, if any, will be undertaken at the sole discretion of Hemi.
Linux & macOS
⚠️ On Mac you will need to remove the quarantine by running:
xattr -d com.apple.quarantine ./keygen
Run the following command:
Windows
⚠️ Important Note for Windows Users: To successfully execute this command, you must use the Command Prompt, not PowerShell (which is the default terminal in environments like Visual Studio Code). Follow these steps to open Command Prompt:
Click on the Start Menu button or press the Windows key on your keyboard.
Type cmd
into the search bar and open it.
Type the following command and press Enter:
Note: After running the command, you might not see any immediate feedback in the Command Prompt. This is expected behavior.
Open the generated key file
After generating the key file, you'll want to check its contents. To do this, use the following command in Command Prompt:
This command opens the popm-address.json
file in Notepad, allowing you to view or edit the generated key.
🟩 This is a beginner track.
This guide is tested to work with Solidity version 0.8.26. If you experience any issues, try setting this version explicitly in the Solidity Compiler tab on Remix.
Remix IDE is a powerful, open-source web application for developing, compiling, and deploying Ethereum smart contracts with ease.
In Remix IDE, start by creating a new file named HelloWorld.sol
.
The following contract is a basic example designed for interaction. Copy the code below and paste it into the file HelloWorld.sol
.
Select Compile HelloWorld.sol
button to use the Remix IDE's Solidity compiler. Check for any compilation errors and fix them.
Choose Injected Provider - MetaMask
under "Environment".
A pop-up from MetaMask will appear to confirm the connection. Select Next
.
Select Connect
Link to the relevant Hemi account in the "Account" drop-down.
Execute the deployment of your smart contract to the Hemi network directly from Remix IDE.
Uncheck Publish to IPFS.
Note: if you get a warning about Gas Limit, you may ignore it and proceed.
Select Deploy
Your MetaMask will pop-up to confirm the deployment of your smart contract. Select Confirm
🥳 Wohoooo! If successful you should see a ✅ in the console.
⚠️ If it fails, double check that the Solidity version in the compiler is the correct version.
The Hemi Virtual Machine (hVM) and Hemi Bitcoin Kit (hBK) power Hemi’s Bitcoin interoperability.
hVM is an indexed Bitcoin full node directly accessible inside the EVM.
hBK is a smart contract library running on Hemi that utilizes hVM and makes Hemi’s Bitcoin awareness easier to use.
hVM’s precompile calls and hBK's functions are subject to change in future versions of the Hemi testnet.
The Hemi Virtual Machine (hVM) and Hemi Bitcoin Kit (hBK) power Hemi’s Bitcoin Interoperability, empowering dApp developers to build novel Bitcoin dApps and robust interoperability infrastructure in a trustless, secure, and gas-efficient manner.
hVM: An indexed Bitcoin full node directly accessible inside the EVM, exposing data including transactions, address balances, UTXOs, and chain metadata to smart contracts on Hemi via custom precompiles.
hBK: A smart contract library running on Hemi that utilizes hVM and makes Hemi’s Bitcoin awareness easier to use by exposing higher-level functions that perform the precompile calls and handle the data marshaling, returning simple data structures developers can use in their dApps.
hVM and Bitcoin Kit are in development and experimental.
hVM’s precompile calls and Bitcoin Kit’s functions are subject to change in future versions of the Hemi Testnet.
Prior to mainnet launch, the protocols will ossify and future upgrades will only add new hVM precompiles and Bitcoin Kit functions, ensuring full backwards compatibility.
Because new versions of hBK are being developed and tested, this document will always contain the latest “stable” contract available on Hemi’s testnet.
In Mainnet, Bitcoin Kit contracts will be deployed as predeploys with special addresses like 0x8400000000000000000000000000000000000001, with new versions offering additional features being deployed at incremented addresses.
Latest Bitcoin Kit release on Hemi Testnet:
We recommend you use Solidity version 0.8.25 or later, but previous versions are also expected to work.
To follow along, you’ll need:
Metamask (or another Remix-supported web wallet) connected to Hemi testnet as a custom network;
A nonzero ETH balance tunneled over to a Hemi address in your wallet you want to deploy the demo contract with to pay deployment gas fees.
To start, open Remix, delete any existing contracts in the “contracts” folder,.
Create a new contract file, which for our example we’ll call “BitcoinBalDemo.sol”.
Paste in the following code:
You can now compile and deploy this contract, and try out calling it with a Bitcoin address string to see the address's balance (in satoshis) returned by hVM.
Ensure Node.js, Hardhat, and Solidity are set up correctly for effective ERC-20 token development and deployment.
Create a folder on your computer and name it TestToken
.
This folder will serve as your project directory, containing all the elements and code needed to deploy your ERC-20 token.
In your TestToken
project directory, open a terminal window and initialize a Node.js project
Install Hardhat along with the Ether.js plugin, and the OpenZeppelin contracts library.
a) Inside your Node.js project, start a Hardhat project
b) Select Create an empty hardhat.config.js
In the root directory of your project, create contracts
and scripts
folders:
In the contracts
folder, create a file named MyToken.sol
. This will be your ERC-20 token contract. Here's a basic example:
This code defines a simple ERC-20 token with an initial supply and basic ERC-20 functionalities.
Your private key provides access to your wallet and your funds. Never share your private key with anyone. Ensure this file is never shared or committed to version control.
a) Export your private key from MetaMask:
Open MetaMask, select your account icon, and go to Account Details
Select Show private key
Enter your password.
Select Confirm
Select the unlock button to reveal your password.
b) Install dotenv
package
c) Run the command touch .env
to create an .env
file in the root directory of your project.
d) Run the command nano .env
to open the CLI editor
e) Add your private key to the .env
file.
a) Open hardhat.config.js
in your project.
b) Configure Hemi Network
Add the required modules at the top of the config file
Add the Hemi Network settings inmodule.exports
. Ensure you include the network's URL, Chain ID, and the accounts array with your private key (stored in an environment variable for security).
Here's an example configuration:
In the scripts
folder, create a file named deploy.js
to write a script for deploying your contract.
This script is deploying MyToken
with an initial supply (customize the supply as needed).
Contract details we just deployed:
This guide explains how to verify smart contracts deployed on the Hemi blockchain using two methods:
Manual UI-based verification via Blockscout.
API-based verification using Hardhat.
Hemi RPC URL and deployed contract address.
Contract source code available (flattened only if verifying manually via the Hemi Blockscout UI).
Flattening a contract is necessary when verifying through the UI.
For Hardhat:
For Foundry:
Smart contract / Address
: Paste the address that your smart contract was deployed to.
Contract license
: Select 'No License' unless otherwise specified.
Verification method
: Choose Solidity (Flattened source code).
Is Yul contract
: Leave unchecked unless your contract is written in Yul.
Include nightly builds
: Select only if required.
Compiler
: Choose the exact version specified in pragma solidity X.X.X
in your code.
EVM Version
: Set to default unless you used a specific EVM version.
Optimization enabled
: Deselect optimization.
Copy and paste the entire flattened contract code into the Contract code field and click 'Verify & publish'.
Once all required details are entered, submit the form. BlockScout will compare the uploaded source code with the deployed bytecode. If they match, your contract will be verified.
To confirm verification, search for your contract address on BlockScout. A green check mark next to your contract indicates successful verification.
If you haven't already installed Hardhat and the verification plugin (adapted for Blockscout), run the following:
In your `hardhat.config.js
`, set up the Hemi network and include Blockscout API information for contract verification:
Once deployed, you can verify the contract using Hardhat’s `verify
` command. Make sure to include any constructor arguments if necessary:
The Hemi Bitcoin Kit smart contract provides utilities for interacting with Bitcoin data on the Hemi blockchain.
It includes methods to retrieve Bitcoin address balances, UTXOs, transaction details, and block headers.
The contract leverages hVM's new precompiles to perform Bitcoin-related queries.
This initial phase is focused on core Bitcoin protocol data:
Script/Address Balances
UTXO Set
Full Transactions w/ Output Availability
Transaction Confirmations
BTC Headers (Last and N)
Represents an unspent transaction output (UTXO).
Represents a Bitcoin transaction.
Represents a Bitcoin transaction input.
Represents a Bitcoin transaction output.
Represents details of a spent output.
Represents a Bitcoin block header.
The IBitcoinKit
interface defines the methods available for interacting with the BitcoinKit contract.
Retrieves the balance of a given Bitcoin address.
Precompile Address: 0x40
Precompile Address: 0x41
Retrieves UTXOs for a given Bitcoin address, page number, and page size.
Retrieves UTXOs for a given Bitcoin address, page number, and page size.
Precompile Address: 0x42
Retrieves the number of confirmations for a given transaction ID.
Precompile Address: 0x43
Retrieves the latest Bitcoin block header.
Precompile Address: 0x44
Precompile Address: 0x45
Retrieves the Bitcoin block header at a specific height.
These subgraphs only take a few minutes to set up and get running. To get started, follow these three steps:
Initialize your subgraph project
Deploy & Publish
Query from your dapp
Pricing: All developers receive 100K free queries per month on the decentralized network. After these free queries, you only pay based on usage at $2 for every 100K queries.
Here’s a step by step walk through:
You will then land on your subgraph’s page. All the CLI commands you need will be visible on the right side of the page:
On your local machine run the following:
You can copy this directly from your subgraph page to include your specific subgraph slug:
You’ll be prompted to provide some info on your subgraph like this:
Simply have your contract verified on the block explorer and the CLI will automatically obtain the ABI and set up your subgraph. The default settings will generate an entity for each event.
First run these commands:
Then run these to authenticate and deploy your subgraph. You can copy these commands directly from your subgraph’s page in Studio to include your specific deploy key and subgraph slug:
You will be asked for a version label. You can enter something like v0.0.1, but you’re free to choose the format.
You can test your subgraph by making a sample query in the playground section. The Details tab will show you an API endpoint. You can use that endpoint to test from your dapp.
Once your subgraph is ready to be put into production, you can publish it to the decentralized network. On your subgraph’s page in Subgraph Studio, click on the Publish button:
Before you can query your subgraph, Indexers need to begin serving queries on it. In order to streamline this process, you can curate your own subgraph using GRT.
When publishing, you’ll see the option to curate your subgraph. As of May 2024, it is recommended that you curate your own subgraph with at least 3,000 GRT to ensure that it is indexed and available for querying as soon as possible.
Congratulations! You can now query your subgraph on the decentralized network!
For any subgraph on the decentralized network, you can start querying it by passing a GraphQL query into the subgraph’s query URL which can be found at the top of its Explorer page.
The query URL for this subgraph is:
https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/HdVdERFUe8h61vm2fDyycHgxjsde5PbB832NHgJfZNqK
Now, you simply need to fill in your own API Key to start sending GraphQL queries to this endpoint.
In Subgraph Studio, you’ll see the “API Keys” menu at the top of the page. Here you can create API Keys.
This query shows the most expensive CryptoPunks sold.
Passing this into the query URL returns this result:
💡 Trivia: Looking at the top sales on [CryptoPunks website](https://cryptopunks.app/cryptopunks/topsales) it looks like the top sale is Punk #5822, not #9998. Why? Because they censor the flash-loan sale that happened.
Are you building the next killer Hemi application (hApp) or a service that adds value to Hemi's ecosystem? Fill out the form below to let us know what you're building and apply for a grant!
Want some inspiration? Check out the lists below for some of the projects we're most excited about.
If you don't see your idea on this list, we'd still love to hear what you're interested in building!
These are hApps that directly take advantage of Hemi's EVM-level Bitcoin awareness.
Non-Custodial BTC / BTC Asset DEXes
A decentralized exchange to trade Bitcoin or Bitcoin-based assets without requiring users to give up custody of their funds.
Non-Custodial Bitcoin Lending
A dApp to enable Bitcoin-based lending (either borrowing Bitcoin itself or using Bitcoin as collateral for other loans) without users giving up custody of their funds.
Bitcoin "smart wallets" with custom key manager sets
Users/smart contracts create Bitcoin wallets controlled by configurable validator sets and managed on Hemi; smart wallet owners can specify transactions that should be performed on Bitcoin from their wallet, and validators work together to sign and propagate on Bitcoin
Bitcoin "transaction forwarding"
A dApp where users/smart contracts can send tunneled BTC on Hemi to a liquidity provider, who then sends tunneled BTC to the sender’s specified destination.
Bitcoin MEV Marketplace / Tx Accelerator
A dApp where users can submit raw Bitcoin transactions or their hashes along with an attached reward (in $HEMI, $ETH, etc.), which will be paid out to the Bitcoin miner that includes their specified Bitcoin transaction in a block
Ordinals/Inscriptions "minting-as-a-service"
A service that facilitates the creation of Ordinals.
Any other novel Bitcoin dApp that benefits from introspection into Bitcoin data
These are hApps that utilize AI directly or provide services that AI developers want to use.
ZK-Verified MLaaS (ML as a Service)
Model owners authenticate their private models to Bitcoin via Hemi by publishing a hash of the model weights. Consumers select a model and send data to perform inference on, and the model owner computes the requested inference and returns the result along with a zero-knowledge proof demonstrating correct execution against the specified model.
Private FHE-based MLaaS
Similar to zk-verified MLaaS, but the model consumers send fully homomorphically encrypted input data, meaning the model owner can't see the consumer's data they are performing inference with.
Training Data Marketplace
Marketplace for users to buy and sell the rights to use different data sets for model training, producing a proof of data licensing authenticated to Bitcoin via Hemi. Optionally, ZK-verified training proofs could be employed to cryptographically prove that a model was only trained on licensed data.
Decentralized Machine Learning
Peer-to-peer marketplaces for buying computing power. Could either be generic compute purchasing, or AI-specific distributed training/inference protocols.
Portfolio Management Agents and DAOs
Autonomous AI agents that trade assets or perform other on-chain actions on Hemi for a user or group of users.
Crowd-Sourced Data Classification
Humans perform data classification/labeling on data so it can be used for machine learning, and are paid a reward if their classification is aligned with the majority of other users.
DEXes
Lending Markets
Payment Channels
Bridges
Yield Aggregators
Algorithmic Stablecoins
On-chain Games
NFT Projects
NFT Marketplaces
Real World Assets
Custom PoP miners
PoP mining embedded in a widely-used Bitcoin wallet
Hemi metrics/explorers/chain analytics
Improvements to existing services (explorer, portal, demo hApps, etc.)
Bitcoin timestamping services via Hemi
Oracles
Gas fees in the Hemi Network are paid using ETH, the network's native token.
This approach is similar to Ethereum Layer 2 rollups like Optimism, where gas fees are in their native bridged tokens.
In cryptocurrency networks, gas refers to the tokens used to pay transaction fees. These fees are essential for processing transactions and maintaining network security, compensating network operators for the real-world costs they incur.
For example, in the Bitcoin network, transaction fees are paid in BTC. Ethereum, on the other hand, uses ETH as gas. These fees serve the same fundamental purpose across different blockchains but are paid in the respective network's native tokens.
The Hemi Network adopts a method akin to Ethereum Layer 2 rollups by using ETH as its gas token. This strategy enhances compatibility and user-friendliness, particularly for those accustomed to Ethereum's system.
To interact with the Hemi Network, users can obtain ETH and tunnel to Hemi. This ensures a seamless and efficient means for users to engage with the Hemi Network's services.
Smart contracts on Hemi can access Bitcoin data by calling the hVM precompile contract.
Future protocol upgrades will add additional precompile calls to provide additional information.
Smart contracts on Hemi can access Bitcoin data by calling the hVM precompile contract addresses, which query the deterministic TBC node running inside the EVM.
Future protocol upgrades will add additional precompile calls to provide additional information like Bitcoin fee levels, Bitcoin block construction information, and popular metaprotocols like Ordinals, BRC-20s, and Runes.
🌐 Overview
Oracles play a critical role in bridging the gap between blockchain and the external world, enabling smart contracts on Hemi to access trustworthy off-chain data necessary for various use cases.
The most common applications of oracles include:
Providing up-to-date token prices for different pairs, which is essential for DeFi protocols and financial products.
Enabling dynamic NFTs that can change their properties based on real-world events, adding a layer of interactivity and uniqueness.
Oracles operate using two primary models:
Push Model: In this traditional approach, the oracle regularly pushes data to an on-chain contract, which dApps can access as needed.
Pull Model: This newer model involves oracles signing data and keeping it on an external network. When dApps need updated data, users pull the signed data and submit it on-chain with their transaction.
Pyth offers push-based price feeds for Hemi.
Hemi Mainnet
Hemi Sepolia
Redstone offers push-based price feeds for Hemi.
Hemi Mainnet
Hemi Sepolia
Stork offers pull-based price feeds for Hemi.
Hemi Mainnet
eOracle offers pull-based price feeds for Hemi.
Hemi Mainnet
Once your submission is received, our team will review it within 2 business days. We take every inquiry seriously and evaluate each on its merits.
If You Don't Hear From Us: Should 2 business days pass without a response, it might indicate that your proposal isn't the right fit for us at the moment. This doesn't reflect your proposal's value; rather, it might not align with our current needs or focus areas.
Encouragement to Reapply: We understand circumstances and offerings evolve. If you're still interested, please consider reapplying in 2-4 weeks. Your future proposals might align better with our changing needs.
If Your Inquiry Matches Our Needs: For inquiries that align with our goals and capabilities, expect to hear from us within the specified review period. We're excited about partnering with entities that complement our mission and enhance our offerings.
In this article, you’ll find useful contract addresses for Hemi Mainnet, Hemi Sepolia, and commonly used protocols.
Core Hemi contracts deployed on Ethereum Mainnet.
Core Hemi contracts deployed on Hemi.
Commonly used utility contracts deployed on Hemi.
Core Hemi contracts deployed on Sepolia.
Core Hemi contracts deployed on Hemi Sepolia.
Commonly used utility contracts deployed on Hemi Sepolia.
This page features the official Hemi logos, wordmarks, and colors for media use.
The Hemi Logo is comprised of the Hemi Symbol and the Hemi Wordmark.
The Symbol may be used independently of the Wordmark, but the Symbol must always accompany the Wordmark.
On Hemi Orange or colored backgrounds, use either the fully white or full black variation of the logo to achieve the highest level of visual contrast.
To maintain visual effectiveness, use either the brand color (Hemi Orange + black) or black on a light background.
Use either the brand color (Hemi Orange + white) on a dark background.
H1, H2, H3
Letter Spacing: -2%
Links, Paragraphs
Letter Spacing: -2%
We want to maintain consistency for some core brand assets, our logo being one of them. So please, no rotations, drop shadows, effects, manipulations, or pairing with other logos and icons. Keep it simple.
Do not disclose vulnerabilities publicly or by executing them against a production network. If you do, you will not only be putting users at risk, but you will forfeit your right to a reward. Always follow the appropriate reporting pathways.
The Hemi Bitcoin Kit (hBK) is a library of smart contracts for developers to use to build Bitcoin-aware smart contracts.
The hBK abstracts away the complications of interacting directly with the hVM Precompiles; parsing query results into data structures that are easy to understand and use.
The Hemi Bitcoin Kit (hBK) is a set of smart contracts designed to bridge the Ethereum and Bitcoin blockchains, enabling developers to build Bitcoin-aware dApps on an EVM with full access to Ethereum assets and the cross-chain data calls that ETH L2s provide.
The hBK abstracts away the complexities of dealing directly with hVM's low-level precompile contracts.
The hVM is based on the Ethereum Virtual Machine (EVM) and comes stocked with built-in precompiles to interact with the embedded Bitcoin full node.
Unlike other Bitcoin interoperability solutions, Bitcoin-aware smart contracts built using hBK don't rely on any external relayers, require gas-intensive proof validation, or suffer from limited views of Bitcoin's state.
Performing a query for Bitcoin data is just as easy as reading the state of other contracts in the EVM. No need to design complex smart contracts that register requests to handle after the requested data is relayed.
Pre-validated data directly available in the EVM significantly reduces both the complexity and cost of developing and maintaining Bitcoin-related applications
The Hemi Bitcoin Kit brings five benefits to developers:
Easier development: Access to a wide range of Bitcoin data is just one smart contract call away.
Rich data: Access Bitcoin state like UTXOs and balances that is impractical or outright impossible to get with other solutions.
Security and reliability: dApps get immediate information about any relevant events on the Bitcoin blockchain without having to rely on third-party relayers or trusted oracles.
Composability: Anyone can design new layers of Bitcoin DeFi infrastructure for others on which to build.
Cost-effectiveness: The hVM uses far less gas than other approaches and there's no need to incentivize third-party bots to watch for and relay events.
Some examples of unique applications that the Hemi Bitcoin Kit enables:
Custom Bitcoin tunnels: Connect chains to the Bitcoin network using customized security, cost, and speed settings.
Trustless BTC staking and re-staking protocols: 99% of BTC is unbridged and/or unproductive. With Hemi, BTC can be used to secure networks and earn yield.
Bitcoin-authenticated AI-model marketplaces: As an example of an AI use case, model owners can publish Bitcoin-secure hashes of their model weights, timestamping them to the Bitcoin blockchain.
Multichain DAOs: Hemi DAOs operate across both Bitcoin and Ethereum, making decisions based on the collective input of stakeholders from both communities.
Learn how to develop and deploy a HelloWorld smart contract on Hemi using .
🟢 Easy
Learn how to deploy an ERC-20 token on Hemi using .
🟢 Easy
Verify a smart contract on Hemi using Hardhat, Foundry, or the Blockscout Explorer UI.
🟢 Easy
Learn about the and interact with our precompiles.
🟢 Easy
Deploy a small contract in with a single method which calls the Bitcoin Balance precompile and returns the balance.
🟢 Easy
In this tutorial, we will utilize , a versatile, open-source web-based platform, to develop and deploy our smart contract onto Hemi testnet.
Earn and track Hemi for completing this tutorial!
The address you choose to connect MUST have some ETH (recommended at least 0.01 ETH) to pay for contract deployment fees. Refer back to earlier documentation to with ETH.
Latest hBK release on Hemi testnet:
(Updated October 11th, 2024)
In this section, we’ll deploy a small contract in with a single method which calls the Bitcoin Balance precompile and returns the balance as a uint256.
This tutorial guides you through deploying an ERC-20 token using , a comprehensive Ethereum development environment. Hardhat is recommended for its powerful features, but you can also use other Ethereum development tools like .
Earn and track Hemi for completing this tutorial!
Download (or any other IDE)
Install or update it to
To view the details of your deployed contract, enter the contract address from your success message into the . This will provide you with information about the contract's transactions and state.
Go to Hemi Blockscout Explorer and navigate to the page.
If you encounter the following error, visit the and search your contract address to confirm verification:
extension for the .
helper!
wrappers!
Latest hBK release on Hemi testnet:
Getting historical data on a smart contract can be frustrating when you’re building a dapp. provides a decentralized option to query smart contract data through APIs known as subgraphs, which utilize GraphQL. The Graph’s infrastructure relies on a decentralized network of indexers, enabling your dapp to become truly decentralized.
Go to the and connect your wallet. Once your wallet is connected, you can begin by clicking “Create a Subgraph”. It is recommended to use Title Case: “Subgraph Name Chain Name.”
Here’s an example from the by Messari:
To explore all the ways you can optimize & customize your subgraph for a better performance, read more about .
For more information about querying data from your subgraph, read more .
To interact with the Hemi Network, users can obtain ETH (or claim through the faucet in our ) and to Hemi.
🔍
Coming Soon (Join to See Updates)
For hVM precompile contract addresses, visit the .
For a list of all token contract addresses deployed on Hemi, visit .
For hVM precompile contract addresses, visit the .
For a list of all token contract addresses deployed on Hemi Sepolia, visit .
Coming Soon (Join to See Updates)
This page describes general best practices for reporting bugs and specific reporting guidelines for Hemi code contained within the organization.
If you think you have found a significant bug or vulnerability in any Hemi smart contract, application, infrastructure, etc., please report it on the .
HackerOne hosts Hemi's dedicated . Contact to get involved and learn more about the information relating to components in scope, reporting, and the payout process.
For other security-related questions or concerns, please contact .
Latest hBK release on Hemi testnet:
BtcBalAddr
0x40
Gets the balance of an address in satoshis. Supports all address formats: P2PKH, P2SH, P2WPKH, P2WSH, P2TR.
BtcUtxosAddrList
0x41
Gets the list of Unspent Transaction Outputs (UTXOs) for an address. Supports pagination.
BtcTxByTxid
0x42
Gets parts of a Bitcoin transaction by its TxID. The caller can specify which part(s) of the transaction to return using packed bitflags to increase gas efficiency by dropping unnecessary data.
BtxTxConfirmations
0x43
Gets the number of confirmations a specified transaction by TxID has.
BtcLastHeader
0x44
Gets the most recent Bitcoin header known by hVM.
BtcHeaderN
0x45
Gets the canonical Bitcoin header at height N.
BtcAddrToScript
0x46
Converts a Bitcoin address to its corresponding script representation. Supports all address formats: P2PKH, P2SH, P2WPKH, P2WSH, P2TR.
AddressManager
0xA5F37791378c55941a52B4dCb70Be4D8D09f5e43
AnchorStateRegistryProxy
0xF44007EAF2faFdD8bA8d3551F23CD2b879F54677
DelayedWETHProxy
0xc5627348Dbc9179cFb5a24C8199635770Ea575A3
DisputeGameFactoryProxy
0x5442d0ddB33B396879D2d016A9ad09ad122562C3
L1CrossDomainMessengerProxy
0xF005dFb08377faD44588Af68d0884D272A6fb050
L1ERC721BridgeProxy
0xa446331bD28cbe0186A983a27C528f566B6bedE0
L1StandardBridgeProxy
0x5eaa10F99e7e6D177eF9F74E519E319aa49f191e
L2OutputOracleProxy
0x6daF3a3497D8abdFE12915aDD9829f83A79C0d51
Mips
0x42Ff661af011939f699D67bd021d237eBcBA9c2A
OptimismMintableERC20FactoryProxy
0x0262fEDC4A98f94dDB90CeF0E058644d8409342C
OptimismPortalProxy
0x39a0005415256B9863aFE2d55Edcf75ECc3A4D7e
OptimismPortal2
0x04dcfE50e43823A1D8f6e3Fbb8af10BfB7Ebb634
PreimageOracle
0x613F36BE58Ba712B37474F4B82484D680D24ed20
ProtocolVersionsProxy
0x13Cb1B6e69Ec8fF6a5C8823d1e8dc78CCCf3Ce48
ProxyAdmin
0xbE81A9D662422f667F634f3Fc301e2E360FeFB30
SafeProxyFactory
0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2
SafeSingleton
0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552
SuperchainConfigProxy
0x15144FB8621cB3c4ED3DB223c173ffb58C8D2aB8
SystemConfigProxy
0x5ae68684D9179A8053883f1Df599Ea7Fb35303c3
SystemOwnerSafe
0x8434dc705e4B729405Dd66C94DfC62bc3825Ea69
BitcoinKit v0
TBD
The Ethereum Virtual Machine (EVM) serves as a global, decentralized computer designed to execute smart contracts.
The Hemi Network offers seamless compatibility with the EVM, allowing it to not only execute Ethereum-based smart contracts directly but also facilitate interactions among various smart contracts across networks.
The Hemi Network also extends this compatibility to Bitcoin through a protocol-level awareness of the state of the Bitcoin network.
The Ethereum Virtual Machine (EVM) represents a cornerstone of blockchain technology, functioning as a distributed computational engine that executes smart contracts. These contracts are self-executing agreements with the terms directly written into code, enabling a wide array of decentralized applications (DApps). The Ethereum network's primary role is to maintain the operational integrity and accessibility of the EVM, ensuring a trustless environment for executing these contracts.
On the innovative front, the Hemi Network emerges as an EVM-compatible Layer 2 (L2) solution, architecturally designed atop Ethereum's foundation.
This compatibility empowers the Hemi Network to directly execute smart contracts developed for the Ethereum ecosystem and establish communicative bridges with other EVM-compatible smart contracts, fostering an interconnected blockchain environment.
Through a deep, protocol-level insight into Bitcoin's state, the Hemi Network facilitates the creation and execution of EVM-compatible smart contracts that can interact with Bitcoin. This expands the utility and applications of smart contracts and tunnels the capabilities of Ethereum with the robust security and widespread adoption of Bitcoin, marking a significant advancement in blockchain interoperability and functionality. 🤝
WETH9
OptimismMintableERC20Factory
OptimismMintableERC721Factory
L2StandardBridge
L2ERC721Bridge
0x4200000000000000000000000000000000000014
AddressManager
L1CrossDomainMessengerProxy
L2OutputOracleProxy
OptimismPortalProxy
ProtocolVersionsProxy
DisputeGameFactoryProxy
L1StandardBridgeProxy
OptimismMintableERC20FactoryProxy
ProxyAdmin
L1StandardBridgeProxy
L1ERC721BridgeProxy
SystemConfigProxy
L2ToL1MessagePasser
L2CrossDomainMessenger
L2StandardBridge
L2ERC721Bridge
SequencerFeeVault
OptimismMintableERC20Factory
OptimismMintableERC721Factory
L1Block
GasPriceOracle
ProxyAdmin
BaseFeeVault
L1FeeVault
GovernanceToken
SchemaRegistry
EAS
BitcoinKit v0
Website
Docs
Portal
Discord
X (Twitter)
Blog
Farcaster
Partnership Application
Referral Program
Grant Application
tba
Move your BTC to Hemi by using the Bitcoin Tunnel, enabling interactions within the Hemi Network ecosystem with Bitcoin assets.
A minimum of 0.0001 BTC
is required to deposit and withdrawal using the Native Tunnel.
Acquire BTC - BTC can be purchased on any number of exchanges and on-ramps.
Click 'Connect Wallets'
in the top-right corner of the Hemi Portal.
Currently, MetaMask and Rabby are the only EVM wallets Hemi supports. Our team is working to add support for additional wallets.
Ensure that you are connected to the Bitcoin network.
Input the amount of BTC you wish to tunnel to Hemi. There is a minimum amount of 0.0001 BTC
to deposit and withdrawal.
After you have confirmed the gas fee and wish to proceed with the deposit, click 'Deposit.'
Confirm your BTC deposit in the UniSat browser extension.
Your transaction has been initiated and must go through two confirmation periods to confirm your deposit:
Withdrawal from BTC address (~1hr) - When you initiate a deposit request, a transaction is signed from your BTC address to transfer the specified amount into a secure vault on the Bitcoin network. This deposit requires six block confirmations, which generally takes about one hour to complete.
Deposit into EVM Hemi address - Once the deposit is fully confirmed on the Bitcoin network, the Hemi Network validates the transaction and mints a corresponding token receipt (hemiBTC
) on the Hemi blockchain, ensuring a seamless transition of assets.
You can check the status and view the transaction in the 'Transaction History'
tab.
hemiBTC
can be tracked and added to your wallet at the following contract address: 0xAA40c0c7644e0b2B224509571e10ad20d9C4ef28
After six confirmations, Hemi can confirm a successful deposit from the Bitcoin network and deposit the funds to your address. Occasionally, the vault operator will require a manual confirmation in order to complete the deposit.
Hemi’s hVM is an EVM upgraded with Bitcoin awareness.
The Hemi network maintains an EVM-visible Bitcoin node using Hemi’s custom “Tiny Bitcoin” (TBC) daemon.
A “Processed Bitcoin View” synchronizes all Hemi nodes as part of the EVM state transition.
Hemi’s hVM is an EVM upgraded with Bitcoin awareness via new precompile contracts that smart contracts can call to get data from the Bitcoin node embedded in the EVM.
The Hemi network maintains an EVM-visible Bitcoin node using Hemi’s custom “Tiny Bitcoin” (TBC) daemon. TBC syncs with the regular Bitcoin network over P2P and indexes Bitcoin blocks up to the height specified by the protocol.
When a Hemi Sequencer creates a block, they can optionally include an additional “Bitcoin Attributes Deposited” transaction communicating one or more new Bitcoin headers to the Hemi protocol.
When these transactions occur, all nodes on the Hemi network process these Bitcoin blocks at the same Hemi block height creating a “Processed Bitcoin View” synchronized across all Hemi nodes as part of the EVM state transition.
This synchronization ensures execution of all Bitcoin-aware smart contracts are deterministic across all nodes.
To expose Bitcoin data to smart contracts, hVM introduces a number of new precompile contracts accessible in the EVM which fetch the latest data from the Processed Bitcoin View maintained by the embedded TBC node at the time the request is made.
tHEMI is the testnet governance token for the Hemi Network. Initially, tHEMI tokens are used for payouts to PoP miners to acknowledge their contribution to the network's security and functionality.
Looking ahead, tHEMI will play a broader role in rewarding other network participants, including Sequencers, Publishers, and Challengers, who contribute to the network's resilience and growth. tHEMI is set to become the preferred gas token on the network, offering fee discounts and enhancing user transaction efficiency.
Navigate to Tokens
Import Tokens
Type in the tHEMI token contract address 0x4200000000000000000000000000000000000042
into the Token Contract Address
field.
If the address is recognized, MetaMask will automatically populate the Token Symbol
and Decimals of Precision
fields.
Confirm the accuracy of the provided information, click on Add Custom Token
, and then select Import Tokens
.
Your tHEMI tokens should now be visible in your MetaMask wallet. You can view your balance and conduct transactions directly within the wallet interface.
Safe is a smart contract wallet that requires a minimum number of people to approve a transaction before it can occur (M-of-N).
To get started, connect your wallet to the Safe site. For this tutorial, we will be using MetaMask.
After connecting your wallet, you will be prompted to name your Safe account.
When you are ready to proceed, click 'Next'
.
A Safe Wallet can be set up as a multi-sig wallet, whitelisting addresses who may sign transactions on behalf of the wallet. You may assign a name to each address you intend to add to the wallet.
After adding additional signers, you may specify how many signers are required to sign any given transaction. This variable is referred to as the Threshold.
After finalizing the verified signers and threshold requirements, click 'Next'
to proceed.
Review and verify the network, name, signers, threshold, and estimated network fee to create your Safe account.
After confirming all given information, click 'Create'
to proceed.
Confirm the recent transaction via your MetaMask wallet.
Your Safe Wallet is ready for use! You may add funds to your wallet and explore sending and receiving assets.
An and wallet are required to move BTC assets via the Bitcoin Tunnel.
- Set up your EVM wallet and add Hemi Network.
- Set up your BTC wallet.
TESTNET ONLY If you plan on developing on or interacting with Hemi testnet, alternative prerequisites may apply. To test out the Bitcoin Tunnel on testnet, you can obtain tBTC (Testnet Bitcoin) via the .
Go to to access the Hemi Portal.
Connect your BTC wallet (currently only UniSat supported). If you do not have a UniSat wallet, you can view our to create and set one up.
Earn and track Hemi for completing this tutorial!
Key features include:
Developers can easily integrate Bitcoin data into dApps without external services, simplifying Bitcoin-aware application development.
This demo app provides a user-friendly interface for querying Bitcoin information.
By abstracting the complexities of interacting with Bitcoin data, the app allows developers to seamlessly retrieve and use Bitcoin blockchain data in their dApps without needing external services.
This makes it an effective resource for experimenting with Bitcoin-aware applications and understanding hBK’s capabilities within the Hemi ecosystem.
To follow along, you’ll need:
Nothing!
Retrieves the current balance (in satoshis) of a specified Bitcoin address.
Verifying our Output
Returns the latest Bitcoin block header containing metadata like hash, height, and timestamp.
Verifying our Output
Fetches the block header for a specific block height.
Verifying our Output
Fetches the details of a Bitcoin transaction using its transaction ID, including all of its inputs and outputs.
Verifying our Output
Retrieves the number of confirmations for a specific transaction based on its transaction ID.
Verifying our Output
Returns the UTXOs (Unspent Transaction Outputs) of a Bitcoin address, with pagination support.
Verifying our Output
To contact the Hemi team, please use one of the following methods:
We gotchyu! Let us know how we can help!
The enables seamless interaction with Bitcoin data in an Ethereum-compatible environment.
Query .
Retrieve the or specific .
Fetch and
(Unspent Transaction Outputs) for a Bitcoin address.
The is a tool designed for developers to interact with Bitcoin blockchain data directly from an Ethereum-compatible environment.
Navigate to and input the Bitcoin address to confirm the above output.
Navigate to and input the Block header to confirm the above output.
Navigate to and input the Block header height to confirm the above output.
Navigate to and input the transaction ID to confirm the above output.
Navigate to and input the transaction ID to confirm the above output.
Navigate to and input the Bitcoin address to confirm the above output.
Join our and send a message in the #help channel
about verifying smart contracts deployed on Hemi.
Capsule is an asset transfer protocol that allows anyone to batch and transfer multiple assets in a single package on Hemi. Additionally, it provides users and developers with advanced functionality like gasless transactions, re-routing/recalling, and configurable security. Learn more about Capsule Labs by visiting the Capsule .
You can find the partnership inquiry form .
Read our review process in .
Have more questions or concerns? E-mail support@hemi.xyz or