The Rainbow Bridge: FAQs and Answers
Recently the NEAR Team dropped a huge announcement:
The launch of the ETH ←→ NEAR Rainbow Bridge.
In itself, the Bridge holds the promise of providing an interoperable channel for the transfer of assets, data, and cross-chain calls, between the NEAR and Ethereum blockchains. In context the Bridge signifies a monumental enhancement for the crypto-verse: Permissionless interoperability between two parallel blockchain ecosystems building the Open Web.
A simple review of the most common questions surrounding the Rainbow Bridge, as well as the context for its development, and its significance in the Macro Crypto environment helps contextualize this event:
– What is the Context for the Rainbow Bridge?
– What Are the Technical Components of the Rainbow Bridge?
– Is the Rainbow Bridge Decentralized?
– If I am a User What Can I Expect When Using The Bridge?
– What Operations does the bridge execute on the backend, during a Bridge Transfer?
– What is the Significance of the Bridge if I build on NEAR or Ethereum Right Now?
– What, in principle, can be Transferred Across the Bridge?
– What can currently be transferred across the bridge?
– Who Pays for the Bridge Currently?
– What is the Long Term Goal of the Bridge?
– What is Rainbow Protocol?
– What does the Faucet refer to?
– Where Can I Find Analytics Relating to the Bridge?
– What Applications Exist That Currently Utilize the Bridge?
What is the Context for the Rainbow Bridge?
Third generation cryptocurrency projects are building refined and enhanced blockchain ecosystems that build upon the successes and challenges of previous projects. NEAR Protocol, incorporates Dynamic Sharding using Nightshade to provide scalability to it’s next-generation platform for decentralized applications. The Rainbow Bridge has been built by the NEAR Team to connect the NEAR blockchain to the Ethereum blockchain – the most popular dApp platform to date. Ethereum, while highly successful, is indisputably suffering from high gas fees as it works to implement the long awaited Ethereum 2.0 Upgrade to its network.
Ultimately, The Decentralized Web is evolving to the point that two massive parallel blockchain ecosystems can seamlessly interact with one another, to share assets, data transfers, and cross-chain calls. The Open Web is growing up!
What Are the Technical Components of the Rainbow Bridge?
– An Ethereum Light Client implemented on NEAR (Including an Ethereum to NEAR Relay Service)
– A NEAR Light Client implemented on Ethereum (Including a NEAR to Ethereum Relay Service)
– An Ethereum Prover implemented on NEAR, to verify Ethereum Events.
– A NEAR Prover implemented on Ethereum, to verify NEAR Contract Executions.
– ‘Connectors’ enabled by Provers, for locking and minting assets on ETH and NEAR respectively (currently contracts are only available for ERC20 tokens).
– A Watchdog Service For Challenging Headers from NEAR transactions on the NEAR Light Client in Ethereum (Due to the current latency of NEAR → ETH interactions).
The respective relays and clients, move and maintain assets across the bridge, while the provers allow for the verification of events/contract execution results from the opposite blockchain. With this base level foundation, specific contracts can be written for different token standards to migrate back and forth between the different blockchains. In fact, Connectors use the core bridge contracts in tandem with header relays and the watchdog to prove that information coming from other blockchains is correct. In essence this is a permissionless Oracle for the movement of assets between chains!
Is the Rainbow Bridge Decentralized?
As explained in the release blog, the rainbow bridge “does not require special permission to deploy, maintain, or use. Anyone can deploy a new bridge, use an existing bridge, or join the maintenance of an existing bridge without getting approval from anyone else, not even NEAR Foundation.”
However, this can be nuanced pendent upon the development and roll-out plan for the Bridge: While the final bridge release will be fully decentralized, it will be ‘rolled-out’ in different stages. Based upon the Bridge Upgradeability and Governance Plan, the bridge starts with PoA based governance and subsequently decentralizes as it upgrades over time.
If I am a User What Can I Expect When Using The Bridge?
For users interested in sending assets across the bridge, the experience is similar to other wallet transactions in Crypto:
1. The User Provides Credentials
2. The User Chooses a Beneficiary (address) and an Amount to send
4. Once the transfer has succeeded, the user is provided with visual confirmation on their interface.
What Operations does the bridge execute on the backend, during a Bridge Transfer?
The example provided in the blog uses the classic characters of Alice and Bob. The basic idea behind the backend transfer can be summarized as follows when Alice transfers DAI to Bob from the Ethereum to the NEAR blockchain:
1. A Token On Ethereum is Sent and Locked: The respective amount of DAI is transferred from Alice to the Tokenlocker that subsequently locks the tokens.
2. Ethereum client on NEAR blockchain syncs with Ethereum blockchain: Ethereum Client constantly receives the Ethereum block headers from relaying service, and once it receives a block with the transaction from the previous step (plus a sufficient amount of confirmations — 20 for mainnet), the client and a prover contract can be used for proving it.
3. Transfer finalization transaction: A user or any other entity calls the MintableFungibleToken contract (factory) to finalise the transfer. This contract then calls the Ethereum prover (on NEAR) which checks the transaction confirmation (on the Ethereum Client on NEAR). Once it has been verified, the MintableFungibleToken contract reads the Ethereum event and mints the respective amount of nDAI (1:1 equivalent of DAI) for Bob.
Congratulations! That is it.
What is the Significance of the Bridge if I build on NEAR or Ethereum Right Now?
The Rainbow Bridge allows the NEAR and Ethereum blockchains to communicate with one another. Developers building on NEAR can access all existing assets and decentralized financial products existing on Ethereum. Developers on Ethereum, meanwhile, can easily migrate to NEAR if gas fees remain unfeasible, while “maintaining their Ethereum-native user base.” For more information see the thread by Alex Skidanov Here.
A core NEAR developer of the Rainbow Bridge, added this interesting point as well:
What, in principle, can be Transferred Across the Bridge?
In principle, full interoperability means that any transaction or statement from either blockchain can be verified by the other. According to Alex this “enables any asset transfers, arbitrary cross-chain calls and arbitrary data transfers”.
What can currently be transferred across the bridge?
In its current form, support only exists for transferring ERC20 tokens back and forth from Ethereum to NEAR. This is because different sets of contracts have to be built for different token standards (i.e. ERC721 tokens and native tokens).
Who Pays for the Bridge Currently?
In its current state, the Rainbow Bridge is maintained by the NEAR Foundation. The Team is carefully designing an incentive structure for those maintaining the bridge by paying for gas from header relays.
To date, the cost of maintaining the bridge rests at roughly 2 ETH per day (due to the NEAR Headers relaying transactions from Ethereum) with negligible costs on the NEAR Side. More details on the costs of transfers is explained by Dr. Alex Shevchenko:
The costs of these three transactions can be broken down as follows:
– Approval of ERC20 Transfer = 45,000 ETH Gas
– Lock ERC20 Transfer = 35,000 ETH Gas
– Finalise Deposit Transfer Costs = 64 NEAR TGas
What is the Long Term Goal of the Bridge?
The Macro view here is key: The Web3 Ecosystem is developing – The Open Web is growing up with the goal of building a “Permanent, Ownerless, and Borderless Foundation” for connected people all over the world. The Rainbow Bridge is a product meant to enhance the evolution and development of Web3 in a mutually beneficial and positive manner for both the Ethereum and NEAR communities.
What is Rainbow Protocol?
While the Rainbow Bridge refers to the NEAR – ETH Bridge that has just launched between NEAR Protocol and the Ethereum Network, Rainbow Protocol is the underlying infrastructure that will provide decentralized and permissionless bridging between NEAR and other Layer 1 Blockchains in the future. This includes potential bridges to Cosmos, Polkadot, Elrond, and NEO among others. The main components of Rainbow Protocol include Provers, Connectors, Relays, a Watchdog, and Lite Clients for the bridging chain and NEAR Protocol itself.
Figure 1: A blueprint of the Rainbow Bridge that represents the most important facets of Rainbow Protocol.
What does the Faucet refer to?
The Faucet refers to a tool in the NEAR Ecosystem that allows Ethereum holders to create a free Account on NEAR. Specifically, with a minimum balance of 0.05 ETH, users can connect their MetaMask account to the Faucet to create a NEAR Account with a specified Account ID. The Faucet has been created to streamline interactivity between Ethereum and NEAR for token holders interested in porting assets between the two chains.
Where Can I Find Analytics Relating to the Bridge?
Analytics of the Rainbow Bridge is currently displayed here. The data displayed refers to: The Total Transaction Count, The Total Assets Bridged in USD, The Number of Unique Bridged Users, as well as visualizations of Bridge assets and transaction inputs and outputs.
What is the plan to decentralize governance of the bridge over time?
The full bridge upgradeability and governance plan has been released on the NEAR forum by Dr. Alex Shevchenko. The plan is set out in four stages, moving from centralized management to fully decentralized and DAO based management of the bridge. These stages in brief are:
Stage 1. Centralised governance, no fixed interfaces
Stage 2. Separate multisig governance, proxy patterns
Stage 3. Separate multisig governance, proxy patterns with freeze periods, pausability and escape hatches, fixed interfaces
Stage 4. Validator DAO, proxy patterns with freeze periods, pausability and escape hatches, fixed interfaces
What Applications Exist That Currently Utilize the Bridge?
To date, there are two primary applications that make use of the Rainbow bridge: Flux Protocol and Ref.finance. Flux is a decentralized predictions market protocol preparing to launch on NEAR in the coming weeks. Flux utilizes stable coins to denominate prediction markets. Ref.finance is a community created and governed AMM that allows for the swapping of any bridged tokens with one another. Future apps also include Artificial Exchange, and Mintbase (with the transfer of NFT’s across the bridge).