Introduction To Metamask Metamask

Jan 7th, 2022 - written by Kimserey with .

With the web transitioning to a decentralized internet, new systems and applications are being built. In order to access them, we need tools that interact with the next version of web, web 3.0. In today’s post, we will take a look at Metamask, a gateway to the decentrailized internet. We will look at what functionalities it provides and how to use it.

Setup Metamask

Metamask can be installed from the chrome store:

Once installed, we are prompted with either importing an existing wallet or creating a new wallet.

metamask_1_wallet.png

We can setup a new wallet by seleting Create a Wallet, add a password which will allow us to lock/unlock Metamask and lastly get the Secret Recovery Phrase.

metamask_2_mnemonic.png

The recovery phrase, also called a mnemonic, is a set of words which will allow us to recreate our wallet in the event of us losing it. In other words, using the passphrase, we are able to get onto another computer, redownload Metamask and input the passphrase to reconstruct our full wallet. Hence make sure to keep it somewhere safe if you are planning to use this wallet for your personal tokens.

Then once we finished the setup, we now have the plugin available on chrome.

metamask_3_plugin.png

We are now ready to interact with applications running on web 3.0, also known as dApps (decentralized Apps).

Passphrase and Accounts

The reason why we started by creating a wallet with Metamask is that in order to interact with decentralized applications, we need a wallet which is able to gather our tokens and connect to specific networks and contracts.

Metamask is an implementation of a Hierarchical Deterministic (HD) Wallet. A wallet is a piece of software which keeps secure our private keys tied to each of our accounts. A HD Wallet, like Metamask, is a specific kind of wallet which can generate deterministic key pairs based on a seed. The passphrase and default account can be used to recreate the whole wallet.

For example, we created our first account which has the following public address 0x4afb0b8C89c9b1BE5199Af631d017B99336D1b5A.

We can then create a new account:

metamask_4_new_account.png

And we can see that the address created has the following public address 0xEe6A27aD806dDC377dF87aB22B556e581031fBd9

Now if we lock the wallet and re-import the wallet from scratch:

metamask_5_import.png

We can see that only our first account 0x4afb0b8C89c9b1BE5199Af631d017B99336D1b5A was restored. But if we create again a new account, we can see that the next account generated is 0xEe6A27aD806dDC377dF87aB22B556e581031fBd9.

Hence using the mnemonic phrase and the first account, we will be able to recover the whole wallet by just recreating the accounts hence the deterministic aspect.

Connect to Sites

Now that we have Metamask setup, we can use it to buy, send or swap ETH and manage our tokens within the wallet. Other than managing your tokens, Metamask also allows us to connect to all ethereum based dApps.

We can find a list in DappRadar where DeFi (decentralized finance) apps, games and more are available.

When navigating to one of those sites, we will be prompted to connect our Metamask.

metamask_pancake.png

and review carefully the requests:

metamask_pancake_2.png

We are now able to interact with dApps with Metamask:

metamask_pancake_3.png

Conclusion

In today’s post, we looked at how we could use Metamask to connect to decentralized applications. We started by looking at how to setup Metamask, we the moved on to look at how the accounts were being created and could be recovered through the mnemonic passphrase and lastly we showed an example of an interaction with Pancakeswap, one of the largest decentralized exchange. I hope you liked this post and I’ll see you on the next one!

Designed, built and maintained by Kimserey Lam.