The mother of all hackathons

I just returned from #hack4climate. Even if it was just my third hackathon, I can state with certainty that this one was unlike any other. None of the 100 hackers from 33  countries experienced anything remotely comparable before.

The topic of the event was to develop solutions how blockchain technology can help fighting climate change.

First let me explore how the event differentiated from other hackathons. The hacking session was 24 hours, but the whole event lasted four full days. There were pre-workshops around the world. 100 participants were selected and invited to Bonn. Travel expenses were covered. We stayed on a five star hotel ship. It was adjacent to the UN climate conference. We had balcony suites on the ship. The food was appropriate for a 5 star ship, complete with wine to every dinner. The days before and after the hacking session were filled with interesting talks, a guided city tour, interesting discussions and lots of networking. There were so many interesting people and so much to talk about. At the last day they wanted to make a photo of us on the boat in front of the UN building. Drones were forbidden in the security zone, so the photographer rented a crane to get the perfect shot.

I knew nobody from the event in advance. But I knew that out of the sub topics, I was most interested in “sustainable transportation”. At the team building session, I headed straight to the guy with the most interesting pitch that contained something about cars. Our team was formed son after, and I had a good feeling from the start. Two were from Singapore who already knew each other. Two were from India one living in San Francisco and the other in China. And one was also from Switzerland, but we didn’t know each other before.

When the hack session started at Tuesday noon, we shaped our rough ideas into a project that we could realize in the short amount of time. Then everybody stated what he would like to do. It all seemed to fit together wonderfully. I wanted to implement the smart contract. I didn’t have much experience in that area, and was grateful that the others could help me and answer my questions. Rather than drawing large diagrams, we collaborated on the interfaces, and then worked towards these. We didn’t hit mayor roadblocks or problems, everything seemed to flow in place. Most of us agreed that we are not productive after 2AM and that is is better to get some hours of sleep. In the morning we went out to shoot a video of our product in action.  The guys from SBB (who was a sponsor of the event) were around us most of the time. They helped where they could, and were generally very interested and engaged. We had many great discussions with them.

Our project was about end to end transportation. On the mobile app, you select a destination, and it identifies legs to use different means of transportation. We focused on car sharing, but other options include trains, bikes or buses. Our smart contract abstracts a car that can be rented over the ethereum blockchain. The owner of the car registers it by creating an instance of the smart contract. A person who wants to rent it can do so by sending ether. The required amount is determined by the price per km the owner wants, times the number of km the renter wants. If he doesn’t use up the credit, the rest is reimbursed at the end of the trip. But if he drives too far, the cars performance is degraded by the smart contract. The car was represented by a RaspberryPi running an ethereum node and our backend running on nodejs. Initially opening the car was indicated by an LED attached to the RPI. But to make it more realistic, the RPI then called the Tesla API to open a real car. At the end of the trip the RPI collected information about the car such as odometer and battery level as well as firmware version, stored it on the IPFS and registered the IPFS address with the smart contract to form an unfalsifiable audit trail. Last but not least, one of our team members used data from moving cars and turned it into an appealing 3D animation that highlights the hot spots in a city.

We were thrilled all along, even more after all the positive reactions to our presentation. And hooray, we made it into the finalists! That meant, we could present our project at the COP. That’s the fair for NGO’s which is attached to the UN climate conference. The team that won the hackathon, did so deservedly. Their project was about incentivizing land owners not to cut their trees. They used blockchain and game theory for the monetary part. In addition they trained a neuronal network to predict areas which are endangered most of deforestation, and need special attention.

A first official video appeared here, and I’m sure others will follow on the official website.

Hackthevalley Hackathon 2017 Baar

Motivation

After the good experience last year at the six fintech hackathon, I was trilled to go to hack the valley which is even closer geographically and whose subject is even closer to Bitcoin. My goal was to gain experience with ethereum. So far I only completed the tutorials. I found the technology very interesting, but in the past, I couldn’t come up with a good idea how to make use of it. Neither did I learn of a killer product that went live. This is in stark contrast to Bitcoin. When I first learned about Bitcoin, it was immediately clear to me that this was something very special, something that I waited for without knowing.

Team formation

In contrast to the hackathon last year, most people already showed up as teams. I estimate that only about three of the fourteen teams were formed on site. I joined three guys from a bank in Paris, along with another French guy and a South African who lives in Zurich. First we had to decide on a project. We went through a list with a couple of ideas. But it turned out that for a lot of them it was hard to justify what benefit a blockchain would bring compared to a more traditional approach. That is something I see a lot in the current blockchain hype. Showing up as a team with a formulated idea is a big advantage, as the technology and possible problem areas can be explored before. But In both occasions I enjoyed it to meet new and interesting people and see what we can achieve together in this limited time.

Our project

We settled on the challenge “fighting fraud in the supply chain” with a project that puts smart locks on containers. The devices log all open and close operation on a blockchain. Unlocking operations would have to be authorized by a smart contract. The locks communicate with bluetooth low energy with an app on a smart phone. This in turn communicates to a backend that talks to the blockchain.

Implementation

Shortly after we had the rough concept, the other team members stated that they would feel more confident implementing the smart contract in java, rather than solidity. That’s why they voted for using hyperledger instead of ethereum. Setting it all up and getting the docker containers to work proved a lot more difficult than anybody anticipated. Not only had some team members Windows machines, but also on linux we faced a problem. Namely the docker containers were configured to use the google nameservers, while apparently all outside DNS was blocked by the Thomson Reuters network. The connectivity was generally very flaky.

Infrastructure

I enjoyed working with the team. But that we didn’t know the infrastructure we were working on, complicated our work considerably. The last time I programmed seriously with Java was probably 15 years ago. And we didn’t have good tool support within the environment. I’m sure it is possible to set everything up to work comfortably, but that would have cost us more time even than we lost with the complicated turnaround cycles. In the end, we couldn’t complete our prototype in time. Sure, that is is not a strict requirement of a hackathon. But it’s the pride and goal of every software developer to have the thing perform in a live demo.

Presentations and prize giving

As is common for events like this, the quality of the projects varies wildly. I think nobody in our team expected to be in the top ranks. Even though I must say the presentation looked better than my code.
The project that I liked the most was about subleasing parking spots while people don’t need them. I could imagine something like this generalized to become a decentralized form of AirBnB.
The winners were the same people that won the London HackEthon. During the presentation I thought it rather boring. It was about heart rate sensors publishing directly to ethereum. A smart contract would then take action if the data was out of order. Only after they received the price, I thought some more about it. In hindsight I can see the value in it, and that it was probably implemented better then most other projects.

Conclusion

Thanks to Thomson Reuters and all others involved for organizing this great event!
I hear a lot from Bitcoin maximalists that all other chains can’t compete with the one true blockchain. I’m also invested most in Bitcoin, but I want to be open to the possibilities of other blockchains and smart contract platforms in special. Although I must admit, I never saw a compelling reason for permissioned ledgers and private blockchains. A week before the event I learned about Bitcoin uncensored, and listened to a couple of the episodes. They essentially debunk most of the altcoins and blockchain projects. Calling them ponzi schemes and frauds. This made me skeptical of the blockchain boom, but all the more I was keen to discover good uses at and event full of blockchain hackers. I’m still positive that there are applications that can be improved with blockchains. But most of the ideas have to be descarded upon closer inspection. The only three practical uses for blockchain so far are monetary, timestamping and naming. I am looking forward to expand this list, but it’s not as easy as it seems at first.