We aim to build asset bridges to connect Cosmos-based Secret Network to EVM-based blockchains. There is an existing bridge from Secret Network to Ethereum, but it is suffering from exorbitant transaction cost on the Ethereum side. Threfore, we are looking at connection from Secret Network to other Eth 2.0 blockchains. When we made our choice of which network to build upon, the key metric we track was Total Value Locked. At the moment (May 8, 2021), Polygon is leading in TVL with $4 Billion USD worth of assets locked. Our first implementation is on Polygon Testnet. The idea for our bridge is simple. On Polygon network, users could transfer their native/ERC20 token to our swap contract, which is being watched by our smart contract log observer. Once the transaction is confirmed, an off-chain admin we control will send a transaction on the Secret Network to mint the corresponding wrapped SNIP-20 compliant token. Asset transfers in the reverse direction is also possible by burning the minted token and unlocking the locked assets.

RainbowBridge showcase

How it's made

The project uses a modified front-end taken from Secret Bridge's repo and also deployed their provided Ethereum swap smart contract to the Matic(Polygon) test-net. On the Secret network side we built a smart contract capable of minting and burning any SNIP-20 compliant token to allow asset transfer from matic. At the moment, the bridge is a centralized server that looks for activity in both smart contracts and reacts accordingly my minting or releasing held assets on either side. The secret contract only provides information that would otherwise be public on the matic side making any transaction done in this network completely private. Considering how the whole team went from not knowing anything of how assets are transferred across bridges or how secret smart contracts are made to having a functional proof of concept we are very satisfied and impressed with our project's outcome.

Technologies used

Matic/PolygonSecret Network