Recover your Bitcoin in Breadwallet (BRD)

Leo Weese 獅 草地
Bitcoin Bytes
Published in
5 min readDec 15, 2022

--

I, like many others, was a big fan of Breadwallet (later called BRD), an easy to use bitcoin wallet for iOS and Android. I like, many others, was deeply disappointed when the “SPV” wallet bricked itself on short notice, surprising its users with an imminent “Coinbase” takeover. To recover their funds, users were nudged (coerced) to install Coinbase wallet.

Coinbase wallet however is to this date unable to recover the bitcoin of all its users, especially those who at some point switched from legacy addresses to native segwit. If you, or somebody you love, suspect they lost bitcoin in the customer acquisition raid of Coinbase, this guide is for you.

What happened

BRD uses BIP39, a long-established standard to generate near infinite bitcoin addresses from a single seed. This allows us to recover our bitcoin using a different wallet even in the event that BRD were to disappear (as it did). For users who at some point during the lifetime of their wallet switched from legacy addresses to native segwit however, Coinbase fails to recover the funds in both address types, as they are held in the same derivation path but different address types.

How to recover your bitcoin

To recover our bitcoin, we are going to use Electrum wallet, as it gives us just enough advanced features to recover all our BTC even in rare edge cases. Only download Electrum from its original source and ideally verify checksums or GPG signatures! They link to handy tutorials on how to do that in their Download page.

Recover legacy wallet

A) First, we are going to recover our bitcoin held in legacy addresses. These are addresses that begin with a 1 and look like this: 14LtaXYtNsXcrpPo7RpyqjzwRSZgZ6JGXE

As legacy addresses were the default for all of BRD’s lifetime, your wallet most likely will have a legacy address associated with it.

Create/Recover a new wallet

B) We click ‘Next’, then select ‘Standard Wallet’ and continue

C) ‘I already have a seed.’

Enter your seed, make sure the checksum is correct and select BIP39 under Options

D) As we are about to enter our seed phrase, we have to specify under ‘Options’ that this is a BIP39 seed. A good indicator for whether you entered your seed phrase correctly is the notice ‘BIP39 (checksum: ok)’.

E) In the next step, we will choose the ‘legacy’ address type and modify the derivation path. The derivation path BRD used was m/0' which we can type in the field below.

First we will recover the legacy wallet

F) We are now asked to select a password and are shown a list of our transactions. If you see a positive balance, you may send it to your new bitcoin wallet now.

The balance as you see it now should match the balance of other recovery tools or Coinbase wallet. It is here where things get tricky.

Recover the Segwit Wallet

Segwit is a transaction type introduced to Bitcoin in 2017 that saves you a small amount of transaction fees. These addresses look like this: bc1qx5kpyquffu56a3zhtp0aqqfw2f4zymq7pekwq0

First, we are going to repeat steps A) to F) from above with the difference that we now select ‘native segwit’ in step E).

A) File -> New/Restore, give it a name and click next.

B) Select ‘Standard wallet’.

C) Choose ‘I already have a seed’.

D) We enter our seed phrase and select ‘BIP39’ under ‘Options’ and look out that the checksum is okay.

E) We will choose ‘native segwit’ and enter the derivation path m/0'

F) Enter a password and go to the next step

If you can see a list of transactions here, you most likely will also see a positive balance. Congratulations, you are done with your recovery and can the BTC to your new wallet.

If you do not see any transactions here, we still have a few tricks up our sleeves.

G) First, we will increase the “gap limit.” This limit tells your wallet, in this case Electrum, how many addresses it should search for a balance. If you have made a lot of transactions with your breadwallet’s legacy wallet, then Electrum won’t be able to find any bitcoin in the corresponding segwit addresses (each legacy address maps to one segwit address in BRD, but only one of the two is used for a transaction).
To increase the gap limit, we will need to enter the console.
Under ‘View’ click on ‘View console’ then navigate to the console. It will display a warning to be careful. Don’t paste code into this field that you do not understand!
We are going to enter wallet.change_gap_limit(1000)
This will make Electrum look through at least 1000 addresses, even if they are all empty.

If you still do not see a balance, we have one final trick up our sleeves. Your BTC might be in the change address, where Electrum does not apply the gap limit. Here we will have to manually create new addresses.

H) Type the following into the console to generate new addresses:
for i in range(0, 100): wallet.create_new_address(True)

You may run this command multiple times if you have made a lot (e.g. hundreds) of Bitcoin transactions before you enabled segwit in your wallet.

The Electrum Console

At this step you should have recovered all your bitcoin in BRD and you can move them safely to a wallet other than Coinbase, Binance or any other exchange. You can use bitcoin.org to find a wallet that is right for your needs and platform.

Your recovery is complete once you find any transactions in the two Electrum wallets we created. Once Electrum finds one transaction, it typically finds them all. If you do not find any funds in your segwit address, you may have never enabled this feature or have to repeat these steps carefully.

Tip: You can likely use the most recent transaction visible in your legacy wallet to determine whether a segwit wallet exists. In that case, at least one of the two outputs should be an address starting with bc1q. A blockexplorer should be able to indicate with a green arrow whether the funds in that change address are still unspent, meaning they have not yet been recovered.

If you have trouble with this guide or want to brag about how many sats you were able to recover, comment below or find me on Twitter.

--

--

Passionate about privacy, encryption, bitcoin and the everlasting Hong Kong thriller. PGP/OTR please!