Inspiration
Cross-chain liquidity transfer is one of the cornerstones in the world of truly decentralized finance. Blockchains are secure but isolated networks that don't have access to the outside data as well as to the state of the other chains. And that's why lots of the users have to rely on third-party services and centralized solutions, which are likely to request private information or be susceptible to censorship, to manage their assets.
The deBridge is aimed to remove the barriers of cross-chain liquidity transfers by building the decentralized bridges between blockchains and the infrastructure around them. The current solution supports transfers between Binance Smart Chain (BSC) and Ethereum (ETH Kovan) blockchains
What it does The deBridge introduces infrastructure and solution for the decentralized cross-chain liquidity transfers.
How we built it The solution consist of 4 parts:
Debridge Core. That is the on-chain part; set of solidity smart contracts for cross-chain transfers.
Debridge Initiator. The bot that monitors the chain and once the event for cross-chain transfer is emitted and the transaction has enough confirmations it initiates the ChainLink (CL) node job.
Chainlink Launcher. The software kit allows the fast setup of the Chainlink nodes for deBridge. The solution does:
- prepare the database for the deBridge external initiator.
- run the CL node for all supported chains with the same credentials.
- adds the External Initiator (EI) and the jobs to the CL node.
- stores the EI access keys in DB to make them easily accessible.
- UI. The prettiest part of the solution built on Angular.
Challenges we ran into Chainlink only allows submitting 32 bytes with the core ethtx adapter. Chainlink node can't be configured for few providers at the same time (it should be different instances). No proper docs related to using OCR build own adapters. External initiators are not displayed in the node UI.
deBridge became a winner of the recent ChainLink hackathon, during which we:
- created the solution architecture
- implemented the smart contracts
- developed UI
- implemented external initiator
- created the scripts to configure the CL nodes, jobs, and EI
- enabled and conducted the first truly decentralized cross-chain transfer.
What we learned
- how to run and manage the CL node.
- how to manage the jobs.
- how to manage an external initiator.
- how to automatically switch network in Metamask
- how to integrate Walletconnect
What's next for deBridge Our initial goal was to create private cross-chain transfers. So our further steps will be: improve the solution architecture as described here.
- add the privacy layer using the tornado.cash codebase.
- integration with DeFi protocols for liquidity provision
- introduce the governance token
- support more chains (Solana, Heco, Polygon)