How BIP47 Reusable Payment Codes enrich Bitcoin and overall cryptocurrency user-experience
Tags: Crypto, Usability, Cryptocurrency, UX, Bitcoin

A Payment Code itself looks very similar to an average cryptocurrency address. That said, it is just a rather long sequence of hexadecimal digits as well:

The main difference here is that in contrast to a classic address that needs to be exchanged prior to every transaction, a user needs to get a payment code of a counter-party only once. After that, the wallet software automatically generates a new address during each payment. No address reused, no need to scan or copy or paste anything — just choose a recipient, enter an amount, and you are ready to pay. More to that, in contrast to classic addresses, payment codes can be freely published everywhere online or offline: no prying eyes would be able to guess what the actual addresses were used to pay to this particular payment code.

Justus Ranvier, author of BIP47 Reusable Payment Codes. Donations accepted to a paycode published on Twitter (https://twitter.com/BlockInTheChain) PM8TJfFccT8JNYN6fWypnkHuWUeH1kyoZzri9qi8gtPajiJmP8TKJvfTzXVry9WWFU6bVuXyhjKJWurFdsZaHN294inAJ1JaSFzP9eEtfS1MQd1BDFda

These two properties of payment codes are essential considering the fully transparent nature of Bitcoin’s blockchain.

The first property eliminates the problem of address reuse. Two people or organizations that have frequent economic activities can establish a long-lasting connection and exchange coins more conveniently without sacrificing privacy. Many wallets provide a feature of ‘labeling’ certain addresses and reusing them as needed; some exchanges give a single address to deposit coins; mining pools make payouts to the same address every time… with payment codes, these practices are a thing of the past.

The second one increases the privacy of users of transparent blockchains. Let’s look at this address: 1HB5XMLmzFVj8ALj6mfBsbifRoD4miY36v. We can learn that during the first three weeks of January 2018 this address received more than 180 mBTC. This Litecoin address: LQ3B36Yv2rBTxdgAdYpU2UcEZsaNwXeATk received more than 12 LTC during the same timeframe. On the other hand, no one is able to determine how many coins were sent to this Monero Stealth Address: 47BnvD18P456f4KJUBKPS3Rqa97LrTaeqJ5NFYmjQM6nVoz6TBv4rJ24GZk883BNo22fAKbr8BSuTjhQC6K7DsSJFa8SHDs.

That said, Payment Codes serve the same purpose as Stealth Addresses. In fact, the idea of Stealth Addresses was finalized in a paper by Peter Todd in early 2014[2].

Credit goes to ByteCoin for the original idea. Gregory Maxwell, Adam

Back, and others on #bitcoin-wizards contributed valuable input on the

implementation. Finally thanks goes to Amir Taaki for input on the

general idea of stealth addresses and use-cases.

Moreover, they later became widely used thanks to CryptoNote based cryptocurrencies such as Monero. Other people are familiar with Stealth Payments functionality in Bitcoin Dark Wallet. Payment Codes are like a more flexible incarnation of Stealth Addresses that was developed by Justus Ranvier in 2015[3]:

Payment codes are a technique for creating permanent Bitcoin addresses that can be reused and publicly associated with a real-life identity without creating a loss of financial privacy.

They are similar to stealth addresses, but involve a different set of trade-offs and features that may make them more practical.

There is even more to tell about them. A single payment code can be safely used across different cryptocurrencies[4]. Imagine that Carol and Dave both use two different wallets that support Bitcoin and Litecoin cryptocurrencies and BIP47 Payment Codes. In a proper setup, once Dave received Carol’s payment code his crypto-wallet recognized that Carol uses Bitcoin and Litecoin, and can generate addresses for these currencies alltogether — with no single public key reused across blockchains![5]

Payment Codes unite many different blockchains into a single-address-space, and this is a super cool feature that none of other stealth-like addresses can provide. One can easily envision a future where WikiLeaks and other vital organizations or individuals who heavily rely on donations no longer provide different addresses for different cryptocoins but a single payment code that can be used for as many cryptocurrencies as needed giving additional privacy to all of them. The more currencies they accept, the more users from distinct communities can support them.

Transactions to and from a transparent address can easily be monitored. If a user has a few favorite coins, he needs to operate with separate addresses for each of them. Bitcoin Stealth Addresses did not get wide support, likely because they were hardly compatible with mobile wallets. A single payment code can be used with many cryptocurrencies, it can be published online or offline, and the set up is friendly to mobile wallets. It is worth noting that in a current implementation not all currencies can be supported but only those that use the same elliptic curve and as Bitcoin and a similar blockchain architecture, for example: it is impossible to use a payment codes with Ethereum, or to generate Monero addresses.

The mechanics of Payment Codes require a user to make a so-called Notification Transaction before further payments, and it costs a regular blockchain fee. With that information in mind let’s think about the use cases for payment codes. The best way to do that is to think in terms of a smartphone address book — once it is clear that further contacts with a particular person are likely to occur sometime in the foreseeable future, an address book entity is created. For as long as the contact is one-time, e.g., a clarification email or a spontaneous phone call, no one bothers performing any additional actions.

It is just the same with payment codes: if a company offers salaries in Bitcoin, once it recruited a new employee the ‘payment tunnel’[6] is established, and biweekly payments go through a blockchain without any additional information from the employee. The ‘payment tunnel’ in this example is unidirectional, and only the company needs to pay the fee.

Nakamoto Industries pays salaries in Bitcoin using transaction batching technique and BIP47 to ease the process to accountants. Payment Codes allow wallet developers to make interfaces that are much easier to use to non-tech-savvy users.

Payment Codes simplify business transactions as well. Once they are exchanged, all payments that are made through the tunnel are automatically identified as belonging to a particular organization and can be processed accordingly. If a refund needs to occur, it is as easy as replying to an email.

Payments are easily identifiable by a counter-party, refundable and can be made at any time without the need of contact prior to each payment.

The payment-identification feature is somewhat important as it opens the doors for pseudo-recurring payments. A tenant can pay for accommodation monthly, and a landlord can always see the payments as made by a particular person. A user can set up a wallet software in such a way that a pre-configured transaction utilizing a newly-generated address will pop-up according to the specified schedule.

With Payment Codes wallets can create transactions according to a specified schedule mimicking recurring payments. A user only needs to approve and broadcast a transaction. This technique can be adopted by organizations that heavily rely on outsize support to encurage recurrent donations.

It is out of the scope of this article to speculate whether everything is Bitcoin-based in the future or other cryptocurrencies can find their place on the market. It is clear though that reusable payment codes give an almost ultimate solution to make on-chain transactions as user-friendly as possible: “Hey Siri, send Jane 120,000¥ in bitcoins using Billion”[7]. So Jane can see a notification on her Android that Mary just paid the rent — cryptoeconomy is over the walled gardens of closed systems. Reusable Payment Codes form an open standard that breaks the walls of operating systems and unites different cryptocurrencies and wallets into a single family.

Payment Codes simplify day-to-day transactions within a family and a circle of friends and colleagues. No need to scan a QR prior to each payment: just choose a recipient from a list of contacts, enter an amount and you are ready to pay. Participants can use an operating system and a wallet of their choice!

Last but not least, it is necessary to get sight of different ways of exchanging Payment Codes in the first place. If users still need to operate with those hex strings at least once, it is not that much of an improvement after all. Back in 2010, there was a project aimed to extend Bitcoin with a decentralized DNS functionality with a proposed name BitDNS. It was Satoshi Nakamoto who directed this project to be a separate blockchain with a famous quote that, like many others, reveals his genius[8]:

Piling every proof-of-work quorum system in the world into one dataset doesn’t scale. Bitcoin and BitDNS can be used separately. Users shouldn’t have to download all of both to use one or the other. BitDNS users may not want to download everything the next several unrelated networks decide to pile in either. The networks need to have separate fates. BitDNS users might be completely liberal about adding any large data features since relatively few domain registrars are needed, while Bitcoin users might get increasingly tyrannical about limiting the size of the chain so it’s easy for lots of users and small devices. Fears about securely buying domains with Bitcoins are a red herring. It’s easy to trade Bitcoins for other non-repudiable commodities. If you’re still worried about it, it’s cryptographically possible to make a risk free trade. The two parties would set up transactions on both sides such that when they both sign the transactions, the second signer’s signature triggers the release of both. The second signer can’t release one without releasing the other.

A few months later[9] the world’s second blockchain was born and was given a name Namecoin: technically — an altcoin, but practically, with cross-chain atomic swaps in mind, an extension of Bitcoin. Considering its neutrality and low cost of transactions, Namecoin is an ideal candidate to host identities with corresponding payment codes and additional meta-information, such as user’s cryptocurrencies of choice, SegWit support, URL to an avatar and a signature. Wallets from across the industry running on any operating system can fetch this information from Namecoin through Simple Name Verification, or utilize a trusted or local full-node. Finding a payment information trustlessly can be as easy as typing id/eliza.

However, as long as this set-up is yet to be developed, users can enjoy a public repository operated by Samurai Wallet developers. PayNym.is assigns a nice, unique and memorable avatar to each registered code. With open API this is the first major step in a process of breaking the wall and opening the doors for users of different wallets to establish private tunnels!

Each PayNym Bot is unique. The service is the next major step in bringing Payment Codes to masses.

Alternatively, Air Connectivity can be used among Billion Wallet users for server-less near field contact exchange:

We hope to make this cross-platform in the future, in a manner similar to FireChat but as an open implementation.

As of the beginning 2018, there are 3 wallets with BIP47 support: Samurai and Stash for Android and Billion for iOS. We encourage you to give them a try!