ETHCapeTown Hackathon Recap

The Stake Capital team headed down to Cape Town, South Africa for the Blockchain week to work, meet with the community, and participate in ETHGlobal’s ETHCapeTown Hackathon— the first ever Ethereum hackathon in Africa!

ETHCapeTown

We assembled a global team of developers, including Leo and Julien (as a team mentor) of Stake Capital.

Arriving from Europe after more than 20 hours of travel, Stake Capital kicked off the week with a community barbecue to assemble the team and begin plotting for the hackathon:

In addition to the barbecue, we enjoyed a nice private dinner with Ethereum community members the night before hacking started:

The hackathon ran from Friday evening to Sunday afternoon. After an opening fireside chat with Vitalik Buterin and a compelling musical performance from Justin Myles Holmes of NuCypher NuCypher, the team set about brainstorming and working out strategy for the following days of hacking.

First team pow-wow on Friday night.

After extensive deliberation, on Saturday morning we set about the challenge of making decentralised live-streaming accessible via a pay-as-you-go model built inside of Austin Griffith’s Burner Wallet. After the massive live-streaming app, TikTok, was shut down in India—putting more than 500 million users offline — we felt that this was an application ripe for decentralising and providing censorship resistance.

We decided to call the system DTok, as a decentralised shoutout to the inspiration: TikTok.

The platform has a countdown timer, displaying how much time is left before the user runs out of viewing credit. Users can extend their viewing time simply by clicking the payment button below the video stream. Additionally, users would have the option to add additional tips for broadcasters if they enjoyed the stream.

DTok Mockup

The Livepeer-transcoded video stream was embedded directly into the dApp’s interface (thank you Eric and Chris for remotely helping to debug our Livepeer node broadcast). As we hacked the live-stream together, we streamed live on Livepeer mainnet (because there were no transcoders running on Kovan and we didn’t have time to run one). By submission time, we had streamed more than 18 hours of us hacking / pulling an all-nighter from one of our laptops (we believe this is the third longest livestream ever on Livepeer?). The stream did cut out a few times when we ran out of ETH and we had to top up the wallet.

Overall, we only spent $7 for the Livepeer transcoding (0.04 eth)—an incredibly cheap price considering it would have cost over $30 on AWS.

A screenshot from the dTok dApp interface during our 16-hour hacking live-stream.

We decided to build the application as a module inside of the Burner Wallet (the second module ever!) to provide a familiar and tested UX increasing accessibility, in addition to facilitating easy on-boarding via pre-funded wallets with pre-allocated video streaming credit (thank you Austin for your real-time support while we were hacking!).

We reached a bare-bones MVP of the system Saturday evening. As the phenomenal electronic artist Ricardo, of TribalNeed, came to perform (thanks to Julien) at 8pm, we decided to livestream his performance around the world as a proof-of-concept. After playing for about an hour, Ricardo had received more than 200 xDai of payments and tips via the platform PoC.

We had initially opted to use xDai on the POA Network (Ethereum side-chain) as it was already implemented inside of the Burner Wallet environment. However, as the team neared an MVP of the product, we decided to make a fundamental change.

Following extensive discussions with the Raiden team on Saturday evening (thank you Jacob, Kristoffer, and Luis for staying until 3am to help :) ), we decided to switch our payment architecture from the POA Network to Raiden.

This was a significant change and risk. It was 2am on Sunday morning, however we felt that a Raiden-enabled Burner Wallet made more sense than the existing design. Building for the future, Raiden state channels provide stronger long-term architecture for the Burner Wallet, since they are significantly more secure than the POA Network — with only 4 nodes actively controlling the POA Network. With Raiden, we could still use Dai (not xDai) for payments and tips, but could do so via extremely fast and secure state channels. Additionally, a Raiden-enabled Burner Wallet would provide great value to Raiden, by helping to easily onboard users into the world of powerful state channels.

This decision was finalised at about 3am on Sunday morning. At this point we had 6 hours left to submit and it became clear that we would not be sleeping :). We set about deploying Raiden nodes: one for the publisher and one for the viewers — for the PoC we would control the state channel nodes. Viewers had to share one Raiden node (or run their own full node). However, Raiden are actively implementing a Raiden light-client, and the team assured us it would be open-sourced by early May. Thus, we felt confident relying on a future light-client to enable real-world adaption.

Adapting the Burner Wallet front-end to talk to the viewer’s Raiden node and removing all POA/xDai logic provided to be a significant amount of work. By around 7am we had a basic Raiden-enabled version working. We then implemented the MakerDAO Query API for providing an accurate read of the current Dai price (adjusting for even slight deviations from the current USD value), as well as ENS for easily addressing the broadcaster via their ENS name.

As people laid scattered all over the venue on tables and bean bags (there were even 30-or-so beds setup for hackers to crash in), we finally reached MVP! We put together our devpost and video. We presented dTok on the mainstage around noon.

dTok was selected as a winner of the hackathon by ETHGlobal, as well as a winner of all other sponsor’s prizes, including Raiden, MakerDAO, and NuCypher (just because they liked the idea :) ). As a winner, we presented again on the global livestream. The complete presentation may be viewed below:

What’s next for dTok?

We will be working closely with the Raiden team to integrate the light-client in the coming weeks (as it comes online). We will also be cleaning up the front-end and solidifying the UX into a stable release. Additionally, we will be engaging a number of innovative artists and content creators to help test and further the dTok platform vision, including Ricardo, of TribalNeed, who will run more live-streams and earn funds for his work in Dai.

Follow Stake Capital on Twitter to keep up on the latest of what we are doing as well as our developments on dTok.


Focus on what you do best and delegate staking to Stake Capital

Follow-us on Twitter | Join our Telegram | Smash the clap button