BANKEX Plasma is almost ready for launch. Here’s its first real-life usage: a coffee vending machine.

Prerequisites to the Realization of BANKEX Plasma

When talking about the real-life usage of cryptocurrencies, two thorny problems come up: that of transaction cost and that of transaction speed.

Suppose someone wants to pay for coffee in a vending machine using crypto — for example, Ether. How can this be accomplished?

Well, the straightforward way is to assign a dedicated address to each item. This address, along with price, can be encoded in a deep-link that conforms to ERC-67 (https://github.com/ethereum/EIPs/issues/67) or ERC-681(https://github.com/ethereum/EIPs/pull/681) standards. Then, out comes something like this:

ethereum:0xBc003386F5A9611dA219F742ABfC847a86f3B4c3?amount=0.0003

And this link is rendered as a QR-code:

This enables people to pay using mobile wallets that support QR scanning. But there are problems.

Cost. This will be an ordinary Ethereum transaction that will cost about $0.20 (at the time of writing this article) to process. This amount is rather small in the context a transfer of $100 or more. But, in the context of buying mere cup of coffee for $1 or less, it becomes a problem.

Speed. An address needs to constantly monitor all incoming transactions server-side, and as soon as there are enough confirmations of deposit success, a cup of coffee will be delivered to the customer. But how long does this take?

The Implementation of BANKEX Plasma in the Coffee Vending Machine

So how can these problems be solved — i.e. how we can make crypto-vending fast, convenient, and cheap?

The answer is BANKEX Plasma.

The key underpinning of Plasma is a transparent off-chain infrastructure for payments, especially micro-payments. Plasma can be thought of like a prepaid wallet. Initially, some Ether is deposited into a Plasma wallet using another preferred wallet and thus the ordinary Ethereum transaction fee is paid only once.

In our context, the value of this deposit needs to be more than the price of one cup of coffee to take advantage of the cheap internal transfers offered.

Plasma itself is not a distributed blockchain and is rather provided by a Plasma-operator. Plasma transactions need to be created and signed locally by end-users using the same private keys as normal Ethereum transactions, but instead of delivering signed transactions to the Ethereum Mainnet, the Plasma API is being used.

As we see in the figure above, there are 3 Ethereum addresses: the end user’s, in this case, the buyer’s address, the vending machine owner’s address, and the Plasma contract’s address. To buy a coffee, the buyer transfers some Ethereum to the Plasma contract, and then the Plasma engine begins to mine the first block. Then, the buyer scans the QR-code of the item he wants to buy — in our case it will be a cup of cappuccino for 0.0003 Eth. By scanning the QR-code, the buyer initiates a Plasma transaction request to transfer 0.0003 Eth from his address to the vending machine owner’s address. After the transaction is executed, it is signed by the buyer’s private key. The vending machine owner receives his 0.0003 Eth, and the buyer gets his cappuccino.

Check out the video below that shows the first working prototype of BANKEX Plasma. This prototype encapsulates the complete workflow of the Plasma billing system, including the convenient web application client that doesn’t force users to install additional apps. Enjoy!