Bitcoin client Bitcoinj implements bitcoin micropayments

Bitcoin client Bitcoinj has implemented a fully functioning micropayments channel, which will allow a stream of small-scale payments to be sent.

AccessTimeIconJul 1, 2013 at 8:16 a.m. UTC
Updated Dec 12, 2022 at 12:48 p.m. UTC
10 Years of Decentralizing the Future
May 29-31, 2024 - Austin, TexasThe biggest and most established global hub for everything crypto, blockchain and Web3.Register Now

Bitcoinj, the Java-based bitcoin client, has now implemented a fully functioning micropayment channel. This will allow a stream of small-scale payments to be sent until the service being paid for has been completed.

The announcement was made by the bitcoin project leader, Gavin Andresen, on Twitter.

— Gavin Andresen (@gavinandresen) June 27, 2013

There have been several problems facing micropayments in bitcoin as described in the Bitcoinj project page:

1. If you send too many transactions too fast, they will get down-prioritised or not relayed by various anti flooding algorithms built into the Bitcoin network.

2. There is a fixed minimum amount of value a single transaction can send, determined by the number of bytes required to send and claim it along with the fees charged.

3. The recipient of the micropayments ends up with a wallet full of "dust" which can be expensive to spend, fee-wise.

Clearly, there are cases where a series of small payments has been incurred, but as far as one's wallet and the block chain is concerned, just one 'net' transaction would be all that was needed to be recorded.

The Bitcoinj project has solved this by re-using a feature in the Bitcoin protocol called nLockTime, and creating 'refund transactions' that allow the client (the sender) to get their money back, with or without a small deduction that constitutes the micropayment.

More can be read about the micropayment protocol, but the type of situation where it might be used can be seen in a coffee shop which provides a WiFi hotspot. The client (e.g. software running on your smartphone that is also accessing the hotspot) could pay a fixed rate per kilobyte of data. You could set a limit on your mobile wallet app each month, and the phone could then stop using data from that hotspot when it hit its limit.

This is achieved by having a 'contract' between client and server that is valid for a fixed period of time, e.g. a day. Each party (cryptographically) signs the contract, but the transaction is not sent to the block chain. The final payment will require private keys from both parties to be completed. A second transaction has two outputs, one to the client and one to the server. As the micropayments progress, the amount going to each output is adjusted accordingly. The original refund transaction is there to ensure you (the client) get your money back if the server does not respond before the time limit expires to complete the micropayment transaction.

If you want to see the original links and find out more about this, visit Bitcoinj's Sourceforge page.

Disclosure

Please note that our privacy policy, terms of use, cookies, and do not sell my personal information has been updated.

CoinDesk is an award-winning media outlet that covers the cryptocurrency industry. Its journalists abide by a strict set of editorial policies. In November 2023, CoinDesk was acquired by the Bullish group, owner of Bullish, a regulated, digital assets exchange. The Bullish group is majority-owned by Block.one; both companies have interests in a variety of blockchain and digital asset businesses and significant holdings of digital assets, including bitcoin. CoinDesk operates as an independent subsidiary with an editorial committee to protect journalistic independence. CoinDesk employees, including journalists, may receive options in the Bullish group as part of their compensation.


Learn more about Consensus 2024, CoinDesk's longest-running and most influential event that brings together all sides of crypto, blockchain and Web3. Head to consensus.coindesk.com to register and buy your pass now.