Inspiration

Germany has a funny way to keep your teeth clean.

You deposit money in the beginning of each year, and only get it back if you actually went to the dentist during the year.

We decided to take this "keep yourself healthy, or you'll lose money" one step forward. We want to motivate people to keep good shape.

What it does

First, you choose how many minutes you want to run today. Then you choose how much money you want to "invest" in this running.

The money is locked in a smart contract on Ethereum's blockchain.

The code of the contract will give you the money back only if you run the amount of minutes you promised to! If you did - congratulations! You get the money back. If you did only 80%? You get 80% back. The rest is sent, automatically, as a donation to charity.

To keep track of how much you run, we used a Pebble smartwatch.

How we built it

The project has three parts: pebble, blockchain and a mobile website that connects them all and gives interface.

The Pebble is programmed in C language. We used CloudPebble to do that. It communicates with the phone using a node.js server.

The phone lets the user choose the amount of running time and money to invest in it. We built it with proto.io and bootstrap frameworks. It then use web3.js to transfer this information to Ethereum's blockchain.

We wrote a smart contract to the blockchain using Solidity language. It first gets the conditions from the phone and locks the money. Once it gets information from Pebble on how much running you actually did, it either sends you the whole amount back, or pass some of it to charity.

This smart contract, as all blockchain code, is immutable, and cannot be cheated.

Challenges we ran into

Pebble programming, as in any embedding device, is very technical. It lets you use only low level computer languages, such as C, and even then you are limited to which libraries you may utilize.

Ethereum's blockchain is a new technology still in development state. It is not meant to run on mobile phones, and certainly not in embedded devices such as Pebble. We had to do quite a hack to get around that.

Making all the components speak to each other was also a huge challenge, as it is not a standard thing.

Accomplishments that we're proud of

Writing a watchapp for Pebble. Communicating from the mobile with the blockchain, and in general, making those three devices work together.

What we learned

We learned a lot about working together.

We also learned about programming in C, which is becoming less and less common in the current "scripting" culture.

We learned why blockchain apps are not common yet, and how difficult it is to actually make a safe one. We discovered that it is hard to make different devices "speak" to one another.

What's next for FitBlitz

As a next step it would be interested to make this a "multi-player" challange, where the money of the "loser"s (who didn't run enough) go to the "winners" (who run too much).

This would be like betting on how much sports you would do, and may be the first positive usage of betting in the history.

Share this project:
×

Updates