🌁
Relay-based Bridge
A bridge between two blockchains connects them together. Some bridges only enable moving assets from one blockchain to another, and some bridges move the whole data of one blockchain to another. The second type covers the first one.
Relay is an interoperability solution that makes it possible to access the whole data of the source chain from the target chain. In a relay, there are parties called Relayers who submit block headers of the source chain on the target chain. A smart contract called Relay contract checks the validity of submitted block headers by checking the consensus mechanism of the source chain. The smart contract, then, decides which blocks should be finalized according to the finalization rule of the source chain. Therefore, the relay smart contract that exists on the target chain, acts as a light client of the source chain.
TeleportDAO uses Relay as its interoperability solution. Since the consensus mechanism of the source chain and all the cross-chain data is verified by the relay contract, the security of the TeleportDAO bridge is equal to the security of its underlying blockchains.
In the case of Proof-of-Work source blockchains, the consensus check includes verifying that the submitted block header shows enough work has been done, re-targeting the difficulty has been done correctly, etc. In the case of Proof-of-Stake source blockchains, it includes validating the signature of validators, rotation of the validator set, etc. If the submitted header is invalid (i.e. it does not belong to the main fork of the source chain), the relay contract detects it and will not accept it.
After adding the new block header, TeleportDAO checks for any previous block header that got finalized. For example, in the case of the Bitcoin blockchain, this gets done by using the longest chain and confirmation rule. When a block header gets finalized on the source chain, it will get finalized on the target chain at the same time.
If a block header is finalized by the TeleportDAO contract, users can refer to it on the target chain for proving the inclusion of some data on the source chain. As block headers include Merkle roots of all transactions and states, TeleportDAO can perform any state or transaction inclusion verifications using Merkle proofs generated by users. This means that the target chain has access to all the data of the source chain. Any dApp on the target chain that wants to read some data from the source chain can leverage the TeleportDAO bridge.

Summary

There are two main interactions that one can have with the TeleportDAO bridge:
  1. 1.
    Submit block headers: everyone can submit block headers of Bitcoin on the relay (Relayers) and earn rewards. If the block headers are not valid the submission will revert, and if the block header won’t get finalized in the main Bitcoin chain, the user will not earn the reward.
  2. 2.
    Query inclusion of data: any user can query TeleportDAO and ask about the inclusion of some data in a finalized block of the source chain. TeleportDAO will respond with true (in case the data is included in the finalized block), or false (otherwise).
Copy link