IBC stands for Inter Blockchain Communication - the cross-chain standard in the Cosmos ecosystem https://ibcprotocol.org/

IBC is the most well developed, secure by design and battle-tested bridge standard out there. In this proposal, we discuss how we can use IBC for secure and modular cross-chain communication between Ethereum and NEAR.

Similar Work

Let us look into some of the similar work going in the community.

zk-Proofs for Rainbow Bridge (by Electron Labs)

Rainbow and IBC both use on-chain lights clients to secure the bridge. However, since Ethereum is too gas expensive to run the NEAR light client on-chain, Rainbow follows an “optimistic” approach. However, this unfortunately imposes a 6 hours hours waiting period on transactions, and can go upto 16 hours.

As such, we have been working with the Rainbow team for the past months to solve this problem. We have successfully shipped a zk-SNARK library that creates succinct proofs of NEAR light headers making them cheap enough to run on Ethereum. We plan to re-use a lot of this work in our proposal today. You can think of this proposal as phase 2 of our Rainbow work.

IBC for NEAR <> Cosmos (by Composable Finance)

Composable Finance has been leading a project that would bring IBC for NEAR <> Cosmos. For this, the first of the NEP’s have already been shipped, and remaining work is in the pipeline.

This project is already quite popular in the community.

Let us now dive into the technical details of this proposal.

Problem background

IBC works on the light client principle where the light clients of the origin and destination blockchains need to be implemented as smart contracts in order to verify cross-chain transactions.

This means that in order to connect NEAR to Eth, we will need to run the NEAR light client on Ethereum as a solidity smart contract. However, this turns out to be an extremely gas expensive operation since this requires verification of hundreds of ed25519 signatures in solidity, and ed25519 pre-compiles are not available on Ethereum. One ed25519 cost 500K gas and this means that verifying a full light client headers would cost at least 50 mn gas (100 validators) and go up to 500 mn for 1000 validators as the number of validators per NEAR shard increases.

Hence we must find an alternative to verify these signatures cheaply on Ethereum.