SatoshiPortal / bullbitcoin-mobile

The Bull Bitcoin Mobile Wallet and Exchange App
MIT License
54 stars 18 forks source link

About Bull Bitcoin Mobile

Bull Bitcoin Mobile is a self-custodial Bitcoin and Liquid Network which offers non-custodial atomic swaps across Bitcoin, Lightning and Liquid. The wallet philosophy is to provide advanced features that give users the maximum control, while still being easy to use for beginners. Our goal is to make sure that anyone can take self-custody of their Bitcoin, even in a high fee environment. Our driving principle is to create a user experience which nudges the user into implementing best practices.

Following the cypherpunk ethos, the Bull Bitcoin Mobile wallet is fully open-source and trustless.

Wallet basics

At launch, two wallets are generated: the Secure Bitcoin Wallet and the Instant Payments Wallet. Both wallets are created using the same mnemonic seed, so that a single backup is sufficient for both.

Secure Bitcoin Wallet: this is a descriptor-based Bitcoin network wallet which uses bech32 segwit addresses.

Instant Payments Wallet: this is a descirptor-based Liquid network wallet which uses bech32 confidential segwit addresses.

Both these wallets are able to send and receive Lightning Network payments via the swap provider.

Core dependancies

Default external service providers

General features

Network fee estimation

Unlike most wallets which rely on Bitcoin Core's smart fee estimation algorithm, Bull Bitcoin wallet fetches the network fee estimation from a Mempool instance. Default network fee can be specified in the settings and will be used for all transactions, unless specified when creating a transaction.

There are four network fee presets:

  1. Fastest: aiming for next block
  2. Fast: aiming for three blocks
  3. Medium: aiming for 6 blocks
  4. Economical: aiming for lowest fee possible without the transaction being purged from mempools

Fee warning system

We have developped a warning system that aims to prevent the user from making uneconomical Bitcoin transactions. There are three types of warnings:

  1. Small UTXO warning: receiving Bitcoin network UTXOs of less than 0.01 BTC is considered to be uneconomical. Users are prompted to use the Liquid Network instead.
  2. High fee warning: all transactions where the network fee is over 3% of the value of the transaction trigger a warning.
  3. Slow payment warning: paying Lightning network invoices from a Bitcoin network wallet will require at least one on-chain confirmation, and thus this warning prevents users from accidentally paying a Lightning Network invoice from a Bitcoin network wallet expecting the payment to be instant.

Default wallet selection

When receiving payments, the Bull Bitcoin app will select which wallet and which network is most appropriate based on the amount to be received. By default, payments under 0.01 BTC will be directed to the Instant Payments Wallet and payments over 0.01 BTC will be directed to the Secure Bitcoin Wallet.

When sending payments, the Bull Bitcoin wallet will select the most appropriate wallet based both on the amount to be sent, and the network used by the recipients. We try to always use a wallet that is the same network as the recipient: if recipient is on-chain, use secure Bitcoin wallet and if recipient is Liquid use Instant Payments Wallet. If the recipient is Lightning, use the instant payments wallet.

Automated selection of the wallet can be overriden by the user at any time. This will most likely trigger a warning that the user can choose to ignore.

Wallet security

Hardware wallets and watch-only wallets

Privacy and UTXO management (coin selection)

Planned integration with the Bull Bitcoin exchange

Our mission is to facilitate and encourage the self-custody of Bitcoin by providing an integrated experience that combines a Bitcoin Wallet, Bitcoin Payments service and a Bitcoin Exchange (on-ramp, off-ramp). For this reason, the wallet will be fully integrated with the Bull Bitcoin API. Users will be able to manage their Bull Bitcoin accounts, buy Bitcoin and sell Bitcoin. This integration will be fully open-source. Use of the Bull Bitcoin exchange is fully optional. Users do not need to register for a Bull Bitcoin account to use all wallet features.

Non-custodial Bitcoin exchanges and payment processors such as Bull Bitcoin have existed for over a decade. When a user purchases Bitcoin, the user must first provide a Bitcoin address to the exchange. The exchange will send the Bitcoin directly to the user’s own Bitcoin wallet as soon as the Bitcoin purchase is confirmed.

The primary issue with non-custodial exchanges is that they require users to set-up a Bitcoin Wallet using a separate mobile, desktop or web app before being able to purchase Bitcoin. This creates a sub-optimal and confusing user experience, forcing the end-user to use two separate applications, sharing data (bitcoin addresses) back-and-forth between the two. Custodial exchanges provide a cleaner and more friendly user experience by providing a Bitcoin balance, a fiat balance, and a mechanism to move funds from a fiat balance to a Bitcoin balance within the same user interface. Bull Bitcoin Mobile solves the problem of having a single, integrated experience within a single mobile application without requiring the user to give up self-custody.

When installing the Bull Bitcoin Mobile app, a self-custodial wallet will be created, regardless of whether the user is a Bull Bitcoin user or not. The user will access the Bull Bitcoin exchange from the same application. When purchasing Bitcoin, the mobile app will automatically create a Bitcoin receiving address and provide it to Bull Bitcoin’s servers as a new payout address and Bull Bitcoin will send the Bitcoin directly to the mobile wallet. There is no need to share the xpub of the wallet to Bull Bitcoin’s servers. Users of Bull Bitcoin Mobile can also specify an external Bitcoin address, they do not need to use the Bull Bitcoin wallet.

When spending or selling Bitcoin, the exchange will create a payment invoice (BIP21) that will automatically be opened by the same application. All the user has to do is to confirm or reject that transaction. The experience will be functionally the same as that of a custodial exchange, with the exception that the user will have to do a backup of the Bitcoin wallet.

Current roadmap

Suggestion to this roadmap can be proposed as Github issues.

Acknowledgements

image