Breez: Lightning Network Client & Point-of-Sale

4 minute read

Published:

Wallet Logo

This relatively new app currently has more than 1000 downloads and the latest APK (version Varies with device) was from 3rd April 2020.

Our analysis was done on 28th December 2019 based on data found in their Playstore description and their website and their source repository. We discuss the issue with verification with the provider here. In our GitLab this app is discussed in Issue #70.

We found these ways of contacting the developers:

Help spread awareness for build verifiability

Please help us spread the word, asking Breez: Lightning Network Client & Point-of-Sale to support verifiable builds via their Twitter!

Disclaimer

The following Analysis is not a full code review! We plan to make code reviews available in the future but even then it will never be a stamp of approval but rather a list of incidents and bad coding practice. We cannot find and tell you all the dark secrets the wallet providers might have.

Do your own research!

Try out searching for "lost bitcoins", "stole my money" or "scammers" together with the wallet's name, even if you think the wallet is generally trustworthy. For all the bigger wallets you will find accusations. Make sure you understand why they were made and if you are comfortable with the provider's reaction.

The Analysis

A description to our liking. Here it is in full:

Breez is a Lightning Network client which makes paying in bitcoin a seamless experience. With Breez, anyone can send or receive small payments in bitcoin. It’s simple, fast and safe.

Ok, seamless, lightning, … nice.

Breez is a non-custodial service that uses lnd and Neutrino under the hood.

We want to hear that! Be your own bank!

For more technical information, please go to: https://github.com/breez/breezmobile.

So they are non-custodial and open source. More work for us :)

Warning: the app is still in beta and there is a chance your money will be lost. Use this app only if you are willing to take this risk.

That’s certainly inspiring more confidence than other apps with 2 months of track record claiming to be the best in the world. :)

Well, in terms of Build Instructions the app is lacking.

$ git clone git@github.com:breez/breezmobile.git
$ cd breezmobile/
$ git tag
0.5-openbeta
0.5.8-openbeta
0.5.9-openbeta
0.7-openbeta
0.8.improvements

As on the playstore it says “Current Version: Varies with device”, we go with what google gives us when we install it on a phone: 0.8-beta. The best match above would thus be the tag 0.8.improvements:

$ git checkout 0.8.improvements 
$ cat android/app/build.gradle | grep version
        versionCode 1
        versionName "0.8-beta"
            versionNameSuffix "-pos"

looks good so far. For now. We will not guess like this in the future.

Build breez.aar and bindings.framework as decribed in breez/breez

$ git submodule status 
$

… so … the build instructions give no clue which version of breez/breez to build and there is no submodule?

$ git clone git@github.com:breez/breez.git
$ cd breez
$ git tag
0.5-openbeta
0.5.8-openbeta

Had there been a 0.8… in the breez project, we would have had a clue where to go next but absent that, there is no hope of building this project deterministically.

Breez-team, your app is new and interesting but please improve your build documentation! Our wish-list:

  • The app should be buildable without having to create any account. You could provide a dummy configuration for firebase but for deterministic builds, you better provide your actual configuration as obfuscating your app is making it non-verifiable and not obfuscating it results in “anybody” finding your api keys anyway. Running apktool d -o fromPlay breezFromGooglePlay.apk we see you are not obfuscating right now, which is good but even with obfuscation, api keys can be extracted rather trivially.
  • Repositories this app depends on, should be referenced as submodules. It’s easy: git submodule add https://github.com/breez/breez.git. It is recommended to use https for submodules, so people don’t have to register an account with GitHub to clone the project.
  • Always tag the exact version released with a consistent name, ideally the same as the versionName.
  • Please provide build instructions almost as simple as:
    1. docker build . --tag breezmobile
    2. git checkout [versionName]
    3. git submodule update --init --recursive
    4. docker run --rm --volume $(pwd):/project --workdir /project breezmobile ./build.sh
    5. you find the unsigned APKs in the folder …

Verdict Explained

Not verifiable: The provided Open Source Code could not be verified to match the app released on Google Play

This verdict means that the provider did share some source code but that we could not verify that this source code matches the released app. This might be due to the source being released later than the app or due to the provided instructions on how to compile the app not being sufficient or due to the provider excluding parts from the public source code. In any case, the result is a discrepancy between the app we can create and the app we can find on GooglePlay and any discrepancy might leak your backup to the server on purpose or by accident.

As we cannot verify that the source provided is the source the app was compiled from, this category is only slightly better than closed source but for now we have hope projects come around and fix verifiability issues.

The app cannot be independently verified. If the provider puts your funds at risk on purpose or by accident, you will probably not know about the issue before people start losing money. If the provider is more criminally inclined he might have collected all the backups of all the wallets, ready to be emptied at the press of a button. The app might have a formidable track record but out of distress or change in management turns out to be evil from some point on, with nobody outside ever knowing before it is too late.