By Karim Halabi at Messari
- Harmony has developed a trustless BTC-to-Harmony bridge leveraging XCLAIM as the design framework. The bridge is most closely associated with the light client and relay model as defined by Dmitriy Berenzon.
- BTC is locked in Vaults on the Bitcoin network, with Vault Operators providing collateral in the form of the ONE token. Relayers, who monitor the Vaults for transactions, also must provide ONE collateral.
- Fee payments are made to both Relayers and Vault Operators, encouraging broad participation from different entities. Both Relayers and Vault Operators may be slashed if they fail to meet their Service Level Agreements (SLAs).
- In the future, there is potential for a new token to govern the bridge and its parameters.
With the release of Harmony’s new trustless BTC bridge comes another opportunity for BTC hodlers to put their BTC to work and participate in DeFi without liquidating any precious sats.
Smart contracts are extremely difficult to build with Bitcoin Script as it is intentionally more limited - helping make Bitcoin a more secure and resilient network. Ethereum, on the other hand, came along and made tradeoffs to achieve greater smart contract functionality and Turing completeness, which is why application development and DeFi originally blossomed there, but also why contract exploits are prevalent. ‘Turing completeness’ means that creating anything within that system is theoretically possible, as long as you can break it down into logical steps. Smart contracts and the sprawling world of Web3 are an example of this: where we are limited only by our imaginations (and making these bits of code gas efficient). Since Bitcoin does not have smart contracts, it is more challenging to create conditioned and complex transactions. This makes programmatic custody of bitcoin and bridging it to other blockchains trustlessly quite a tall task. Today, the vast majority of BTC used on other chains is via centralized custodians.
This report will examine a trustless BTC bridge, the Harmony BTC bridge to be exact; a new product within the Harmony ecosystem. It is designed to be secure and completely trustless. The bridge operation, economics, and risks will be evaluated as well as the implications of BTC functioning on an Ethereum Virtual Machine (EVM) compatible network.
A Quick Primer on Harmony
Harmony is a sharded, fully Ethereum Virtual Machine (EVM) compatible blockchain that utilizes an innovative consensus mechanism called Effective Proof-of-Stake (EPoS). Unlike ‘traditional’ PoS, in which the right to validate the next block is awarded via lottery or bidding, EPoS encourages decentralization by introducing a non-linear relationship between the amount of tokens staked and the chances of mining the next block. In other words, more tokens staked does not equal more rewards. Thus, stakers cannot harness economies of scale.
Harmony is also home to a burgeoning DeFi ecosystem, with TVL increasing more than four-fold in the past two months to reach over $1 billion. The majority of the TVL (60%) comes from game/DEX/NFT marketplace DeFi Kingdoms. The next biggest application by TVL is Tranquil Finance, commanding nearly $500 million.
Bridges Walked, So That Alt Chains Could Run
Throughout 2021, the rise of L2s and many alternate L1s with liquidity incentives has meant that mercenary capital has moved from and across chains. Over $25B of value bridged across Ethereum is a testament to this.
Bridges are the vital piece of the puzzle that facilitate the movement of capital. Different chains are better suited for different uses, and bridges help them become interoperable. Different protocols have different rules and standards, which means tokens you can use on one chain are not usable on another. Bridges allow the use of tokens on new chains. This is achieved via ‘wrapping’, where a token is burned or locked in escrow on one chain, and an equivalent, ‘wrapped’ token is issued on the new chain.
Thus, if Bob has 10 tokens on the blue blockchain and wishes to move three to the red blockchain, he can lock three of the tokens on the blue blockchain and mint three wrapped tokens on the red blockchain. Bob still has 10 tokens; it's just that three are now wrapped and can be used in a new environment.
Harmoniously Bridging BTC
The Harmony BTC bridge enables the wrapping of BTC for use on the EVM-compatible Harmony blockchain. Bridging Bitcoin and Harmony has potentially significant implications for the Harmony ecosystem: BTC is a massive asset, with an average market cap of just under $1 trillion over the last six months. If it can be deployed on another chain for yield and other uses, it may mean considerable increases in TVL and network activity.
Activity and use of blockchains is the whole raison d’etre after all; increased usage and the growth of the network is therefore a tremendous victory for any protocol.
At the time of writing, Harmony TVL stands at over a billion in USD terms. The ability to bridge over an asset worth ~$1 trillion could substantially increase TVL and the value of the Harmony network.
What must be mentioned is that a secure bridge to Harmony is a win for all EVM chains and BTC holders. The use of the Ethereum Virtual Machine is, in effect, a standard that many different chains use. This universality dramatically reduces the complexity of using bitcoin on other EVM chains, as sharing standards make bridging tokens easier.
Subsequently, bitcoin hodlers may also benefit from opportunities that lie beyond Harmony, exploring pastures anew on other chains as well.
One of the main reasons bitcoin hodlers may not wish to use BTC anywhere else is because they do not wish to take on any counterparty risk, and many existing bridges do not operate in a truly trustless way. After all, one of the main theses behind the creation of Bitcoin is the elimination of trust and reliance on third parties. Trustless bridges aim to eliminate these concerns and enable the use of BTC in smart contracts without sacrificing any of the decentralized cypherpunk ethos.
On paper, the economic incentives of the Harmony BTC bridge do mean it is trustless. Should this be achieved in practice as well as theory, this bridge could be the decentralized gateway for BTC into the EVM world.
According to DeFiPulse, the only trustless BTC bridge is tBTC. However, of the ~330,000 BTC deployed on other chains, 79% is done through the custodial wBTC.
The caveat is that representing this data depends upon an awareness of all active BTC bridges and discerning which UTXOs are locked in various vaults or pools to back bridged coins. However, this is not always possible, as represented by Shinobi, the bridge to Secret Network. The actual number of BTC active on other chains may be higher than reported.
Since bitcoin can be deployed on Harmony, many users may be attracted as the Big Orange Coin can now be deployed for yield on various DeFi protocols.
When on Harmony, BTC is represented as 1BTC.
They are not inherently of equal value. No algorithmic price peg is used; it is simply a supply peg. This means that BTC can always be redeemed 1:1 with 1BTC (plus fees) and vice versa regardless of any price premiums. Thus, game theory dictates that the market will keep the peg by arbitraging any differences.
How Does the Bridge Work?
On a very high level, BTC on the Bitcoin blockchain is first locked in a vault. This transaction is verified in a trustless manner through a relayer and enables the minting of 1BTC on the Harmony blockchain. On the way back, the 1BTC is burned - which is verified and gives the right to redeem the originally locked BTC from the vault on the Bitcoin blockchain.
The XCLAIM protocol is used as a framework for the bridge. It is a protocol that defines functions for wrapped tokens backed by assets on the original chain. Further information on the protocol and its inner workings can be found here.
In more depth, when BTC is being bridged, it is locked in vaults on the Bitcoin blockchain. Coins are stored until being redeemed. Thus, they act as backing for the newly issued 1BTC and give it its value.
Anyone is supposed to be able to operate a vault should they wish: the process involves registering the vault and running a vault client. This is designed to be easy and profitable to attract more vaults and improve decentralization.
In order for the bridge to be trustless, the vault operators are required to post collateral in the form of ONE tokens - the collateral required is currently 150%. This ensures that they have a strong enough disincentive to run away with the BTC. If BTC is spent without authorization, or the vault goes offline and cannot provide service temporarily, punishments are enacted.
Relayers monitor the vaults to see if any unauthorized transactions take place. They also monitor the Bitcoin blockchain for proof that UTXOs have been locked in a vault. They store BTC block headers on Harmony and enable the 1BTC issuing contract to see whether an issuer has made the transaction they claim to have made on the BTC blockchain. Relayers, like Vaults, must post collateral in ONE that is liable to be slashed in the event of malicious behavior.
Fees are paid to both of these types of actors to incentivize participation from a network of actors to avoid having just one Relayer and Vault operated by the Harmony team. Trustlessness may only be achieved through decentralization after all.
An oracle is used to determine the price of ONE relative to BTC. This is how the 150% collateral required is monitored. Currently, this source of information is the only component that is not decentralized - the bridge assumes that the oracle is trustworthy. However, the Chainlink integration is now implemented, and the source of price feeds will now be as decentralized as the Chainlink network.
According to the Harmony team, further steps are being taken to mitigate price feed risk. The staked relayers can also submit price feeds used to benchmark the oracle price and determine whether there is a difference between them that is greater than 0.5%. If price fluctuations between two price feeds are greater than 10%, additional measures are taken.
Describing the bridge with a practical example:
Bob wishes to use his BTC for yield farming on the Harmony blockchain.
- Bob selects a vault, sends his BTC to it, and includes his Harmony address.
- Once this transaction is verified, a relayer submits proof of inclusion in the Bitcoin block to the Harmony chain.
- This proof allows Bob to mint 1BTC, which is sent to the Harmony address he submitted with the BTC transaction.
- Bob can now use his newly issued 1BTC to get some fat, juicy yields.
If vaults go offline or fail to provide users service, they are slashed between 10% and 30%. The severity of the punishment is determined by each actor's score, or SLA (Service Level Agreements). The SLA is a number between 0 and 100. The score is increased by good behaviors and service and reduced by subpar performance and crashes. The higher score a vault has, the higher rewards it receives, and the less it is penalized if it fails to provide service. Both Vaults and Relayers have SLAs.
The reasoning for this is because extreme punishments for first-time offenders may deter actors from participating as vaults. Hence this reputation system is used to give vault operators a history and credibility they can use to escape hefty fines should they fail for any reason beyond their control. If Vaults fail to provide adequate service, their collateral is awarded to the depositor who has lost their BTC. If Relayers are slashed, the tokens are sent to the fee pool.
These fees are distributed to incentivize the vault operators and Staked Relayers to provide this essential service that allows the bridge to operate in a trustless manner.
Users pay a fee of 0.5% for using the bridge and minting/redeeming 1BTC - paid in 1BTC. These fees are paid to fee pools, and distributed across Relayers and Vaults according to their SLA. Furthermore, direct fees are paid to Vaults and Relayers directly for their service. There is also a security deposit paid, regardless of the amount bridged, that is equal to 0.5% of the amount of collateral required to back the requested BTC transfer. In addition, all slashed stakes (penalties for downtime/bad service) are also sent to these pools.
Essentially, using a permissionless network of vaults and relayers means that the bridge can operate in a truly censorship-resistant way. The fee model is the final puzzle piece that makes the bridge work. If all stakeholders act in a game-theoretic way, and if there are enough stakeholders to make it sybil resistant: the bridge functions.
As with many projects, certain aspects of the project are fixed initially, and the team reserves control over them to remain agile and make quick decisions. Future plans and developments revolve around the economics and the governance and control of the bridge.
- The current security deposit fee for locking BTC in a vault is a single ONE token. This could change to be a percentage of the vault’s collateral.
- Move to a fee market instead of the fixed 0.5% minting and redeeming fees.
- There are plans to introduce a token in a future release.
- This will likely be used for decentralized governance of the bridge and its specs/fees.
- The release of a token will also probably lead to revised tokeneconomics.
As laid forth in an excellent medium article by Dmitriy Berenzon: there are three main categories of bridges. Any given bridge can fall into one of the classifications or combine elements of each.
The 1BTC bridge is one of light clients and relays. As can be seen on the above graph, it excels in capital efficiency, statefulness, and security. The economic incentives of the bridge ensure that the federation of Staked Relayers maintains connectivity and statefulness. In addition, Vaults are incentivized to provide timely service.
However, two areas of weakness are capital (in)efficiency and security.
The staked tokens by Relayers and Vaults and the BTC collateral posted by users is just that: fixed capital that sits there hostage to disincentivize antisocial behavior. Although a robust mechanism that aligns incentives, this capital is not used for liquidity or put to work in any way.
Capital inefficiency is not a sin per se; it just means that the utilization of resources could be more efficient. In addition to that, it could hamper scalability, as collateral must increase proportionally with value bridged. Since collateral required to bridge BTC is 150%, the amount held in vaults must always be 10% greater than 1BTC in existence. Of course, these are design tradeoffs made in the name of speed and aligned economic incentives.
A chain is only as strong as its weakest link. In the world of crypto and blockchain, this usually translates to the layer of the stack that is most centralized. In the case of the bridge, it is the reliance on the price oracle whose trustworthiness is assumed.
This oracle dictates the price of ONE/BTC. Since ONE is the collateral used by Vaults and Relayers, the price dropping below a certain threshold relative to BTC can trigger liquidations/slashing. Theoretically, should the oracle be manipulated (a common exploit) to give false prices, these conditions may be falsely met.
Chainlink Oracles have now been integrated and will provide a price feed not dependent upon a single oracle. Thus the oracle risk will be mitigated by making this link of the chain as censorship resistant as Chainlink’s network.
Concluding Remarks: Chains Existing in Harmony
Ultimately, the Harmony BTC bridge uses a network of vaults and relayers. The architecture is decentralized in theory, but it is yet to be seen whether the existing incentives are enough to galvanize different actors into participation to achieve decentralization.
The merits, as well as the risks of the design, have been examined, and the undeniable importance of bridges mentioned. The multi-chain world is not an idea; it is a reality. Different chains are optimized for different purposes. Numerous blockchains today boast impressive activity and value locked. However, issues arise due to clashing ideologies, standards, and the fragmentation of liquidity and information.
The future of dapps and UX is not one where users manually select which chain to transact on; it is one where users are unaware of which underlying blockchain is being used to interact with Web3. Users may even be using multiple simultaneously - one for verification, another to sign transactions, and yet another for settlement with finality.
Frictionless bridges and communication between blockchains can enable this vision of the not-so-distant future. The continuing development and decentralization of these services are vital to an internet run on blockchains. The new Harmony-Bitcoin bridge is another step towards this future, where information and value are seamlessly and trustlessly interoperable across chains.
Bridging BTC to Harmony's Ethereum Virtual Machine
Key Takeaways Harmony has developed a trustless BTC-to-Harmony bridge leveraging XCLAIM as the design framework. The bridge is most closely associated with the light client and relay model as defined by Dmitriy Berenzon. BTC is locked in Vaults on the Bitcoin network, with Vault Operators providing collateral in the form of the ONE token.
Harmony Protocol to Launch Trustless Bi-Directional Bitcoin Network to Harmony Bridge
We're excited to announce the guarded soft launch of the non-custodial, fully trustless Harmony BTC Bridge. 👉 https://btc.harmony.one/ Staying true to our vision of high interoperability with other ecosystems, we created the Harmony BTC Bridge so holders of Bitcoin will be able to bridge their BTC to Harmony and participate in high yielding DeFi products, putting their BTC to productive use.