Phase 1 — Pegged Zone for Ethereum Shipped
Swishlabs and THORChain have shipped a one-way ethereum bridge as part of their work with Interchain on Cosmos technology.
In May 2019, THORChain began working with Swish labs on a production-grade Ethereum pegged zone for Cosmos-powered blockchains. This was partially funded by a grant received by the Interchain Foundation.
The announcement was covered here:
Building the next generation bridge
The Interchain Foundation, THORChain and Swish Labs are working together to build a new suite of tools to power…
The team are pleased to announce the first part of the bridge has been shipped. The code allows a 1-way bridge to be set up between Cosmos-powered chains and Ethereum. Any Ethereum funds sent to a smart contract monitored by the validators on the receiving chain is atomically minted after a certain number of confirmations.
The code can be inspected here:
Cosmos Ethereum Bridge. Contribute to swishlabsco/cosmos-ethereum-bridge development by creating an account on GitHub.
The pegged zone requires validators to run a light client for Ethereum alongside the Cosmos daemon. A smart contract that receives Ether is then deployed on Ethereum and is monitored by the validators. Any time funds are sent to it validators will nominate to mint assets on the Cosmos chain using the merkle proof of the incoming transaction. This allows a “proof of received funds” to be achieved. Once 100% of the validators have received and can process the proof, then the assets are minted. A fixed number of confirmations are waited for on Ethereum to prevent chain re-organisations on Ethereum causing loss of reserves.
The next part of the work will be to allow funds to be sent from the Cosmos-powered blockchain back out to Ethereum. This requires the validators to come to consensus on exit transactions in a byzantine setting to ensure that the funds do not get locked or stolen.
They must have an Ethereum wallet with a small amount of funds on it in order to process Ethereum transactions. Their public addresses are signed into the peg contract which specifies who can sign (essentially a multi-signature).
In addition, the signers of the multi-signature a periodically (and randomly) rotated to ensure liveness and to prevent a hostile take-over of a bridge. If a validator loses access to their signing key or goes offline, then they can be safely removed from the multi-signature without the bridge assets being locked.
In Phase 2 ERC-20 tokens will also be supported, giving support to a wider range of liquidity and assets.
The final design of the bridge adds economic incentives that ensure validators opt-in to run bridge clients and get paid for their infrastructure. It also prevents exit race conditions, and restores any partial loss of fungibility of the bridge assets. Users who wish to exit pay an exit fee proportional to the external mining fee, as well as covering any discrepancies in funds. It also means that many bridges can be supported and that the most valuable and liquid bridges have the best incentives for both users and bridge validators.
This is important, since it ensures the bridges are safe at all times. While strictly speaking at any given time there is a federation for the bridge, the parties to the federation are randomly chosen after opting-in. This lowers the risk of censorship at the bridge, and reduces trust.
Work continues on the design for THORChain’s upcoming mainnet as well as the go-to-market strategies to source genesis validators, users and liquidity providers for the launch.
Join the Rune Distribution
Be sure to check out the official community channels for updates around the upcoming Rune distribution:
- Github: https://github.com/thorchain
- Medium: https://medium.com/thorchain
- Twitter: https://twitter.com/thorchain_org
- Reddit: https://reddit.com/r/thorchain
- Telegram Community: https://t.me/thorchain_org
- Telegram Announcements: https://t.me/thorchain