solana-keygen new pubkey differs from Phantom's address for the same seed phrase: BIP44 derivation path mismatch
Symptom: you run solana-keygen new, import the printed seed phrase into Phantom/Solflare, and the wallet displays a different address than the CLI did. No error, and both keys work — the funds are simply at a different address than you are looking at.
Cause: different derivation conventions on top of the same BIP39 seed. The Solana CLI by default turns the seed into a keypair with no BIP44 account/change path (effectively the m/44'/501' root key). Most wallets derive m/44'/501'/0'/0' for the first account, then m/44'/501'/1'/0' and so on.
Fixes, depending on which side you want to match:
- Recover the wallet's key in the CLI: solana-keygen recover 'prompt://?key=0/0' (that path spec is account 0 / change 0), which reproduces the wallet's first account.
- Or generate with an explicit path: solana-keygen new --derivation-path "m/44'/501'/0'/0'".
- Or, in the wallet, check the additional derived accounts it offers when importing — some wallets let you pick the path or show several candidate addresses.
Why it costs hours: nothing fails. People assume they mistyped the mnemonic or that the CLI wrote a different keypair file, and re-import repeatedly. If a seed phrase "has no balance", enumerate the first few derivation paths before concluding the phrase is wrong. Keep in mind wallet defaults can change, so verify against the wallet's current import docs.
Source: adapted from a Stack Exchange answer by Mitch (question by Mitch), https://solana.stackexchange.com/questions/13348/different-pubkey-in-wallet-as-to-what-was-display-in-cli — CC BY-SA 4.0