Many protocols and apps are becoming multi-chain in today’s blockchain world. This enables developers and consumers to benefit from Ethereum’s assets, composability, and community, as well as the greater throughput, cheaper fees, and quicker confirmation times of next-generation networks like NEAR Protocol.
On this note, NEAR protocol has announced the Rainbow Bridge, which is now live, and ERC-20 tokens can now bridge to the NEAR blockchain and back to Ethereum.
Today, developers may use Ethereum assets on NEAR and NEAR assets on Ethereum by using the Rainbow Bridge. They will be able to access any application state from any chain, and eventually from any chain, in the near future. Users bridging fungible tokens to NEAR can benefit from NEAR’s one-to-two second transaction speeds, cheap transaction costs (often less than one cent), and correspondingly low bridge transfer fees.
The NEAR Protocol established the Rainbow Bridge, which is both unique and important in the crypto world, as a completely “trustless” bridge for exchanging tokens between Ethereum and NEAR—and, eventually, Aurora.
The Various Components of the Rainbow Bridge
The Rainbow Bridge User Interface (UI) – this is the website where you, as a user, interact with the bridge to move assets between networks.
The LiteNode – This is similar to a blockchain node, except it just stores block headers, drastically decreasing the amount of storage space required. The LiteNode is built as a smart-contract, and there are two of them: one on the Ethereum network that saves NEAR block headers, and one on NEAR that stores Ethereum block headers.
Relayers — Because LiteNodes are smart contracts, they are incapable of running and updating themselves. Relayers are programmes that operate on conventional servers that read blocks from one blockchain and send them to the LiteNode running on the other. As a result, the relayers keep the LiteNodes up to date.
Because there is a transaction cost—that is, gas fees—every time a relayer updates a LiteNode, the one on NEAR (containing the Ethereum blocks) is updated on each Ethereum block (because NEAR gas fees are low), whereas the update frequency on Ethereum (containing the NEAR blocks) is configurable and determined by an economic budget (currently about 12 to 16 hours).
Connectors — Connectors are smart contracts that handle all of the logic involved in the cross-chain management of a certain asset type. They, like LiteNodes, exist in pairs, with one operating on Ethereum and the other on NEAR. For example, there are two “ETH Connectors” in charge of moving ETH between the two networks. There is also a “ERC-20 Connector” pair in charge of transferring ERC-20 tokens. If desired, someone may create a “NFT” Connector, a “Prediction Market Outcomes” Connector, or a “DAO Vote Results” Connector. If suitable Connectors exist, any asset or data may be transported over the Rainbow Bridge!
How do these components work together to create a cross-chain bridge?
Let’s look at an example to better understand this. Begin by imagining you want to transfer 20 DAI from Ethereum to NEAR. Because actual token transfers across networks are not possible, we must withdraw 20 DAI from circulation on Ethereum and place 20 DAI in circulation on NEAR in order to keep the global supply of DAI constant.
- You begin a transfer of 20 DAI from Ethereum to NEAR using the Rainbow Bridge UI.
- When you confirm the first of two transactions in MetaMask, the Rainbow Bridge interacts with the Ethereum ERC-20 Connector (since DAI is an ERC-20 token), which transfers and locks 20 DAI in its vault. These DAI are no longer in use on the Ethereum network.
- The Rainbow Bridge UI produces a cryptographic “proof” that you actually did lock 20 DAI based on the header data in my transaction block.
- Because you’re going to ask the NEAR network to generate some DAI based on what happened on Ethereum, you must first wait for the Relayer to relay around 20 Ethereum block headers to the NEAR LiteNode. This is for security reasons, much as your crypto exchange requires you to wait for confirmations before utilising your deposited funds.
- After this delay, the Rainbow Bridge UI lets you to proceed to step two of the procedure, which is to request that the ERC-20 Connector on NEAR establish 20 new DAI for us on the NEAR network.
- When you submit this request to the ERC-20 Connector, you must provide the cryptographic evidence you obtained previously, which demonstrates that you have locked 20 DAI on Ethereum.
- The ERC-20 Connector on NEAR will then look up our Ethereum block header in the LiteNode running on NEAR and do its own separate cryptographic proof computation.
- If the proof you provide matches the proof calculated by the ERC-20 Connector, it knows that 20 DAI are safely locked away on Ethereum—and that you locked it!—and continues to generate (mint) 20 new DAI on NEAR and distribute them to your wallet.
When you wish to move DAI from NEAR to Ethereum, the procedure is reversed: instead of locking 20 DAI in NEAR, you destroy them (a process known as “burning”), and we send the “evidence” of that burn to the Connector operating on Ethereum. With access to the NEAR blocks in the Ethereum LiteNode, it confirms our evidence and releases 20 DAI from its vault and transfers them to your wallet!
In a nutshell, that is how the Rainbow Bridge works! It is presently the only Ethereum bridge in crypto that operates in this manner, allowing you to move assets between Ethereum, NEAR, and, shortly, Aurora without relying on third parties.
#Near #NearProtocol #wazirxwarriors #cryptonewsindia