Kedar Iyer
Travis Moore
- Websites can talk to each other using APIs
- Common protocol: HTTP
- Each blockchain operates on its own protocol
- Direct communication is not possible
- BTC and ETH cannot directly communicate
- Swap tokens trustlessly
- Must-have for decentralized exchange
- Transfer ERC20 tokens to a new chain
- Many non-Ethereum projects use ERC20 tokens for ICO
- Atomic swaps
- Only enables token swaps
- Requires support for hashed timelock contract
- Almost all blockchains support this
- Transaction Relays
- General purpose
- Enables transactions from one blockchain to be run on another chain
- Only possible on Turing-complete blockchains
- Hashed timelock contracts
- Contracts containing tokens, a hash, and an expiration
- Unlocked by producing a seed that hashes to the hash
- Strengths
- Allows two-way swaps
- Supported by all major blockchains (BTC, LTC, ETH, EOS, etc.)
- Weakness
- Requires human input to verify transactions have been included in chain
- Only enables token transfers
- Runs a light client of one chain on another
- Uses merkle proofs to verify transactions
- Strengths
- General purpose transactions
- Fully automated
- Weaknesses
- One-way swaps
- Can only relay to Turing-complete chains
- BTCRelay
- One-way BTC to ETH relay
- PeaceRelay
- Two-way ETH <-> ETC relay
- One-way relay from Ethereum to EOS
- Syncs ETH block headers in an EOS smart contract
- Source Code on Github
- Ethash computation must be verified to prove block validity
- Requires generating a verification cache
- Memory Intensive: 32MB
- CPU Intensive: 1.5s
- Verification cache can be re-used for 30K blocks (~5.5 days)
- Verifying with pre-generated cache: 10ms
- ETH does not include the from address in transactions
- Must be calculated from signature
- CPU Intensive: 15ms
- Every block contains a merkle root
- Merkle proof required to prove a transaction was included in a block
- Ethereum uses custom trie called Merkle Patricia Trie
- Ethereum uses a custom encoding scheme: RLP
- Full block headers consume 1.5MB per day
- Only store merkle root and header hash (300KB / day)
- Merklize block headers (< 1KB fixed storage)
- Expect two-way relays between all Turing-complete chains
- Contact us if you would like to contribute!
- kedar@everipedia.com
- travis@everipedia.com