Metamask’s Snap platform may usher in a wave of entrepreneurship similar to small programs

Author: Lightning HSL

As the wallet with the largest number of users in the currency circle, Metamask has always only supported EVM-compatible chains.

Just last week, Metamask finally officially launched the snap platform, which has been in beta for a long time.

Visit to see specific products.

Briefly described, Snaps is Metamask extending its wallet business to non-EVM compatible chains. To be more precise, as long as the private key is a chain that meets the HD wallet (hierarchical deterministic wallet) standard, the Snaps platform can be used to develop and manage the chain. wallet.

HD wallet, that is, hierarchical deterministic wallet, is now almost the lowest standard for private keys in all blockchains. To understand HD wallet, you need to understand two concepts.

One is the mnemonic phrase.

The mnemonic phrase is the 12, 18 or 24 words we copied down when we backed up our wallet. The mnemonic is essentially a random number, randomly selecting 12, 18 or 24 words from a library of 2048 words.

This process of randomly selecting words is completed by a very complex algorithm. The entropy of the mnemonic words formed by this algorithm is very strong. The probability of trying to collide with the existing mnemonic words through explosive force is infinitely lower than zero. . That is to say, the mnemonic words we obtain through this algorithm are unique in the universe and will not be the same as those produced by others.

This mnemonic is also often called a seed.

The mnemonic phrase is not used to directly manage coins, that is, the private key used to construct and sign transactions. What can really be used to sign transactions is the private key, which is derived from seed.

The second is the derivation path.

After we have the mnemonic phrase, we can generate n multiple addresses in Metamask. Each address is calculated by a seed through a certain algorithm.

This algorithm and calculation process can be simply understood as the following function:

f(seed, derivation_path) -> (private_key, public_key)

Derivation_path means derived path.

By taking the mnemonic seed and the derivation path as parameters and substituting them into the algorithm, the specific private key and address can be calculated.

The derived path is essentially a string that looks like ‘m/44’/0’/0’/0’.

where m represents the seed;

44’ refers to the BIP44 standard. There are usually other standards, but BIP44 is the most commonly used.

The second number represents different cryptocurrencies, that is, different chains. 0 is the derivation path of Bitcoin, 60 is Ethereum, and 2 is Litecoin.

The number occupied by the last zero represents the address index. If the first two derivation paths are the same, the last ones are 0 and 1 respectively, which correspond to the first address and address you generated on the wallet (such as Metamask). Second address.

There are also several concepts that are also important for wallet-supported coins, such as address format and transaction data structure.

Metamask has always only supported coins from EVM-compatible chains. All EVM-compatible chains can use the same key derivation path, and the address format and transaction data structure of these EVM-compatible chains are exactly the same as Ethereum, so it is very convenient to use Metamask for unification. manage.

However, non-EVM compatible chains, such as BTC and sui, use the same mnemonic standard as Ethereum, but have different derivation paths, different address formats, and different transaction data structures.

This makes it difficult to manage using Metamask.

snap is a platform designed to solve these differences.

Snap allows third-party developers to solve the problem of different derivation paths, different address formats, and different transaction data structures, resulting in Metamask being unable to manage these coins.

The way snap manages coins is that Metamask generates and stores mnemonics. A third-party developer develops a front-end page that contains the derivation path, calls Metamask to generate the address of the coin, and displays the address format on this front-end page.

The transaction data structure is also constructed by the front-end page.

The final transaction signature is completed by calling the private key derived from the mnemonic managed by Metamask on the front-end page.

The private key and address generated using the derived path cannot be used to calculate the mnemonic in reverse, so the front-end page wallet developed by a third party on the snap platform cannot obtain the mnemonic stored in Metamask.

Why do I feel that Snaps will usher in a small wave of entrepreneurship?

In addition to Metamask providing the largest user traffic in the currency circle, it also has a foundation of user trust. More importantly, the snap platform also allows developers to have a front-end page of the wallet, which can be used to do many businesses.

Moreover, because of the snaps.metamask.io mechanism, developers can self-certify that they cannot misappropriate user assets. The use of all assets requires users to sign with Metamask to complete.

Many business logics in the currency circle can be migrated to snap.

View Original
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
  • Reward
  • Comment
  • Repost
  • Share
Comment
0/400
No comments
Trade Crypto Anywhere Anytime
qrCode
Scan to download Gate App
Community
  • 简体中文
  • English
  • Tiếng Việt
  • 繁體中文
  • Español
  • Русский
  • Français (Afrique)
  • Português (Portugal)
  • Bahasa Indonesia
  • 日本語
  • بالعربية
  • Українська
  • Português (Brasil)