1

Looking at MetaMask's source code (commit 99ed42), I can see that the derivation paths for Ledger Live and BIP44 differ slightly:

const LEDGER_LIVE_PATH = `m/44'/60'/0'/0/0`;
const BIP44_PATH = `m/44'/60'/0'/0`;

Ledger Live has an extra 0.

So why do these two derivation paths generate the same address in MetaMask?

I'm getting the same address when I choose either path in the dropdown!

MetaMask HD Path

1 Answer 1

2

That extra zero indicates the key pair number derived from the master seed(commonly referred to as address_index). You can read more about it here https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki. The derivation path means:

m’ / purpose’ / coin_type’ / account’ / change / address_index

As you can see the last is address_index which is usually appended at the last of the master derivation path, in your case at

const BIP44_PATH = `m/44'/60'/0'/0`;

This is to generate various accounts (when you click "Generate a New Account" in MetaMask) from the same mnemonic. So subsequent address paths would be:

m/44'/60'/0'/0/0  //First Account or key-pair
m/44'/60'/0'/0/1  //Second Account or key-pair
m/44'/60'/0'/0/2  //Third Account or key-pair

For the ledger, the first account is usually used for doing transactions, so the address with 0 for the first account is already hard-coded in the string.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.