In this guide we’ll show you how to add the Avalanche network to Metamask so that you can connect to Avalanche blockchain and explore its rapidly-growing, ultra-fast DeFi ecosystem! Also, we’ll walk through on how to send AVAX coins to your MetaMask Avalanche address. You need AVAX tokens as fees to interact with the Avalanche ecosystem. This is similar to ETH and BNB being used as fees on the respective blockchains.
So why do I have to use Metamask for AVAX? Can I not just use the Avax wallet (https://wallet.avax.network/wallet)? Using Avax wallet you can store AVAX, Avalanche tokens (ARC20) and collectibles. Also you can transfer token between chains but there is no option to connect and interact with the DApps on the Avalanche network. You need a web3 wallet for this and Metamask is the most popular application for connecting with DApps.
Metamask and Avalanche
Ethereum’s high gas fees and scaling issues have forced many projects to launch on the other blockchains. To alleviate some of Ethereum’s scaling woes there are several trustless Layer-2 solutions on Ethereum for example Polygon and Arbitrum. These layer 2 sidechain protocols solves Ethereum’s scaling issues by providing cheap and fast on chain transactions.
On the other hand there are Layer 1 blockchains that features high scalability and fast confirmation times with full Ethereum smart contract functionality. They are EVM (Ethereum Virtual Machine) compatible blockchains that supports all EVM based smart-contracts, protocols, and atomic cross-chain token transfers. Some good examples of L1 EVM blockchains are BSC (Binance Smart Chain), xDai chain, Tomo Chain etc. Avalanche (AVAX) is one of them but is quite distinct than the other protocols.
Now Metamask is a crypto wallet and a gateway to blockchain applications. Its a critical piece of user experience and interface for DeFi ecosystem. Metamask is something that we mainly use for Ethereum but it also supports and can be used with many other blockchains that supports Ethereum Virtual Machine (EVM).
Previously we’ve made guides on connecting metamask to binance smart chain and connecting metamask to polygon matic network. Similarly this guide is all about setting up Metamask to connect to the Avalanche network.
Now before you setup MetaMask on Avalanche, connect and get started using the Avalanche Network here is a quick overview of the Avalanche ecosystem.
Avalanche is an open-source platform for launching and building of decentralized applications (DApps) and enterprise blockchain deployments in one interoperable, highly scalable ecosystem.
Avalanche (AVAX) is being called as a Layer 1 ETH killer. It is quickly gaining popularity in the recent times and is a popular Ethereum alternative because of the cheaper and faster transaction times. Avalanche blockchain attempts to address the shortcomings of the preceding blockchains such as security, centralization and most importantly scalability.
It claims to be cheaper (lower gas fees), faster and more secure blockchain than the Ethereum. Avalanche uses Proof of Stake consensus mechanism. The transactions times are as low as 3 seconds, and it is said to handle over 4500 TPS (transactions per second). Because of the low fees and faster transfer times Avalanche is considered as an excellent solution for decentralized finance (DeFi). Most DeFi users are interested in Avalanche because of its capabilities.
The Avalanche Ecosystem
Unlike most blockchains that are powering decentralized finance; Avalanche is quite different as it is subdivided into three distinct blockchains.
Avalanche’s main network is the subnet that has three separate chains. It features 3 built-in blockchains namely
- Exchange chain (X-Chain)
- Platform chain (P-Chain)
- Contract chain (C-Chain)
The X Chain acts as a platform for creating and trading real world resources and digital smart assets.
The P Chain is the metadata blockchain that coordinates validators, enables creation of new subnets and keeps track of custom chains.
The C Chain is an instance of the Ethereum Virtual Machine that is powered by the Avalanche’s Snowman consensus protocol. Using Ethereum’s standard RPC calls C-Chain RPC can do anything a typical Ethereum client can.
The C Chain supports smart contracts and since it can execute EVM contracts it features ERC20, NFT and DApps. All the features of Ethereum combined with the benefits of Avalanche greatly improves the performance of DApps and user experience.
Note: Since only C Chain is EVM compatible Metamask can only connect to the Avalanche networks C Chain.
Alright! Let’s now connect Metamask to the Avalanche network.
How to Connect MetaMask to the Avalanche Network (AVAX)?
Connecting Metamask to Avalanche is very simple. Those who have used Metamask on Binance Smart Chain; its a very similar process. All you need to do is enter the inputs in custom RPC that will allow metamask to connect and interact with the Avalanche blockchain. It only takes a few minutes to get everything up and running.
Those who are new we hope you have Metamask ready. If not then follow this tutorial on how to setup and use Metamask. Its available as IOS, Android app and as Chrome, Firefox, Brave and Edge browser extension.
Once you have the MetaMask wallet installed follow the guide on how to set up Metamask for Avalanche blockchain.
Setting up Avalanche network on Metamask:
1. Open your web browser and click on the Metamask logo at the top right corner.
2. Next click on the account options and choose expanded view for more convenience.
By default Metamask connects to the Ethereum mainnet. You can connect it to other networks by first creating a custom RPC network.
3. Drop down Ethereum Mainnet and choose custom RPC. Or Drop down accounts and click settings. Then navigate to networks menu.
A list will appear containing all the networks that your MetaMask can connect to. You’ll also find the option to add new custom network.
4. Click add network and fill in the Avalanche network details as below.
- Network Name: Avalanche Network
- New RPC URL: https://api.avax.network/ext/bc/C/rpc
- ChainID: 0xa86a or 43114
- Currency Symbol: AVAX
- Block Explorer URL: https://cchain.explorer.avax.network/
Make sure you’ve entered all the data such as Network Name, New RPC, ChainID, Symbol and Block Explorer. Once done click save to add the Avalanche network to Metamask.
Note: In ChainID field you can either enter 43114 or 0xa86a. 0xa86a is just the hexadecimal representation of its decimal form: 43114. Anyways Metamask displays the Chain ID in decimal form.
All these settings is mentioned on the Avalanche docs section for developers:
Here you can find Avalanche Mainnet settings, FUJI Testnet settings as well as Local Testnet (AVASH) settings which is the Testnet and local developer environment (Avash).
Here in this guide we are connecting to the Avalanche mainnet C-Chain.
Once you’ve entered the Avalanche mainnet C-Chain network details drop down networks of your Metamask extension and switch your current network to Avalanche network.
Metamask will show error in case if it doesn’t connect to network successfully. If that is the case then ensure the network details are correct.
That’s it. Now you are all set. You’ve now successfully connected your MetaMask to the AVAX network mainnet.
Now In order to interact with the DApps on Avalanche blockchain, you need AVAX tokens for fees similar to ETH and BNB.
Sending AVAX to Metamask connected to Avalanche
Once you get some Avalanche AVAX token you can send them to your Metamask wallet. But wait! Now depositing AVAX tokens into your Metamask wallet is where it gets tricky.
Note: All transactions on the Avalanche blockchain is paid with AVAX tokens. This is gas fees similar to ETH and BNB used on the respective blockchains. Also your wallet address on Metamask is same for both Avalanche mainnet as well as Ethereum mainnet. However you cannot straight away transfer ARC-20 tokens to the Avalanche network.
As we said Avalanche has multiple chains on it such as X Chain (Exchange), P Chain (Platform) and C Chain. The important point to note is that your Metamask is connected to the Avalanche Mainnet C-Chain so only the C-Chain address is compatible with Metamask. So you need to be very careful when transferring tokens (ARC20) to and from Avalanche network.
How to withdraw AVAX into Metamask wallet?
Funding Metamask AVAX C-Chain address depends on where you are sending the tokens from. For example certain exchanges like Binance, Kucoin allows you to withdraw and deposit directly to the AVAX C-Chain address.
Copy the address from Metamask and paste it in the withdrawal address on the Binance exchange. Then make sure you’ve selected AVAX C-Chain address. Next enter the amount to send and click withdraw. Try with small amount. If the coins doesn’t show up then make sure the current network in your Metamask is set to Avalanche blockchain.
Also use the Avalanche C-Chain explorer https://cchain.explorer.avax.network/ (Similar to Etherscan on Ethereum) to trace your coins.
That’s it! You’ve deposited AVAX tokens to your Metamask C-Chain address. Likewise if you want to transfer AVAX from Metamask to Binance or any other exchange then choose C-Chain address for deposits.
If Binance is your primary exchange then you can deposit / withdraw tokens to and from Metamask avalanche chain and Binance exchange account directly. Just ensure you are using C-Chain address for transfers. Its very straightforward. Do not accidentally transfer it to wrong address or chain.
If you are transferring to or from Metamask then be careful not to transfer it to X-Chain address or P-Chain address. Only use the C-Chain address for transfers.
Alright! But what if C-Chain is not supported.
For example certain services do not support deposit or withdrawals to C-Chain address yet. In this case you’ll have to use the Avax wallet cross chain feature.
Cross Chain swaps – AVAX
Now if you are holding AVAX tokens on Metamask and want to transfer it to Avalanche wallet then copy the C-Chain address from AVAX wallet and send it from Metamask. You are sending your Avax coins from metamask to your Avalanche wallet C chain address.
For example let’s assume you want to send coins to your Metamask Avalanche but the exchange where you are withdrawing from do not support C-Chain address yet. In this case transfer the coins to AVAX wallet X Chain address. Then using the cross chain feature swap token from X-Chain to C-Chain. Then send from C-Chain avax wallet to your C-Chain address on Metamask.
Here is how to cross-chain transfer:
Cross chain transfer:
Go to https://wallet.avax.network/, and access your Avalanche Wallet.
On the left hand side you’ll find cross-chain feature.
Choose the source chain where you have the amount and the destination chain to which you wish to convert to. Then enter the transfer amount and click confirm.
For example if you have coins in your AVAX wallet X-Chain then choose source chain as X-Chain. Choose the C-Chain as destination chain, then enter the amount and finalize the transaction. The coins will be transferred from X-Chain to C-Chain.
Now you can send the coins or tokens from your Avalanche wallet C-Chain to your Metamask C-Chain address.
Click send on your Avalanche wallet, choose source chain as C-Chain, enter your Metamask wallet address, set gas and confirm the transfer.
Okay, now what about ERC20 and BEP20 tokens? How do I convert it into ARC20 and deposit those tokens into my Metamask Avalanche network?
For transferring between ERC20 to Avalanche network you can use the Avalanche Avax bridge: https://bridge.avax.network/login
For BSC you can send it to Binance and from Binance withdraw it to your Metamask address. We’ve not yet found a bridge for BSC to AVAX. Once we find one we’ll make a detailed tutorial on transferring between different chains.
Funding your testnet Metamask AVAX wallet
If you need testnet AVAX, you can request from the AVAX Test Network Faucet service at https://faucet.avax-test.network/
That’s all! We hope this guide is useful. Be very careful when messing around with different blockchains especially when you are putting value in there. Always try transferring with small amounts to check it is all working and to ensure you got it all right. Only then you should proceed with big transfers.
Sending AVAX to Your MetaMask Connected to Avalanche and sending coins out of Metamask Avalanche network can get quite confusing at the start. But you’ll quickly get use to it. Once you get funds to the Avalanche blockchain you can start trading and exchanging ARC 20 tokens. For instance you got tools tools like the Automated Market Maker (AMM) Pangolin (https://pangolin.exchange/) and many other amazing DApps.