How I Integrated Blockchain to my Existing Productivity App (Kanbanote)

#9 — How I created a cryptocurrency that rewards you for doing your own tasks

On the left, the wallet of the cryptocurrency created, and on the right, Kanbanote!

Defining the cryptocurrency

There is no point of building a cryptocurrency if it doesn’t solve a problem. Once you have it there are a few details to set before building it!

Solving a problem

Why? This is the question you need to ask yourself before adding blockchain or a cryptocurrency.

A screenshot from Kanbanote
  • Ideally, all the tasks should have the same weight, then you can better assess how much tasks you can do a day. But most of the time all the tasks have a very different weight!
  • Giving 1 MOTIV, no matter how long is a task, will force me to create tasks of a similar weight

Designing the cryptocurrency

Define the identity of the cryptocurrency:

  • Name: Motive
  • Symbol: MOTIV
  • Future: Give MOTIVs to different productivity products and services so that they can distribute the coins to their users in order to boost their productivity!

Choosing a technical solution

There are many ways to build a cryptocurrency:

  • “Colored coin” — It’s a coin that runs inside another blockchain. For example with Peerassets you can create your own coin inside the peercoin cryptocurrency.
  • Creating a clone of a Proof of Work cryptocurrency with its own blockchain — There are many tutorials and generators to do it, the only problem is that Proof of Work requires mining, which “wastes” electricity and if you don’t provide enough computational work, someone can easily block your network!
  • Creating a clone of a Proof of Stake cryptocurrency with its own blockchain, it’s quite hard to find tutorials.
  • Create a cryptocurrency from scratch: the hardest solution, and the longest indeed, and maybe not secured enough if you are not skilled enough.

The long road to Motive

Here is the process I followed to try to build Motive:

  1. The first link I found was this one “ CLONING A COIN THE EASY WAY IN ABOUT 20 MINUTES” — https://pastebin.com/iL9DeTTS
  2. This tutorial explains how to build a fork of GorillaTeeth which is a clone of Peercoin (the first Proof of Stake cryptocurrency which also combines Proof of Work), it’s also a clone of bitcoin. It is built in C++, language that I am not familiar with at all. But the problem was just that it was impossible to compile because of deprecated dependencies. I then tried with Docker and I couldn’t manage as well
  3. Then I decide to keep searching and going for another solution, I then found Peershares — https://github.com/Peershares/Peershares
  4. It’s another clone of Peercoin, full Proof of Stake, no longer maintained but very well documented. It was made for creating ICOs, or just to be used for your own products, so exactly what I needed. I managed to compile it and make it run locally with Docker, I even managed to build the Genesis block, awesome moment! But I didn’t manage to build the binary files that I could share with the users.
  5. I then posted in the Peercoin forum to ask how could I solve this. Because it’s no longer maintained they recommended to better go for Peercoin, to understand its source and remove the Proof of Work part of the code. So I decided to give a try and to start just compiling it. Again I didn’t manage, I was quite frustrated because it was my third trial. I also realized that I was really lucky to be a web developer because everything is new and simplified to make development easy!
  6. At this moment I was about to abandon 😫, I had also a few other options such as going for a Proof of Work cryptocurrency or using Naive coin which is a simple implementation of a cryptocurrency in NodeJS. But I decided to look for cryptos built in other languages than C++, otherwise I could never maintain it. I then found NXT from Jelurida. After more researches, I even found the NXT Clone Starter: https://bitbucket.org/Jelurida/nxt-clone-starter. There was even a video tutorial made by the team. The only con which is actually good for adoption is that 10% of the new coins will be given to the NXT holders!
  7. I finally managed to make it run, and make transactions! A unique moment!! Then I struggled a bit to build it and create an installer, I even tried to build it with Electron but I finally managed after finding some piece of code from the Nxt repository that was not in the archive of nxt clone for some reason.

The integration with Kanbanote

Now the cryptocurrency works. I had to integrate it to Kanbanote.

Defining rules

As I said above, the goal of Motive is to provide coins to different productivity tools that will distribute it to their users based on their own rules.

Defining the architecture

The architecture is quite simple:

  • 1 Lightweight wallet with the Kanbanote account
  • Kanbanote’s backend will query the lightweight wallet that has an API in order to send a MOTIV coin every time a task is dropped in the reward column and if it hasn’t been done before

Implementing it

The implementation was quite easy:

  1. I created the CURL query
  2. I updated the database in order to track if one note got already its reward and also to save the public MOTIV address and the reward column. Kanbanote does not save your private key! So you are the only owner of it, keep it safe!
  3. Then I implemented the UI, in order to go faster it’s a server side rendered UI with some VanillaJS to query the API

Simplifying the account creation

In order to make Kanbanote’s life easier, they don’t need to download the wallet to create an account. That is why Kanbanote will generate a private key based on an algorithm.

Hosting nodes

The last step before going into production was to deploy nodes. I decided to use OVH VPS and Amazon Web Service that provides a one-year free hosting.

Boosting my productivity!

Now everything is there, every time I complete a task I get 1 MOTIV plus a bit of dopamine. What else do I need?

The future of Motive

The plan

Here are the next steps of Motive:

  1. Add more nodes to the network to make it more secure
  2. Make Motive more accessible: web wallet, mobile app
  3. Accept Motive payments in Kanbanote for premium plans
  4. List Motive in exchanges

How to get MOTIVs

There are currently different ways to earn MOTIVs:

Get started with Motive

Here is the website to get started.

Want to build your own cryptocurrency?

If you also want to build a cryptocurrency similar to Motive, it’s very easy. I created a generator and a small tutorial. Have a look, it’s free!

What’s next?

This article is part of my Learning Challenge about Blockchain & Cryptocurrencies. Like this one, I made 5 others article related to the topic.

If you liked this post, please click the clap 👏button below a few times to show your support! Also, feel free to comment and give any kind of feedback. Don’t forget to follow me!

Hello, I’m Sandoche Adittane. I learn about one topic every month and write a post about it!