I am trying to build my own custom bridge between Ethereum and Binance Smart Chain so that people can transfer tokens and possibly some other assets from one chain to another and vice versa. For this purpose I will need three things:
- smart contract in Ethereum blockchain
- smart contract in BSC blockchain
- some kind of oracle to maintain the communication between contracts in different chains
My question is: how to create a decentralized oracle, that can subscribe to events from one chain and cast them to contract in another chain?
I think I can use Chainlink to achieve this, but for now the only way I see is following:
- User executes transaction on contract in Ethereum blockchain.
- Smart contract emits event in Ethereum blockchain.
- My own custom oracle detects that event was emitted and executes transaction to BSC chain in order to notify the BSC contract about the event.
- BSC smart contract verifies that this particular event exists in Ethereum blockchain. For this purpose smart contract executes API request to some known provider (like Etherscan) using Chainlink mechanisms.
The thing is: I don't want to rely on any API-s in my bridge (so no Etherscan and alike). I want to rely only on blockchain events and decentralized oracles that can detect and propagate those events. Are there any existing mechanisms I can use for this matter?