dTok 2.0: Connext, Dai Card, and the Champions League Final

Leopold Joy
Stake Capital
Published in
4 min readJun 12, 2019

We have been working hard on dTok over the past month since we won in South Africa. This article will jump into some of the adjusts we’ve made to the stack, why we made them, and our most recent proof-of-concept: the Champions League Final!

Why did dTok switch to Connext?

Although we initially built on Raiden at the ETHCapeTown hackathon, we knew that this would constrain the viewing-side UX until the Raiden light-client is released — prior to that, each viewer would be required to either run their own full node. Following the hackathon, we were excited to see the first version of the Raiden light-client released in mid-May, however this current light-client does not yet support transfer functionality.

In order to implement a stable and scalable version of dTok, we looked for alternative layer 2 micro-payment options. We were attracted to Connext’s light-weight Javascript client (NPM package), enabling easy bootstrapping and development.

While we’re currently moving forward with Connext, we plan to continue developing a Raiden-based version of dTok once there’s a readily available Raiden light-client that includes transfer functionality.

Why did dTok switch to Dai Card?

As a project that grew very quickly, the Burner Wallet codebase has historically lacked modularity. While there are fantastic efforts in motion now to clean up and modularize the Burner Wallet codebase, following the ETHCapeTown hackathon we opted to bootstrap dTok on top of Connext’s Dai Card, taking advantage of the existing structure, modularity of the codebase, and ReactJS best practices. This decision has increased our productivity and the maintainability / expansion of the dTok platform. Dai Card also already had a relatively stable integration with the Connext Network (Connext support is also currently in development on Burner Wallet).

As modularity improves, we intend to continue developing a Burner Wallet-based version of dTok here.

How we implemented dTok on Dai Card

We structured dTok’s stream viewing function as a new component and route, accessible via the main Dai Card screen. On the streaming route, a Livepeer media player is displayed (if viewing has been authenticated via payment) with a button for sending a micro-payment via Connext to continue viewing by sending payment to the predefined broadcaster.

Obviously, streaming authentication is currently only enforced via the front-end, but as Livepeer’s Streamflow is rolled out, we will implement backend stream viewing authentication. In our planned architecture, dTok viewers will be issued “stream keys” via the Livepeer API. We will then implement a gate around the HLS output, meaning that the Livepeer API node will check to make sure that each user is still paying before serving up each segment to that user (each stream key will be invalidated once a user has run out of viewing credit).

Pre-funded dTok links for (super) easy on-boarding

We believe that anyone with a phone or laptop should be able to simply click a link and jump into a dTok stream — without any wallet or prior experience of crypto. This easy on-boarding is central to the vision of dTok and the reason that built on Burner Wallet, and now Dai Card, as they both enable instantaneous onboarding for crypto novices.

Conveniently, mnemonic import functionality was already implemented in the Dai Card codebase (inside the settings route). We simply enabled pre-funded on-boarding links, by parsing the mnemonic from the query string to import it. We are also working on a script to quickly programmatically generate pre-funded Connext wallets along with their corresponding mnemonic URLs ready for viewer on-boarding.

Champions League PoC

Following the release of our first Dai Card-based version of dTok, the Champions League Final on June was streamed via dTok as an initial proof-of-concept of the platform.

The stream was a huge success, with people throughout the community tuning in to view the match. The PoC also enabled us to refine and develop the dTok UX more, in addition to uncovering some unexpected behavior. We also got some neat ideas and feedback for dTok from the community:

We have a variety of new dTok streaming content on the way soon, including more sports, live music performances, and talk shows.

How can you help out?

In addition to contributing to the repo (check out the active issues here), we are funding the development of dTok via the rewards received from our Stake Capital transcoder. You can easily follow our LPT delegation tutorial here. Your LPT delegations will help support our team as we grow dTok and bring pay-as-you-go live-streaming to the masses! 🚀

Follow-us on Twitter | Join our Telegram and Discord|

Please Smash the clap button 🙌

--

--