Building a Token-Curated Registry

Caroline Sofiatti
Computable Blog
Published in
3 min readOct 16, 2018

TL;DR here is a tutorial to help you understand how to build a Token-Curated Registry, including voting in the context of smart contracts!

When I first dove into the world of blockchain coming from a Data Science and Machine Learning background, I was in for a few surprises. Suffice it to say: Crypto is a whole new world. What I thought would be hard to learn — blockchain itself and its infrastructure — turned out to be easy! The hard part was grasping the concept and mechanisms of a Token-Curated Registry (TCR), which has been influential on our data market protocol design at Computable. As I gained experience, I saw newcomers get stuck at the same pain points. This article explains those pain points and introduces a tutorial we at Computable built to address them.

Let’s start off with a bit of history. Back when I started working for Computable, and after I got familiar with the key concepts behind blockchains, I moved on to learning about TCRs. To me, Mike Goldin’s “Token-Curated Registries 1.0” article from 2017, along with its public GitHub repo as a reference implementation, was the most useful resource by far.

If you haven’t read that article, or don’t remember the example we are talking about, here is the summary: Imagine a TCR of top universities. A listing could be a simple string identifying a university by its name, e.g.: “Foo University”. Additionally, there are three user types in a Token-Curated Registry — consumers, candidates, and token holders. In this case, consumers would be students. They desire accurate lists and rankings of top colleges. Candidates would be college administrators who want to add their institutions to the list and improve their rankings to recruit students. Finally, token holders carefully curate the list to maximize its value and therefore the price of the tokens they hold. Token holders could be reviewers such as U.S. News or The Princeton Review or investors with purely economic motivation to boost the value of their token holdings.

Though that example was clarifying, I still had many questions: How do I save data using the TCR? For example, how do I save the university name and the ranking? How does voting work? How many people or institutions vote? What does that system even look like for the person on the other side of the computer? Would someone in The Princeton Review get an e-mail somewhere? How immediately would that person have to cast their vote? How does the listing ultimately get approved and added to the list of top universities?

Honestly, compared to the now well-documented world of Machine Learning, I felt, at the time, that I was being left high and dry. And, others I’ve met along the way have had similar questions — technical developers with little to no blockchain experience struggled with the same concepts. How exactly does this voting implementation work again?

What I would have wanted, when I was just getting started, was a tutorial that could walk me through the voting mechanism in the context of a TCR. I wanted to learn by doing. I wanted a hands-on tutorial that showed me how the pieces fit together. There wasn’t one. So at Computable, we decided to build it.

Hands-on Tutorial for Voting with a TCR using a DApp

A few fun lessons we learned along the way is that a lot of the user experience questions I had above in relation to timing and voting are vastly unanswered and will depend on your specific product and implementation. You’ll also have many different ways to implement a data storage solution. Our tutorial shows you one way to do it.

Like me, you may soon realize that the Ethereum + smart contracts ecosystem is the wild-wild west. Transitioning from other areas of tech into crypto often requires you to leave a happy and cuddled life in Python or Java for a new challenging and exciting life in Solidity!

Drop us a line at hello [at] computable.io if you want to learn more or have interest in building your own TCR demos!

If you’re interested in joining Computable, you’re in luck! We’re hiring.

--

--