EIPs Explained

ERC-601 · Final · ERC · 2017-04-13

ERC-601: Ethereum hierarchy for deterministic wallets

Defines an Ethereum-specific HD wallet path, m/43'/60'/601'/w', so that wallets derive the same accounts from one seed instead of using incompatible BIP-44 variants.

What problem does it solve?

A hierarchical deterministic (HD) wallet turns one seed phrase into many keys by following a derivation path (BIP-32). If two wallets use different paths, the same seed opens different accounts. When this EIP was written, Ethereum wallets used several different paths, and some of them broke the BIP-44 rules. Users who restored a seed in another wallet sometimes saw an empty account, or had to type a path by hand.

The authors also argue that BIP-44 was designed for UTXO coins like Bitcoin. Its change level and similar parts mean nothing in Ethereum's account model. So EIP-601 proposes a separate, simpler tree just for Ethereum.

How it works

The path has four levels, and every level uses hardened derivation ('):

m / purpose' / subpurpose' / EIP' / wallet'
m / 43'      / 60'         / 601' / 0'
Level Value Meaning
purpose 43 BIP-43 purpose for a non-Bitcoin scheme
subpurpose 60 SLIP-44 coin type for Ethereum
EIP 601 Number of the EIP that defines the rest of the path
wallet 0, 1, 2… A separate identity (account) in the same seed

Wallet rules:

  • Number accounts from 0 in order. Do not create account n+1 while account n has no transaction history.
  • After importing a seed, scan for all used accounts.

The first three levels come from ERC-600, which reserves m/43'/60'/<eip>' so that any EIP can define its own key tree under its number. EIP-601 is the tree for ordinary user accounts.

Sample code

Deriving the first EIP-601 account versus the common BIP-44 path (ethers v6):

import { HDNodeWallet } from "ethers";

const phrase = "test test test test test test test test test test test junk";

const eip601 = HDNodeWallet.fromPhrase(phrase, undefined, "m/43'/60'/601'/0'");
const bip44  = HDNodeWallet.fromPhrase(phrase, undefined, "m/44'/60'/0'/0/0"); // ethers default

console.log(eip601.address); // different from...
console.log(bip44.address);  // ...this one: same seed, different account

Things to know

  • Even though the status is Final, most wallets did not switch. MetaMask and ethers default to the BIP-44 style path m/44'/60'/0'/0/i, and most other wallets use similar m/44'/60'/... paths. If you derive with the EIP-601 path, other wallets will not show those accounts unless the user enters the path by hand.
  • The spec text still mentions "eip-draft-ethereum-purpose". That draft corresponds to ERC-600, by the same authors. The test cases and implementation sections say "TBD" and "None yet", so there is no official test vector.
  • Ethereum's consensus-layer (BLS) validator keys use their own path, m/12381/3600/..., defined in EIP-2334.

#wallet #hd-wallet #bip32 #keys

Details

Authors
Nick Johnson (@arachnid), Micah Zoltu (@micahzoltu)
Status
Final
Type
Standards Track / ERC
Created
2017-04-13

Machine-readable: Markdown · JSON