The Lightning Network Makes Coca-Cola Machine Bitcoin Transaction Possible

On October 2nd, a Brazilian computer programmer and hardware hacker have created a handmade automated vending machine that accepts Bitcoin payments for Coca-Cola.

The vending machine reportedly uses a second layer payment channel to enable faster and inexpensive transactions that can process bitcoin transactions called Lightning Network.

The developer used a Raspberry Pi, water pump, touch screen, wood, and applied programming techniques to create the machine. In order for the machine to work, the computer scans a QR code which requests a bitcoin payment. Then the customer issues the payment using their wallet, and once the payment is sent to the machine, Coca-Cola is dispensed.

What is the Lightning Network?

The bitcoin blockchain is a public ledger that records bitcoin transactions. It is implemented as a chain of blocks, each block containing a hash of the previous block up to the genesis block of the chain.

Blockchain does not operate as a system of trust. To operate as such it requires each and every user to download and verify the history of all transactions ever made, including amount paid, payer, payee, and other details.

Joseph Poon and Thaddeus Dryja, the creator of the Lightning Network, shows every single transaction on the blockchain does not need to be recorded. The Lightning Network adds another layer to Bitcoin’s blockchain. Users are enabled to create payment channels between any two parties on the extra layer.

The way the Lightning Network works is it enables users to conduct numerous transactions outside of the main blockchain and then record them as a single one. The channels can exist for as long as required. Also since they’re set up between two people, transactions will be almost instant and the fees will be extremely low or non-existent.

How Does it Work?

For example, let’s say Sara and Mike work together and want to send money to each other on a frequent basis with minimal fees. The two agree to set up a channel on the Lightning Network and create a multi-signature wallet which they can both access with their respective private keys. They both deposit a certain amount of 3 bitcoin each into that wallet.

From then on, they can perform unlimited transactions between the two of them. The transactions are redistributions of funds stored in their shared wallet. For instance, if Sara wants to send Mike 1 bitcoin, she will need to transfer the ownership right of that amount to him. Then, the two of them use their private keys to sign for an updated balance sheet.

The actual distribution of funds happens when the channel gets closed. The algorithm uses the most recently signed balance sheet to determine who gets what. If Sara and Mike decided to close the channel after that one transaction, Sara will get 2 BTC and Mike will receive 4 BTC.

Solving Bitcoin Slow Transaction Speed Issue

In order for bitcoin to become a viable alternative to other payment systems such as Visa, it’s scalability needs to be improved. It’s not even close to performing at the level of Visa. Bitcoin 7 transactions per second are minuscule to Visa’s average 24,000 and capacity to reach 50,000 per second.

At the dawn of Bitcoin’s inception, bitcoin’s scalability has been capable of processing around 7 transactions per second. Since it became used more popularly, the system got congested. There was a scaling issue to which 1 megabyte of transactions can be processed at any one time, leading to delays.

According to, it takes an average time of 78 minutes to confirm a bitcoin transaction. Slow speed in transactions and confirmation time has led to an increase in the failure rate of transactions.

The Lightning Network creators believe it’s a solution to Bitcoin’s scalability problems, therefore solving its slow transaction speed issue. More experiments such as the Coca-cola vending machine are in the works to test the Lightning Network’s potential.

While showing potential, the Lightning Network is still in its early stages. In order to be fully adopted by the Bitcoin community, the Lightning Network will need to prove itself to be safe and usable on a larger scale.

Many are eager to get the lightning network used on a massive scale because of its transaction speed and low transaction fees.

As of now, the vending machine is only a proof of concept and has no affiliation to the Coca-Cola company. Though, the Lightning Network has the potential to advance bitcoin usage.