In the crypto ecosystem, a derivation path is a way to generate multiple unique addresses from a single root seed phrase. This is achieved using a standardized mathematical algorithm called Hierarchical Deterministic Wallets (HD Wallets).
The purpose of a derivation path is to create a hierarchical structure of addresses that can be used to receive and send transactions. Each level of the hierarchy is determined by a particular derivation index, which is used to generate a unique private key and public key pair.
The most common derivation path used in Ethereum is known as the BIP32/BIP39 standard. BIP32 describes the hierarchical structure of the wallet, while BIP39 describes the seed phrase generation and recovery process.
To generate a new address, a user starts with a root seed phrase. This seed phrase is typically a list of 12, 18, or 24 words chosen from a predefined list of words. The seed phrase is then converted into a binary sequence, which is used as the initial input for the BIP32 algorithm.
Here is a sample word list, called a mnemonic:
daughter welcome giant suspect curious tomato
meadow suffer correct subject manage smoke
The BIP32 derivation path consists of a series of hardened and non-hardened derivation indexes. A hardened derivation index is used to derive a new private key, while a non-hardened derivation index is used to derive a new public key.
Each level of the hierarchy corresponds to a specific index in the derivation path. For example, the first level of the hierarchy is typically represented by the index “m/0’”, where the apostrophe denotes a hardened derivation. The second level might be represented by the index “m/0’/0”, which is a non-hardened derivation.
Using this method, a user can generate an almost unlimited number of unique addresses from a single root seed phrase. This is useful for maintaining privacy, as well as for managing large numbers of transactions across multiple addresses.
Derivation paths are also used to generate smart contract addresses in Ethereum. In this case, a special derivation path known as the BIP44 path is used. This path is similar to the BIP32 path, but it includes additional indexes for different types of Ethereum accounts, such as regular accounts and smart contract accounts.
Let’s use the following mnemonic and generate a handful of addresses using different derivation paths. The following uses the menmonic above.
Generating Ethereum Addresses
In Metamask, or in a wallet that will that is on the Ethereum network, it will use the key 60.
Notice the incrementing number at the end, in your wallet, when you click ‘add wallet’, this increments and you get a new address! One mnemonic can create thousands of addresses!
Generating RSK Addresses
Different networks use a different derivation paths to create different addresses on the same network. This is a privacy feature because if you know my address on Rootstock, you shouldn’t be able to see my assets on Ethereum. Speaking of Rootstock, it uses 131 as its key.
Generate Bitcoin Addresses
You can even use the same mnemonic on a non-EVM chain to create addresses. Here is Bitcoin, which uses the key of 0:
In conclusion, a derivation path is a crucial component of the crypto ecosystem, allowing users to generate multiple unique addresses from a single root seed phrase. This method helps to maintain privacy and security while managing large numbers of transactions across multiple accounts. Understanding how derivation paths work is essential for anyone looking to use Ethereum for transactions or smart contracts.
If you want to learn about the capitalization of addresses, see Checksums are for Humans