harmony-one / horizon

Horizon - a trustless harmony to ethereum bridge
MIT License
36 stars 29 forks source link

Horizon

Horizon - a trustless harmony to ethereum bridge

Key points

Bridge Components

Used in Ethereum to Harmony flow

Used in Harmony to Ethereum flow

Ethereum to Harmony asset transfer

  1. User locks ERC20 on Ethereum by transferring to bridge smart contract and obtains the hash of this transaction from blockchain
  2. User sends the hash to EProver and receives proof-of-lock
  3. User sends the proof-of-lock to bridge smart contract on Harmony
  4. Bridge smart contract on Harmony invokes ELC and EVerifier to verify the proof-of-lock and mints HRC20 (equivalent amount)
drawing

Harmony to Ethereum asset redeem

  1. User burns HRC20 on Harmony using Bridge smart contract and obtains the hash of this transaction from blockchain
  2. User sends the hash to HProver and receives proof-of-burn
  3. User sends the proof-of-burn to bridge smart contract on Ethereum
  4. Bridge smart contract on Ethereum invokes HLC and HVerifier to verify the proof-of-burn and unlocks ERC20 (equivalent amount)
drawing

Additional Reading

  1. Developer Guide
  2. Solidity Approach
  3. Solidity generated documentation