Waivio

Hive Bridge - 1.0.0-beta.1

18 comments

mahdiyari25 days agoPeakD4 min read

hny2026-pixabay-ai.jpg

First things first, Happy New Year! 馃帀

馃帀    馃帀   馃帀馃帀馃帀馃帀   馃帀       馃帀   馃帀馃帀馃帀馃帀
馃帀    馃帀      馃帀       馃帀     馃帀    馃帀
馃帀馃帀馃帀馃帀      馃帀        馃帀   馃帀     馃帀馃帀馃帀馃帀
馃帀    馃帀      馃帀         馃帀 馃帀      馃帀
馃帀    馃帀   馃帀馃帀馃帀馃帀       馃帀        馃帀馃帀馃帀馃帀

That is probably enough celebration. Back to business.

Hive Bridge

Hive Bridge: An open source infrastructure for running a decentralized bridge connecting Hive to other blockchains.

As a starting blockchain, Ethereum has been added. Which hosts wHIVE and wHBD ERC20 tokens.

How it works:

Wrapping HIVE/HBD tokens (sending HIVE/HBD to other chains):
User transfers HIVE/HBD to treasury (hive multi-sig account) with the ETH address in the memo e.g. "ETH:0x123" -> Bridge nodes detect and validate the transfer, then sign a message and send that signature to other nodes on the p2p network -> Once there are enough signatures to satisfy the multi-sig, the user sends the message alongside signatures to the ETH contract and mints ERC20 tokens by paying the GAS fee.

1.000 HIVE -> 1.000 wHIVE

Unwrapping HIVE/HBD tokens:
User calls the unwrap(amount, username) method on the contract -> The contract burns the specified amount and emits an event Unwrap(address,amount,username) -> Bridge nodes detect the event (after enough confirmations) and sign a Hive transfer that sends HIVE/HBD to the specified username -> They broadcast the signature on the p2p network and once there is enough signatures to satisfy the multi-sig, the Hive transaction is broadcasted by one of the nodes.

1.000 wHIVE -> 1.000 HIVE

Governance/Multi-sig:
The bridge doesn't have any consensus mechanism and just relies on trusted signers to operate (hopefully witnesses). The bridge has no fees and operators generate no income.

To make the life of signers easier, there is a proposal mechanism. Signers don't have to use any wallet to sign transactions or pass signatures around manually. Hive transfers are used instead and the bridge nodes detect these transfers and perform the action on behalf of the signer. For example a signer sends a transfer with this memo to add a new signer to the wHIVE contract on Ethereum: governance:ETHHIVE:start:add-signer:username:0.
Then other signers vote on this with: governance:ETHHIVE:vote:add-signer:username:blockNum.
After enough signatures are gathered, someone will broadcast the transaction to the Ethereum blockchain.

Of course, there is a nice UI that handles all of this.



Development & Deployment:

The design has been in a way to make addition of additional chains easier. For now it handles two Ethereum contracts. But the plan is to expand later after ironing things out. If we ever got a smart contract layer, like based on HAF, we can use this to bridge our native tokens to that potential second layer.

Deploying something like this which has no direct financial incentives for the people involved, is a bit hard. We have to find some capable and willing key holders who will be around. Hopefully it will work itself out. Ideally we would have some big names willing to run the code.

Currently I have deployed a beta version which operates between Hive and Sepolia (Ethereum testnet). Maybe we can get something moving and make this the official Hive Bridge by organizing and announcing an official launch date on Ethereum some days/weeks later. Maybe also push to get the tokens officially listed on DEXes and cmc+coingecko.


I started this as a hobby project. Ideally it should have been ready months ago but I'm "a bit" lazy when it comes to hobby projects. As a hobby project, I wouldn't mind this failing or not even launching at all. The code is open source and we can come back to it whenever if needed. So don't feel pressure. We can put it aside and work on something better.

Also, I didn't and I'm not planning to make a DHF proposal for this project. It might have helped with the development speed but I didn't feel like it. Being lazy might be bad but it feels good.

What next?
I'll be doing more tests on the beta version and if things are good, I'll look for key holders and schedule a proper launch date. That is, if we all agree on it.

Anyways, it would be nice to have some devs review the code and the Ethereum contract. I tried my best. Things are not perfect but they do work.


GUI for testing beta deployment:


Discord server: https://discord.gg/UJ4dZPvJ

GitHub Repositories:

Comments

Sort byBest