A blockchain is a specific type of distributed shared database that differs from a classical one in how it stores information. Instead of using a centralized and structured data store, blockchains split data into blocks that are then linked together via cryptography within a network of nodes.
For Take Back The Mic (TBTM), a gamified social network that is one of our long-standing customers at Ensolvers, we had to integrate a private blockchain based on the Ethereum protocol that is being used to implement a custom token called Kola. The primary purpose of this token is to provide an additional way to engage users in activities within the platform. In this article, we describe the journey of developing this solution both from the tech and product perspective.
Many applications include within their scope the concept of tokens, which represent a unit of value that can be ultimately exchanged for other services or products. In TBTM, we have been asked to create a token called Kola. At this moment, Kola is used to promote the digital content of artists and can be transferred between users. Also, Kola tokens can be exchanged for digital services like mobile data plans.
The first approach we considered to implement the so-called Kola Chain was to rely on the existing Ethereum Mainnet. However, analyzing current gas prices for the network (especially after the popularity boom of the network some years ago), made it infeasible for our purposes. That and the fact that the client wanted more privacy concerning users and transactions within the blockchain motivated the decision to implement a private network.
After doing some initial research and estimations of the cost of hosting the blockchain by ourselves, we finally decided to use a blockchain-as-a-service provider in which we can spawn a fully-fledged private Ethereum network. After choosing the provider, we set up an ERC20-like smart contract - a variation that allowed both token minting and burning.
The next step involved integrating the blockchain into the existing platform. As an initial integration, the blockchain-as-a-service solution that we chose provided a secured REST API for the smart contract deployed, which allowed us to integrate and release the solution in less than 2 months. On the backend side, we just had to develop and deploy a microservice devoted to interacting with the blockchain.
From the product perspective, after that release, any user with the existing mobile app (available for both iOS and Android) was able to open a secure wallet and purchase tokens. Then, users were able to exchange points earned on the platform (for engaging in activities like watching videos or sharing interesting content) into Kola tokens. Those tokens can be used in an internal marketplace to purchase services like additional data plans in some countries. This required the implementation of an additional integration with local telcos and other providers. Finally, as the release was a success, we were asked to expand the implementation to open our network to potential partners that wanted to host their tokens. Because of that, we decided to generalize the interface of the current microservice following the Ethereum JSON-RPC guidelines. So, this microservice will have a "meta-API" that allows third parties to create new tokens (with their underlying smart contracts) and also will feature a JSON-RPC interface,100% Ethereum-compatible to work with it.
In this article we described the journey of enhancing an existing app for supporting blockchain-based tokens that can be exchanged for services or transferred between users. We consider this implementation as a starting point for other very promising ideas which we are working on like integrating fractional NFTs and facilitating global payments and money transfers, among many other potential possibilities over the existing platform which we have been working on for years.