Trustless Ethereum Bridge

Trustless Ethereum Bridge

Next Date
2021/11/22 → 2022/02/14
Assign
Ganesha UpadhyayaJenya Piskunov
Status
Live on Testnet
Github
https://github.com/harmony-one/horizon/issues
Bounty

Progress update

Currently there are several pending tasks that needs to be completed (along with estimates) listed below:

  1. EIP-1559 update to ethereum pow verification [3 days]
  2. Limited header storage in smart contracts [1 day]
  3. Handling forks & building canonical chain for ethereum light client & TokenLockerOnHarmony to use canonical chain [5 days]
  4. Merging two redundant merkle libraries [3 days]
  5. Batch header receive functionality [1 day]
  6. MMR hardfork PR, addressing comments, getting it merged [5 days] @Ganesha Upadhyaya
  7. Unit test completion [1 week]
  8. Relayer & frontend completion [2 weeks] @Jenya Piskunov

Total #days: 39, Work resuming this week (Jan 3, 2022)

Revised launch date: TBA (will be updated by Jan 17, 2022)

Ethereum Bridge: trustless and efficient asset transfers among PoW-PoS chains

We are building a bridge for applications to access assets on Ethereum while enjoying fast transactions on Harmony. Our bridge architecture is industry leading, being gas efficient and seamless between Proof-of-Work and Proof-of-Stake chains. Inspired by Flyclient (already deployed in ZCash), our light client uses Merkle Mountain Range (MMR) and epoch syncing. Later we may employ zero-knowledge proofs such as Plonk to further compress the states of these heterogeneous chains.

Horizon: A Gas-Efficient, Trustless Bridge for Cross-Chain Transactions

With the rise of digital currency systems that rely on blockchain to ensure ledger security, the ability to perform cross-chain transactions is becoming a crucial interoperability requirement. Such transactions allow not only funds to be transferred from one blockchain to another (as done in atomic swaps), but also a blockchain to verify the inclusion of any event on another blockchain.

Horizon: A Gas-Efficient, Trustless Bridge for Cross-Chain Transactions
Horizon: A Gas-Efficient Trustless Bridge for Cross-Chain Transactions

Harmony recently launched Horizon, a bridge for transferring any ERC20 assets between Ethereum and Harmony, powered by a set of trusted validators. Within a couple of weeks after Horizon, Harmony also launched SWOOP, a decentralized exchange (DEX) for swapping assets bridged from Ethereum.

Horizon: A Gas-Efficient Trustless Bridge for Cross-Chain Transactions
Introducing Horizon: An Ethereum-Harmony Cross-chain Bridge

ho·ri·zon /həˈrīzən/: the line at which the earth's surface and the sky appear to meet. Harmony has launched Horizon , the first version of its Ethereum-Harmony cross-chain bridge, on the mainnet. This is the foundation of many upcoming initiatives designed to bolster a vibrant crosschain ecosystem on Harmony that will allow users and developers to smoothly interact with multiple chains.

Introducing Horizon: An Ethereum-Harmony Cross-chain Bridge
Harmony as Interoperable Layer-2 for Ethereum

Harmony as a Layer 2 solution has a comparable (if not better) proposition for Ethereum applications when compared to Optimistic and ZK rollups Optimistic rollups have longer withdrawal wait times and ZK rollups are yet to be generalize to any EVM computations Harmony is fully EVM compatible with Ethereum tooling (Metamask, web3.js/ether.js) Harmony's interoperability solution allows instant settlements and also gas-efficient transactions Ethereum's high gas fee and slowness has led to greater advancement of Layer 2 (L2) technologies.

Harmony as Interoperable Layer-2 for Ethereum
Testing instructions

Weekly milestones

9/6-9/13: bug fix & localnet testing Done

  • Fixed a bug in the MMR proof generation logic related to siblings node computation. Added node index to MMR Proof RPC response and modified GetProof RPC to return MMR proof with respect to an input block number to 3872. The 3872 PR is almost ready for review this week and testnet testing.

9/13-9/30: v1.0.0 [Pre-alpha] functionality completing & unit tests DONE

  • Finalize MMR Hardfork PR 3872 and get it reviewed/merged
  • Finish HarmonyLightClient & tests
  • Migrate to hardhat with upgradability
  • Upgradable LightClients and Provers (both Harmony & Ethereum side)

9/27-TBD: v1.0.1 [Pre-Alpha] functionality completing & unit tests In-Progress

  • complete unit tests for lightclient, prover and bridge contracts on both sides
    • prover: validating header, transaction inclusion, receipt, account, log, code
    • lightclient: checkpointing, relayer add/remove, threshold
    • bridge: deposit, withdraw, execute
    • upgradability: both lightclient & bridge, gnosis-safe ownership
  • fix bridge cli & tools - DONE
  • gas cost estimation experiments for relayers and users
  • begin audit (internal+external)

10/11-TBD: v1.0.2 [Alpha] bridge ecosystem deployment In-Progress

  • specs & docs @Ganesha Upadhyaya
  • relayer client, dashboard @Jenya Piskunov
    • client: includes both eth and hmy rleays, js client with docker build, aws kms for signing key management
    • admin dashboard: list all withdraw requests from users, show relay cost, profit, trigger client to relay
  • bridge frontend & explorer @Jenya Piskunov

10/11-TBD: v1.0.3 [Alpha] testnet deployment

  • deploy eth components on harmony testnet, run kovan testnet relayer, full functionality testing
  • deploy hmy components on kovan testnet, run hmy testnet relayer, full functionality testing

10/18-TBD: v1.0.4 [Beta] mainnet deployment

Survey of Crosschain 2021

Survey of Crosschain Methods in 2021 Author: Quoc Le The blockchain industry is heading into a multi-chain economy and cross chains (or bridges) are making inter-chain asset and token transfer possible. In 2018, I started Quanta with cross-chain at the forefront which was used to move assets fro...

Survey of Crosschain 2021
Horizon Code Review

Harmony's Horizon Bridge Code Review Reviewer: Quoc Le 1. Coin Unlocks To move asset across the chain, the user must retrieve the proof data from the src and execute the proof function validateAndExecuteProof with src proof on the dest blockchain. // src: src Bridge // dest: dest Bri...

Horizon Code Review