Education

What are Micropayments and How does Bitcoin Enable Them?

Bitcoin allows not only the transfer of value, but also the creation of rules for how that value is transferred, known colloquially as “smart contracts.” Multi-Sig technology (dividing control of coins between multiple keyholders) can be used in many different ways to achieve a desired incentive structure and influence human behavior. Micropayment channels are one such construction.

Problem: Minimum Transaction Size

Most people have probably encountered the following situation. You go to a store, get a small item to purchase, and pull out your credit card to pay for it. But the clerk disapoints: “Sorry, you need to purchase at least $5 of items to use your credit card”. The reason they do this is there are fees for using credit cards. These fees pay for the overhead of running an electronic payment system that involves lots of people, businesses, and costly fraud prevention. This is the same reason you can’t purchase a single 10 cent item on the internet.

Bitcoin drastically reduces this fee to pennies, regardless of the amount sent. The fee is still non-zero, though. So we’ve made the problem a lot smaller, but we haven’t eliminated it.

Solution: Micropayment Channels

Micropayment channels are a cryptocurrency specific technology that allows for the aggregation of many small transactions into a single transaction, turning many fees into a single fee.

You can think of it like opening a tab at a bar, except you and the bartender don’t have to trust each other beyond a single drink, as if you had paid for each one individually. In fact, it would be more like if they didn’t trust each other beyond a single sip.

How do they work?

Micropayment channels use both multi-sig technology and a lock time. Multi-sig is a feature of the Bitcoin protocol that enables control over an amount of bitcoins to be divided between multiple persons. Spending bitcoins from a multi-sig address could require, for example, two people signing transactions with two different cryptographic keys. We’d call that address a 2-of-2 address because the address has 2 keys and 2 keys are required to transact. Lock times is a bitcoin feature that does just what you’d think: it makes a transaction inadmissible to the network until a certain time. Bitcoins can only be spent once from an address (just like the dollar bills in your wallet, once you give them to someone else you can’t use them again), so a locked transaction will spend the coins it uses as inputs at a certain time in the future, unless those coins are first spent by a prior transaction.

With these two technologies in mind we can outline how a micropayment channel works. The process can be divided into three steps: escrow lock, refund, and tab.

Escrow Lock

Suppose Alice wants to open a channel with Bob to pay for fuel over the next month, and she doesn’t want to ever spend more than 100 bits on gas (but she may want to spend less depending on her needs). To start the payment channel for gas she writes a transaction that would put 100 of her bits into a 2-of-2 multi-sig address with her key and Bob’s key. Once she sends that transaction to the Bitcoin network the bits are locked in an account and can only be spent if both Alice and Bob agree.

Refund

But she doesn’t send this transaction just yet. First, she wants to make sure she can get her money back if Bob should ever disappear. So she writes another transaction that would send all of the money back to an address she controls, but with a one month lock time, so the refund won’t process until the month is over. Once she gets Bob to sign this refund transaction (she needs both his and her signatures to make it valid, because it’s spending from the 2-of-2 multi-sig), she then announces her first escrow lock transaction. Now her funds are locked in divided control with Bob, but she is still protected. If Bob disappears and she can’t get his signature, she can always broadcast the refund transaction after the lock time has passed. If the micropayment channel goes well, however, the refund is discarded because it is unusable. It’s like an airlock.

Tab

At this point there are 100 of Alice’s bits locked in escrow with Bob, and a refund could automatically send those bits back to Alice after a month. Think of those 100 bits like a tab you’d keep open with a bartender. You can order drink after drink and each transaction just takes from your 100 bit tab.

A tab transaction is written to increment small payments from the tab between Alice and Bob. These transactions are written to be valid on the bitcoin network but they are only shared and validated by Alice and Bob (until it’s time to settle up and close the tab).  Each tab transaction spends from the same 2-of-2 output that the refund would have. Those transactions are valid because the refund can’t be announced until after the lock time has expired. An initial tab transaction sends all 100 bits back to Alice, but as Alice receives fuel from Bob, she updates the tab transaction to send 10, then 20, then 30 bits to Bob and the rest back to herself. As Alice gets more gas from Bob over the month she continually re-signs the tab transaction, and passes it to Bob. Bob doesn’t broadcast any of those tab transactions until Alice and Bob are done with the payment channel. When Alice is done buying fuel from Bob, she can say so, and Bob will broadcast the last tab transaction closing the tab and sending any remaining funds back to Alice. There is only one transaction fee even if there have been many incremental gas purchases, because only the last transaction, the one closing the tab, is broadcast to the Bitcoin network.

At any point, if Bob stops providing fuel, Alice can stop paying, and if Alice stops paying Bob will know and can deny her more fuel.

Of course, in general this would all be automated. Alice and Bob just set the policy for how their computers transact—they aren’t personally involved in writing these transactions, validating them, or talking to the protocol. That’s where good software comes in.

The multisig aspect of the payment channels allows Alice and Bob to protect themselves from each other. At any given moment, the difference between what was paid for and what was paid can be made arbitrarily small. This means that if either party is malicious or incompetent, the most the other could ever get cheated out of is 10 bits worth in the above example. This disincentivizes fraud, as it becomes less profitable to cheat than to simply be a legitimate business.

Use Cases

Micropayment channels can be used anywhere where metering is done:

  • Internet routers could charge users based on the bandwidth they consume.
  • Parking meters could simply charge the cars for as long as they stayed, reducing the need for meter maids.
  • Roads could charge cars for the time they actually spend on them, incentivizing carpooling and charging people for maintenance according to relative usage.
  • Time spent with important people, such as lawyers or therapists could be metered by the minute.

Micropayment channels enable all of this, greatly reducing uncertainty in whether a fair deal was achieved in all cases.

One particular use case that stands out is payment for digital content. By reducing payment friction, bitcoin micropayment channels can make it easy for consumers to pay small amounts to artists and providers directly. Users could have a digital media wallet with a cap of $5/week The wallet could automatically pay the creators of youtube videos for every second of video watched, the authors of blogs for the amount the reader scrolls down the page, and the designers of games for use of virtual assets in virtual worlds  all without the need for ads or difficult credit card subscriptions.

In this way the distribution of capital can be made more fair for artists, who currently generally get very small portions of the revenue generated by their content. Such a solution could strike a balance between the copyleft advocates who don’t want to pay corporate behemoths for a duplicatable resource and content providers who want to make a living off of the hard work they do.

In summary, Bitcoin allows for the automation of many risk-reduction strategies that are as-of-yet only used in conventional finance for large transactions because of the overhead they incur. Automating these contracts can make everyday transactions large and small faster and more secure, enhancing fluidity in the economy.

Source: https://coincenter.org/entry/what-are-micropayments-and-how-does-bitcoin-enable-them