Hive Bridge - Atomic Token Swaps

Hive Bridge - Atomic Token Swaps


In a recent video by @theycallmedan, he brings up the idea of wrapping the HIVE token in an ETH contract to facilitate Hive -> Ethereum token transfers and getting HIVE listed on the Uniswap DEX.

This is a topic that has come up many times before in the past and I have put a little bit of thought into how it could be implemented on Hive. In my opinion, atomic token swaps should be integrated into the core blockchain code and processed by witnesses like normal transactions.

HF24 is feature locked right now and a code release candidate should be coming out shortly (definitely within this month). With that said, now is the time to start looking to what modifications should be included in HF25. If we can get atomic token swaps enabled in the following hardfork, Hive will be in a position to integrate directly with countless other blockchains (Ethereum, Bitcoin, EOS, Tezos, etc etc).

Of course, cross-chain token swaps can already be enabled today through the added use of Oracles. The caveat with this implementation is that it adds a layer of trust that is necessary; which some may say is the antithesis to the idea of blockchain in the first place.

If the atomic token swaps were built into the Hive source code, I envision that the code would be delivered as an optional plugin that a witness user can choose to run. If the witness has enabled the "bridge" plugin, when processing blocks they will also process the pending atomic token swaps by first verifying balances on the Ethereum based smart contract that holds the wrapped Hive tokens.

If for some reason the witness server cannot make a proper verification of funds, the transaction will not be processed and will instead enter into a pending queue until the balances can be properly verified.

Building the atomic token swap code into the blockchain can further enable new features in the internal market. However, supporting additional tokens on the internal market would probably be a change to make a bit more down the road after the base atomic swap framework can be fully tested and verified.

Some other developers have started some work related to wrapping Hive on Ethereum. I think @fbslo and @lightproject have some experience here also.

So what do you think? Would you support the inclusion of atomic token swaps (cross-chain token swaps) in Hive for HF25? Do you have any suggestions or input on things that I have not mentioned here or that I didn't cover thoroughly enough?

If so, leave your questions/comments below and let's get a discussion started about the future of the Hive blockchain.

3 columns
2 columns
1 column