A couple of months ago we had the opportunity to develop an innovative financial application powered by Bitcoin – a virtual cryptocurrency that isn’t going anywhere any time soon! You might actually want to start using it already.
Mobile apps can develop a payment app by integrating Bitcoin as a payment option at check-out along with all other methods for online payments. What we will be discussing first, however, is how to develop a mobile Bitcoin wallet. Let’s take a brief look.
The project that I’m developing is basically a money transfer system that uses a Bitcoin mobile wallet. I’ll start off by explaining the advantages of mobile payment transfer apps, as well as by explaining their implementation.
1. The simplest form of exchange
The digital nature of Bitcoin makes the virtual currency a perfect solution for cross-border transactions. It is fast and low-cost. Other payment options are slower and more expensive. With this cryptocurrency there are no foreign exchange rates or other hassles.
You can purchase Bitcoin online for any other currency through an exchange, or buy for cash from a local seller. You can also try to mine them on your own, of course, but this will require you to set a machine aside and have it endlessly run algorithms. Also, because of the increasing complexity of algorithms over time, it is not possible for a standard home PC to effectively mine Bitcoin today. People who actually make money from mining it by dedicated mining rigs with chips that are specially optimized to solve the cryptocurrency hashes.
Whether you buy Bitcoin or mine it, it is transferred to a digital wallet where it is stored locally. Like the wallet you carry in your pocket, your digital Bitcoin wallet CAN get lost!
There are various ways to withdraw money from a wallet app. In the app we’ve been developing, we offer the following:
- A local Bitcoin teller can exchange Bitcoins for paper money by scanning a user’s QR code in the app.
- You can sell the cryptocurrency through your bank account. However, this option might not be available in certain countries.
2. Not centrally controlled or regulated
Bitcoin is a peer-to-peer system which means that each wallet app acts like a node in a single-rank public network called a Blockchain. The Blockchain contains all information about all transactions ever made. The full transaction log is open and can be traced back at any time.
With this decentralized mechanism a transaction can neither be blocked nor declined, nor can funds be locked.
However, there are two sides to every coin. The lack of regulation by government authorities is the reason why Bitcoin is so popular as a virtual currency for criminals. The wallets are digital, so they don’t have to be registered with any government or financial authority. Besides, the most exciting thing about the cryptocurrency is that it can be easily exchanged for real money. At the moment, a single Bitcoin can be sold online or on the street for around $290.
This is a sobering fact, especially when you line it up against another reality: hardly anyone uses Bitcoin for purchasing goods and services. Using it for transferring money abroad, on the other hand, is a great use case for the cryptocurrency that will see further development in the future.
3. Safe ecosystem
The way the Bitcoin ecosystem is organized makes a wallet app a safe place to store, exchange, and use the cryptocurrency. Every transaction in the wallet is signed with a digital signature before it’s sent to the Blockchain. After being sent to the blockchain, a transaction is processed (in fact, it will be propagated through all blockchain nodes), and after that it’ll become committed which means that the money will be transferred to another wallet.
A Bitcoin wallet allows you to make and receive transactions and to see your transaction history and current balance. Also, a wallet runs a few service tasks like synchronising the blockchain, that are important for validating transactions.
Desktop wallets typically store an entire transaction log of the whole network, which is an enormous amount of data – around 20Gb or even more. Mobile and web wallets usually store only the most recent part of the transaction log assuming that older transactions were correct. Even if a mobile wallet validates an incorrect transaction, the network will detect it sooner or later. You can check a full list of Bitcoin wallets services here.
All data of a wallet is stored in a "wallet file" on a user’s devices. If you lose the file, you lose the money.
You only need to know the Bitcoin address of the recipient to issue a transaction in the wallet app. The address is generated by the wallet and looks like this: 1Jhbck6ziWRmQBp67GVDgLSJ9eFF5xNXgB. You can generate as many addresses as you want for your wallet file. Knowing only the address you can check how much money was sent to and from it, but you can’t say which wallet is associated with the address and who the actual recipient of the money is.
Read also:Mobile payment gateways
5. Great for stock gamblers
Bitcoin value fluctuates and is entirely dependent on the economics of supply and demand, similar to paper currency or the stock markets. There are several exchanges that trade the cryptocurrency: anyone can participate in trading. For a typical user, however, currency stability is likely preferable to wild fluctuations in value.
Stability can be achieved with the help of hedging that can be offered as an additional feature of a mobile Bitcoin wallet. Hedging is used to reduce any substantial losses or gains suffered by an individual or an organization, and offsets potential price volatility. There are multiple platforms such as Veritaseum, Hedgy and others that provide smart hedging contracts. They work on top of the blockchain and allow users to “lock” their funds. In other words, if a user adds $100 to their account, they always have $100 there, and a current exchange rate cannot affect this amount.
How do smart hedging contacts make it possible to lock funds? The platforms issue an agreement between two random users, one of which “bets” that the Bitcoin value will increase, and the other that it will fall. After the stipulated period is expired, the user who made the right guess compensates the losses to the user who “lost.” This way the amount of money both users added to their accounts remains unchanged.
How do you develop a Bitcoin wallet app?
Another advantage of the cryptocurrency ecosystem is that a wallet is quite easy to implement. If you wonder how to make a Bitcoin wallet, there are a few libraries that provide you with standard functionality for synchronizing with the blockchain and creating transactions.
Chain-java, for example, is a Java library for the chain.com Bitcoin API can help you access the blockchain. With bitcoinj, a library for working with the Bitcoin protocol, you can perform the wallet functions. This library powers a lot of wallets.
If you don't want to use libraries for some reason you are free to make a Bitcoin wallet app yourself – all standards are open and can be found in public sources.
We didn’t use any libraries for building our Bitcoin wallet app, because it made sense for us to develop a common wallet module. The idea was to implement a solution for both platforms, iOS and Android, that would encapsulate the app’s business logic. The module was built in Java but it can convert to Objective-C through a plugin to Gradle, a build automation tool. The module also made it easy for us to run unit tests for both platforms.
Bitcoin as a payment option
It’s hard to tell how many people own the cryptocurrency today, but many large companies are accepting them as a legitimate source of funds. Wordpress, Amazon, Zappos, Bloomberg, OkCupid – all these companies offer Bitcoin among their payment options. See a full list of companies that accept Bitcoin here.
On the one hand, building a Bitcoin-powered app is cool, and automatically makes a company innovative. But on the other hand, with a fluctuating value, the funds can either help or hurt the company. This fluctuation – potential inflation or deflation – can become really insane, but living on a roller coaster can be quite exciting, especially if you’re fond of gambling. If you don’t really like a roller coaster but like the cryptocurrency, there is a safe escape from the fluctuation in hedging (as previously mentioned).
For merchants who don’t want to hold the cryptocurrency and would prefer to instantly exchange them for a fiat currency, there are also Payment Service Providers (PSP) for Bitcoin that can be easily integrated into a mobile payment app. The great thing about PSP is that they settle a merchant’s account in their currency, and if a customer pays in Bitcoin, the service provider will transfer fiat currency to the merchant’s traditional bank account.
Coinbase, for example, has launched the Instant Exchange, a feature that processes buying and selling of Bitcoins in the background and exchanges them for user’s local currency immediately. This way Coinbase allows users to use the cryptocurrency without being exposed to the fluctuations in the exchange rate of the digital currency.
Read also: Stripe vs Braintree
Integrating PSP isn’t the only solution when it comes to implementing “pay with Bitcoin” feature in a mobile app. Alternatively, you can use services that provide HTTP API for the blockchain or directly integrate with the Bitcoin network. You can check out this article for more information.
I truly think that Satoshi Nakamoto, whoever he is, has a genius brain. He created a fully decentralized protocol that nobody can trust and hardly anybody understands, but we bought it. Despite everybody’s expectations, Bitcoin is still around, and it will be interesting to see what happens to the cryptocurrency in the next couple of years.