How to Add a Custom Network to MetaMask
|
Custom RPC Metamask |
This is a good question because many users are not aware of different specialized networks with lower gas costs or how to set them up in MetaMask.
Some people mistakenly think that MetaMask charges high fees and tries to rip it off. In reality, it is the market demand for blockchain networks that determines the price. MetaMask has no control over this. Plus, we love our users.
If things get expensive on one network, you can go to another network with possibly lower fees, while Ethereum starts to scale and lower costs.
TL; DR:
- The dedicated network is an Ethereum compatible network.
- Gas is determined by network requests, not by MetaMask or any wallet provider.
- Different networks have different gas costs based on their design and demand.
- Sidechains and Layer-2 solutions are special types of networks that you can add to MetaMask. They may have lower gas costs at the expense of decentralization or security.
- Sidechains and Layer-2 solutions mainly differ on how their blocks are validated.
- Examples of custom networks are Binance Smart Chain, Polygon (MATIC), Huobi ECO Chain, Avalanche, and xDai.
After successfully installing (or re-installing 101) MetaMask and securing your secret recovery phrase (aka seed phrase) 50, you decide you want to interact with a custom network.
How do you do this? First of all, what is a custom network?
What is a custom network?
The Custom Network is a non-Ethereum network compatible with EVM (Ethereum Virtual Machine). They are based on Ethereum but not Ethereum. Think of them as Ethereum siblings or relatives. They share many of the same features but differ in several key ways.
What they have in common is that they execute smart contracts in the same way. The difference can lie in achieving consensus (agreement between different nodes) and how much data can be placed on their blockchain blocks.
Since they are an Ethereum based network, your address will be the same across all networks. That means that one secret recovery phrase (aka initial phrase) can access your assets across all your accounts and networks.
Reminder: Never share your start phrase, aka secret recovery phrase.
Why is this blockchain different?
Different blockchains can be used for different needs. As the industry evolves, many will specialize in different use cases. In general, blockchains can specialize through three avenues: scalability (high throughput), decentralization, or security. This is known as the security trilemma and states that a blockchain can have 2 of 3 properties, but not all three. This is called the trilemma of security.
Blockchain-based video games with small, high transaction volumes will have different requirements than borrow/borrow protocols. Video games will require high throughput and be willing to sacrifice a little security. Lending and lending protocols will value security and decentralization over higher throughput. The real-world effect of this exchange is that a less scalable blockchain generates higher gas but is more secure.
Each network usually has its own special token which is used to pay for network activity. Ethereum uses ETH (Ether). Binance uses BNB. MATIC is the native token for Polygon.
MetaMask and Gas Fees
The reason gas prices are high is not that MetaMask controls costs. MetaMask is just a valuable interface to the internet. This is similar to how your web browser is an interface to the internet of information.
No wallet can control gas costs on the blockchain network because the demand dictates it. There is very little space in blockchain blocks, which are offered by those who want their transactions confirmed. Currently, miners choose the highest paying fees to maximize profits and remain incentivized to run the network.
What is Side Chain vs Layer-2?
Sidechains and Layer-2 chains are scaling solutions to enable more transactions at less cost by removing them from the main network. Think of them as side roads that cars can drive to reduce traffic on Main Street.
In general, the difference between sidechains and layer 2 is how the network is secured. Sidechains secure their network by having their own validators or miners. That means they have greater independence and flexibility. However, depending on the number of block validators, security is lacking.
Additional note: Validators are like miners in their role of verifying network transactions. However, how independent nodes agree on their shared status (consensus mechanism) is Proof of Stake versus Proof of work.
The Layer-2 solution locks into the main network and leverages the main network validator for security. This increases their security but reduces their independence and adaptability.
You can learn more about sidechains via EthHub 64 and about Layer-2 via Ethereum.org 30.
For the more technically inclined here, listen to Vitalik Buterin talked about the Layer-2 20 solution or read about it. 2 Additionally, here is a post about sidechains from ethresearch.ch 18.
Popular Custom Networks:
- The most popular custom networks at the time of this writing (around May 2021) are:
- Binance Smart Chain
- Polygon (MATIC)
HECO (Huobi Eco-Friendly Chain)
Please note that Polygon used to be called Matic. After the rebranding, their token is still called MATIC.
Others who begin to see traction include:
Crypto is fun! Experiment with different networks and discover new things. Ethereum is the leading and most secure network that is rapidly becoming the settlement network for the world.
However, due to the high cost of gas, many are locked up. Instead of missing out on the fun, try out the new chains, including the many Layer-2 and sidechain solutions that are out now.
In general, how to set up a custom network?
Maybe your custom network is not described here. It does not matter. As the ecosystem grows, more chains will come out.
Usually, you can visit the protocol website. They will have information on how to configure MetaMask as a custom network.
Please be careful to get this information from the official website of the project. It is possible to connect to a fraudulent network and become a target for phishing or lose your funds.
What is the difference between Mainnet and Testnet?
Mainnet is where tokens have real value. Testnet is where developers test their smart contracts. The Testnet token has no value.
Testnet tokens are given out for free through the faucet. However, they are distributed in small quantities to ensure people don't stockpile them.
Avoid being fooled into thinking that your testnet tokens will be converted into mainnet tokens and pay a fee.
How to Add a Custom Network in MetaMask?
Easily find the section for adding a Custom Network in MetaMask as shown here.
Once you are in this section, configure the fields to information for your preferred Ethereum-compatible blockchain network.
Please note that neither Bitcoin, Dogecoin, or Cardano are Etheruem compatible, so they cannot be added to MetaMask and require their own wallet.
Also, please note that Binance Smart Chain (BSC) is different from Binance Chain. Binance Smart Chain is an Ethereum compatible smart contract platform that can be added. You can tell that the network is BSC, not Binance Chain because BSC addresses start with 0x (followed by address), whereas Binance Chain starts with BNB (followed by address).
How do I set up Binance Smart Chain?
For more info see their article. 526
Binance Smart Chain Mainnet
Network Name: Binance Smart Chain
New RPC URL: https://bsc-dataseed.binance.org/
ChainID: 56
Symbol: BNB
Block Explorer URL: https://bscscan.com
Binance Smart Chain Testnet
Network Name: Binance Smart Chain - Testnet
New RPC URL: https://data-seed-prebsc-1-s1.binance.org:8545/
ChainID: 97
Symbol: BNB
Block Explorer URL: https://testnet.bscscan.com
How do I set up Polygon (MATIC)?
For more info, see their official docs. 3.2k
Polygon Mainnet
Network Name: Polygon Mainnet
New RPC URL: https://rpc-mainnet.maticvigil.com/
ChainID: 137
Symbol: MATIC
Block Explorer URL: https://explorer.matic.network/
Polygon Testnet
Network Name: Mumbai TestNet
New RPC URL: https://rpc-mumbai.maticvigil.com/
ChainID: 80001
Symbol: MATIC
Block Explorer URL: https://mumbai-explorer.matic.today/
How do I set up xDAI?
For more mainnet info, please see their official docs. 73.
For more testnet info, please see POA’s official docs. 35.
xDAI Mainnet
Network Name: xDai
New RPC URL: https://rpc.xdaichain.com/
ChainID: 0x64
Symbol: xDai
Block Explorer URL: xDai (xDAI) Explorer
xDAI Testnet
No Testnet is available for xDai. For testing purposes, it is recommended that developers first deploy to the POA Sokol testnet.
POA Core is an autonomous network secured by a group of trusted validators. It is essentially a separate network with its own set of validators versus using Ethereum.
Network Name: Sokol Testnet
New RPC URL: https://sokol.poa.network
ChainID: 77
Symbol: SPOA
Block Explorer URL: POA Sokol (POA) Explorer
How do I set up Avalanche?
For more mainnet info, please see their official docs. 115
For more testnet info, please see their official docs. 15
Avalanche Mainnet
Network Name: Avalanche Network
New RPC URL: https://api.avax.network/ext/bc/C/rpc
ChainID: 0xa86a
Symbol: AVAX
Block Explorer URL: https://cchain.explorer.avax.network/
Avalanche FUJI Testnet
Network Name: Avalanche FUJI C-Chain
New RPC URL: https://api.avax-test.network/ext/bc/C/rpc
ChainID: 43113
Symbol: AVAX
Block Explorer URL: https://cchain.explorer.avax-test.network
Avalanche Local Testnet (AVASH)
Network Name: Avalanche Local
New RPC URL: http://localhost:9650/ext/bc/C/rpc
ChainID: 43112
Symbol: AVAX
Block Explorer URL: N/A
HuobiChain Mainnet (International)
Network Name: HuobiChain- Mainnet
New RPC URL: https://http-mainnet.hecochain.com
ChainID: 128
Symbol: HT
Block Explorer URL: https://hecoinfo.com
HuobiChain Mainnet (Mainland China)
Network Name: HuobiChain- Mainnet (China)
New RPC URL: https://http-mainnet-node.huobichain.com
ChainID: 128
Symbol: HT
Block Explorer URL: https://hecoinfo.com
HuobiChain Testnet (International)
Network Name: HuobiChain Testnet (International)
New RPC URL: https://http-testnet.hecochain.com
ChainID: 256
Symbol: HT
Block Explorer URL: https://scan-testnet.hecochain.com
HuobiChain Testnet (Mainland China)
Network Name: HuobiChain Testnet (Mainland China)
New RPC URL: https://http-testnet.huobichain.com
ChainID: 256
Symbol: HT
Block Explorer URL: https://scan-testnet.hecochain.com