Meet VendEth — The world’s first blockchain-powered vending machine.

Who built it, how they did it, and why it is way more than just a vending machine that accepts crypto.

Greg Lang
Greg Lang
Sep 11, 2019 · 4 min read
Image for post
Image for post
The prototype on display during its demo at ETHBoston.

At first blush, you might not think it’s much to look at. You might even think that it’s a trivial or silly thing, a la “we were promised flying cars but got 140 characters.”

Though if that is your thinking, prepare to be wrong.

Who Built It

How it Works

VendETH is pretty simple; just go up to the machine, select your product, pay for it with a mobile wallet, trustwallet, torus, or squarelink, the machine dispenses it, and boom, you have your food.

Under the hood, there are four facets to VendEth’s architecture.

As described by the team:

Smart Contracts

The smart contracts are written in Solidity, written in a Golang environment for testing and deployment.

React Front-End

React is used to power the UI for sending transactions and purchasing products. Using this, users can select products, scan their mobile wallets, and enjoy an overall smooth experience.

Hardware

The vending machine’s coils are powered by servo engines, connected to a servo drive (more specifically, the Adafruit 16-Channel 12-bit PWM/Servo Driver — I2C interface — PCA9685). The board itself is connected to an Arduino Mega board, which is in turn controlled by a Raspberry Pi 4 running a Node script.

Coinbase Commerce Server

In order to integrate Coinbase Commerce, we have the front-end generating “Charge” API calls to actually charge the user, and allow them to pay via all of the cryptocurrency payment methods the service provides. Since the service communicates events by sending data to a public endpoint (e.g. a server owned by us), we set up an Express server on a VPS. SSL is required for this endpoint, so we purchased a domain (cryptovendingmachine.xyz) and added an SSL certificate via Let’s Encrypt and their helpful tool, certbot. On a successful charge event, the server communicates with the Vending Machine smart contract and confirms the purchase.

Soldering in the dark? Check.

Image for post
Image for post

You must be imaginative, strong-hearted. You must try things that may not work, and you must not let anyone define your limits because of where you come from. Your only limit is your soul. What I say is true—anyone can cook… but only the fearless can be great.

–Gusteau

Try to envision a hypothetical spectrum of fearful to fearless —imagine you encounter someone soldering together components, in the middle of the night, in a dark parking lot. Fearful? Or fearless?

Image for post
Image for post

This quote from our stalwart hackers is telling:

It turns out that soldering inside a building is actually not such a good idea, due to smoke alarms. It also turns out that soldering outside in a shady corner in windy weather conditions and light drizzling is also not such a good idea. Weighing the options, we thought that the best way to legally challenge our sense of adventure was through the second one. We ended up needing to use tall cardboard as a windshield, a loosely put-together cardboard box to serve as a table for soldering the servo drive’s pins, and smart phone lighting to prevent our brave soldier from burning himself and all of us in the process.

If that’s not fearless, I don’t know what is.

Image for post
Image for post

What Makes it Special

What’s really special about this project is that it is capable of being adapted to do so much more — because at its core, what this project does is trigger machines to interact with the real world based on events that occur on the blockchain. If you think about it for more than a few minutes you can come up with a vast array of possibilities — and never come close to listing all the possibilities exhaustively.

That is the power of the technology underlying VendEth. A decentralized interface to the internet of things. Deployable to mainnet today on Ethereum.

VendEth was an overall ETHBoston finalist and winner of the Rivet prize, for which we awarded them 100,000,000 RPC requests.

Rivet Magazine

The future has arrived.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store