Introducing NETH: NEAR Becomes The First Non-EVM Chain to Offer MetaMask Compatibility

Proximity
NEAR Protocol
Published in
6 min readDec 19, 2022

Developed by Proximity Labs

Disclosures: Proximity Labs holds $NEAR, $AURORA, and tokens that may be associated with other protocols mentioned in the article. These statements are intended to disclose any conflict of interest and should not be misconstrued as a recommendation to purchase or sell any token or to use any protocol. The content of this article is for informational purposes only, and you should not make investment decisions based on it. This is not investment advice. Proximity Labs is not affiliated with MetaMask or its parent company Consensys Software, Inc.

To date, MetaMask is by far the most popular wallet in crypto: it has over 30 million monthly active users (MAU), connects you with 3,700+ dApps and Web3 protocols, and the majority of DeFi flows through it.

While projects on Ethereum and EVM chains have the advantage of inheriting existing infrastructure such as MetaMask, non-EVM chains have needed to come up with their own solutions. At Proximity Labs, we wanted to change this. We have built the first solution to offer MetaMask compatibility on a non-EVM chain through a smart contract called NETH, which allows you to remotely control a NEAR account using your Ethereum account.

Cut to the chase? Check out the demo and start using NETH on Ref Finance and Burrow.

This is NETH: Unlocking Ethereum Wallets on NEAR Native

While NEAR can support EVM runtimes, like Aurora, NEAR's native runtime is not EVM-compatible. This creates an onboarding barrier to users accustomed to their Ethereum wallets, who have to relearn everything when entering a new chain. NETH sets out to solve one thing: allow users to utilize their Ethereum Wallets to interact with NEAR Native dApps.

NETH is a smart contract that enables your Ethereum account to sign transactions and remotely control your paired NEAR account, allowing you to directly interact with NEAR dApps using your Ethereum wallet, such as MetaMask.

Deployed on the NEAR side, NETH allows your paired NEAR account to accept transaction details (payload) and the signature from your paired Ethereum account. The contract:

  • verifies the signature from the Ethereum account,
  • recovers the Ethereum public address and,
  • executes the transaction if it matches the address from the initial NETH setup.

This means that NEAR is now accessible through the most widely used non-custodial wallet in crypto, removing the entry barrier for EVM users to enter the NEAR Native ecosystem. Also, NETH accounts can handle NEAR transactions with multiple receivers and multiple actions per receiver, making a NETH Account capable of using the most advanced NEAR dApps.

Setup, Usability, and Security

NETH comprises a NEAR account with a deployed smart contract and the NEAR Wallet Selector plugin. Some of its key features are as follows:

  • Everything is open-source. The repo for the Wallet Selector plugin and setup frontend can be found here.
  • The entire process is non-custodial: you are in charge of your keys the whole time.
  • The NETH Account setup flow is entirely client-side: it runs on your computer only and is not communicating with a server or third party.
  • We worked with OtterSec to audit the contract and various user journeys for potential risks, the report of which can be found here.
  • NETH is whitelisted on NEAR’s Wallet Selector, which smoothens the dApp integration process. Projects on NEAR only need to integrate the Wallet Selector and NETH will show up as one of the default options. The repo for the Wallet Selector can be found here.

As with any transaction on NEAR, there are some fees that go to validators (not affiliated with Proximity) to fund the wallet initially. Currently, the creation of a NETH account is 0.5 $NEAR, which is used to pay for the account name, access keys, and contract storage.

Figure 2. How NETH works and interacts with MetaMask

Note that the setup process is not without risks. Should your device suffer a catastrophic failure during the setup process resulting in a loss of access to the local storage of the website, you may not be able to recover the funds used to set up the NETH Account. This is why we decided to write the NETH Contract as a no-std Rust contract deployed on NEAR since it only requires 0.5 $NEAR to create the account and deploy the NETH Contract.

Once set up, there is also an option to disconnect the account and walk away with a seed phrase to a NEAR Native account. From there you can use any NEAR Wallet by importing the seed phrase.

Using dApps is as simple as signing transactions using your Ethereum Account (e.g., through MetaMask or MetaMask mobile) as you normally would. We made sure to include headers, receiver IDs, and size information in the transaction payload to increase legibility and security and to minimize the chances of malicious tampering with transaction details.

Figure 3. Using apps with NETH: you connect to your NEAR app and the Wallet Selector Plugin pops up. Then you select NETH and start using MetaMask directly to sign transactions.

Bringing MetaMask and other Ethereum wallets to NEAR native combines the full potential and capabilities of the NEAR blockchain with the familiarity, user experience, and battle-tested track record of Ethereum’s wallet ecosystem.

Importantly, although we use MetaMask as an example, NETH works for most Ethereum wallets! This is because NETH is a smart contract entirely on the NEAR side, which uses Ethereum accounts (whether it be MetaMask or not), and is not an official integration by the MetaMask team.

Future Work

With the core functionality live, these are the next steps for NETH that we are currently exploring:

  • An improved onboarding experience, with a cost reduction in the amount needed to fund the account (currently 0.5 $NEAR), which can be achieved in several ways:
  1. A subsidized faucet for account creation based on certain criteria, such as bridging a non-trivial amount from Ethereum or other networks;
  2. Using bridged funds via the Rainbow Bridge to swap and pay the 0.5 $NEAR (or less);
  3. Initial funding using NEAR’s Moonpay integration; and
  4. Zero balance accounts on NEAR, which would eliminate the need for initial set-up costs altogether.

For now, feel free to reach out to the NEAR community if you do not have access to any NEAR tokens or explore other potential opportunities for funding, such as NEAR Crowd.

  • Tighter integration with bridging assets as a feature within the Wallet Selector plugin, embedding the Rainbow Bridge into other dApps.
  • More dApp integrations.
  • UI/UX improvements.
  • Educational materials and guides for users and devs.
Figure 4. NETH as an option on Ref Finance's Wallet Selector interface

Today, you can find NETH live on NEAR’s Wallet Selector plugin on dApps such as Ref Finance and Burrow, with many more to come. Watch the demo and start using NETH here!

About Proximity

Proximity is a research and development firm supporting the NEAR DeFi ecosystem through investments, developer support, open-source software, and advisory services. The Proximity team consists of former members of the NEAR Foundation, Binance, Consensys, Facebook, and more. It has advised numerous DeFi projects contributing to both NEAR and Aurora’s recent success.

Website · Twitter · Get in Touch · 10M Orderbook Fund

--

--

NEAR Protocol
NEAR Protocol

Published in NEAR Protocol

NEAR is the network for a world reimagined. Through simple, secure, and scalable technology, millions are empowered to invent and explore new experiences. Business, creativity, and community are being reimagined for a more sustainable and inclusive future.

Proximity
Proximity

Written by Proximity

Proximity is a R&D firm supporting projects building DeFi applications on NEAR and Aurora through grants, advisory services, and developer support

Responses (5)