Innovative ERC20 time token & platform - capturing company future benefits

October 08, 2019 in #ethereum #traditional company #ico | | | Share on Google+

LKD platform: a trustless solution to buyback ICO tokens

Your takeaways from this post:

  • How a traditional company can scale its production by raising funds with blockchain
  • An innovative token design: capturing the proceed of the future diamond sales
  • Permit the token buyback in a fair and transparent way
  • A full platform workflow example: from a diamond sale, to the user exit

Project overview

LakeDiamond SA - a traditional industrial enterprise

LakeDiamond SA - a startup incubated in EPFL Lausanne, Suisse - is growing synthetic diamonds in their reactor facilities. The main production is focused on high-tech applications. In a reactor, 6x6mm small square of diamond called “seed” will grow to a 4mm thick layer in approximately 20 days, leading to a diamond of 3 carats.

On the picture above, we can list from the left: a diamond plate, a reactor growing diamonds from seeds, a watch micromechanism.

In order to raise funds to build more reactors and improve its production capacity, LakeDiamond used a new crowdfunding mechanism: an Initial Coin Offering (ICO) on the Ethereum blockchain.

The LKD (time) token

In the ICO, the public has the opportunity to purchase the LKD token, an ERC20 token living on the Ethereum network.

Usually, a token can allow:

  • A right to access a network, to see some data, or unlock some features
  • A store of value, or equivalent to a collateral (USD, CHF, gold)
  • A share in a company (security token), which gives voting and dividend rights

In the case of LakeDiamond, the token represents a unit of time of production, exactly 1 minutes of diamond growth in a reactor located in LakeDiamond Labs. The LKD token is classified as a payment token by FINMA (Swiss Financial Authorities) because one of its use is to directly buy diamonds.

Token utility for the users

This token has three purposes for the users:

  • (A) Buy on the Ecommerce: purchase diamond on the ECommerce site: in this case, customers are paying in minutes of production instead of the usual prices in CHF or EUR
  • (B) Exchange on the LKD platform: capture the value of future sales, via the LKD platform (described below), each time a physical diamond sale occurs, the proceeds are converted in ETH, and an order is created on the LKD platform, buying back any LKD listed in the right price range
  • (C) Lastly, secondary markets are available for trading (IDEX, EtherDelta), as all other ERC-20 in existence

Supply reduction by burning tokens

This token is only minted for the sale. Each time the token is used for a buy (A) or an exchange (B) with LakeDiamond, it is burned, decreasing the supply until no more tokens are available.

The token is just needed by LakeDiamond for the production scaling phase. Later on, when no more tokens are available, customers can still buy diamond with CHF and EUR, and LakeDiamond will keep the proceeds of the sales for themselves. The LKD platform assuring the exchange can be then decommissioned.

After the token distribution, there will be a period of a few years where LakeDiamond will not make much profit on their diamond sales, as they are captured by token owners, slowly removing the LKD from circulation. We can predict that high value sales (> 1 CHF) will be captured by LKD tokens, while small value sales (< 0.6 CHF) will be ignored by users and go back to LakeDiamond pockets.

Token value projection

We can see here that the LKD token has some really interesting features:

  • A payment method in unit of time - instead of fiat - meaning that in a few years, we could get more diamonds for the same time of production as the reactor becomes more efficient
  • Miniaturization tends to increase, especially in the high-tech lines, so we need less growing time to produce expensive products (watch mechanisms, lasers, transistors)
  • Owners can exchange their LKD against the proceeds of a sale (in ETH), and so, they can wait for the highest sale to make to best possible trade
  • Each time LKD is used on LakeDiamond platforms, it is burned, making the token rarer with time. Speculators will probably want to keep some tokens, to exchange them in few years for ultra-high value products (> 1.5 CHF)

We could predict that as time goes, there will be less tokens available, and more high value sales to catch, pushing up the token price. The graph below shows the product roadmap coupled with the projected price per token.

The LKD platform - capturing diamond sales

Users owning LKD tokens have the opportunity to capture future diamond sales.

This diagram below represents the workflow of a typical diamond sale, from the industrial customer, to the opportunity for users to exchange their tokens (proposals) for some ETH (LakeDiamond order).

For that, users need to first register on the LKD platform and pass the KYC (Know Your Customer).

Then, they can propose to exchange their tokens, by making proposals with the following parameters:

  • Amount of LKD
  • Price per LKD (in CHF), the minimum price they are willing to exchange

The proposal will get included in a queue (technically an order book) next to other token owner proposals. The queue is ordered by the lowest price first, and if the same price exists, the oldest proposal will get exchange first.

Decentralised order book

When placing a proposal to sell LKD tokens on the LKD platform, users will in fact add a new record (via their Ethereum wallet) in a decentralised order book (a smart contract), meaning that LakeDiamond do not have control on creation or deletion of user records in this queue. The biggest advantage for the user is to be sure that each proposal is treated the same way, bringing transparency and fairness during the exchange of value with LakeDiamond.

There are 2 steps in this exchange:

  • First, users place some proposals (LKD amount, price in CHF) on the LKD platform, which end up in the order book smart contract

  • Then, after a physical diamond sale, LakeDiamond places a buyback order (LKD amount, price in CHF, ETH amount), which will match some proposals (listed in the order book) and distribute the rewards (ETH) to winners.

The smart contract order book is based on the Kyber decentralised order book. Their order book design offers the mechanisms to include a new record in an ordered list, with a minimum change in storage.

Our previous homemade order book experimentations required a loop on each record to check prices and timestamps, which quickly became expensive (and unusable) given the Ethereum gas price.

Luckily, when creating a new record, the Kyber order book just needs to updates 2 record links: the preceding and the following. The trick is to work with relative links.

This example highlights inserting proposal 60 in an actual order book containing already 3 records:

When inserting proposal 60 at price 1.1 CHF, you will need to check all prices to find the previous and the next records. For that, Kyber introduced a clever feature called Hint, giving you the possibility - when inserting a record - to precise where to insert your record, in our case Hint will be the proposal 40. The order book will then receive:

InsertProposalWithHint (id: 60, price: 1.1 CHF, hint: 40)

From there, the order book smart contract will double check that previous and next records match the record price we want to insert. If not, it will look a bit further in the book and try to insert in the next following 10 records, if we set the customisable limit (hint_limit) to 10.

Matching order with Proposals

Let's suppose four token owners made one proposal each in the following sequence: A → B → C → D. The order-filling mechanism would be as follows:

What if:

  • Two proposals have the same price, which one will be used to fill the order? The order book will choose the older proposals first. That is why proposal A is selected before proposal D in this example.

  • What if there are not enough proposals to fill an order? The order will be filled as much as possible with existing proposals. The corresponding ETH will be distributed to these proposals, and the rest will be returned to LakeDiamond wallet.

Ps: the amount of ETH distributed to a proposal corresponds to the price per token set by the token owner during the proposal phase, and not the price per token of the order.

Workflow description

To give you a hint of how the platform looks like, we will describe below the full workflow of the developed LKD platform:

  • User registration
  • KYC validation
  • CRM: Customer Relationship Management
  • User proposal creation
  • LakeDiamond order creation + matching proposal(s)

User registration

First the user needs to sign up with his email and an Ethereum address (Metamask is needed to interact with the platform). User will have to validate his email via a code sent to his mailbox.

KYC validation

The user then needs to fill some information (address, origin of funds, and ID) that we will validate automatically via our KYC provider.

The user can see the result of the KYC in the Overview screen. Here the user Nico is allowed to exchange up to 100 000 LKD in a year.

CRM: Customer relationship management

To help LakeDiamond manage all their users, all information about users (name, address, KYC results) are recorded in a CRM (Customer relationship management), in our case: Pipedrive. After the user sends his information to the LKD platform, our backend will create in Pipedrive a new user Nico (along with all his related information).

ID documents, selfie, and automatic checks result on his age and name sanctions are present in the same screen. The CRM can help the admin to communicate (by email) with the user if some KYC documentation is missing.

At the same time, a deal is created for a target of 100 000 LKD, and attached to that user. The deal contains all the necessary flags to be reviewed by a KYC administrator.

Deals and KYC level can easily be tracked in the dashboard section. A KYC administrator can review Nico’s info, and click Won if the profile is completed. The deal will then disappear from this screen.

LKD platform navigation

After KYC validation from the admin, the user will have access to the dashboard.


First, he needs to connect his Metamask wallet with the button Setup wallet.

Metamask is a free google chrome addon, where you are able to store ETH and LKD.

After the wallet is setup, Nico can see his dashboard with a quick view of his active proposals and the completed order of the last 30 days.

Below that, he can see the proposal list, and last completed orders.


The menu Orders brings you to a detailed view of all orders completed by LakeDiamond.


The menu Proposals brings you to a detailed view of all proposals make by yourself or others.

User proposals creation

Nico wish to exchange 100 LKD for 1 CHF.

From the dashboard screen, he can estimate his position in the order book:

  • How many LKD tokens will be sold before him, if he set his price at 1 CHF
  • And how many proposals it represents.

From the estimation we can see that:

  • A volume of 67 800 LKD tokens is already waiting for exchange (given a price of 1 CHF)
  • It represents 171 proposals (1 user could make one or more proposals)

PS: from this information, Nico could set his selling price below, like 0.9 CHF, which will certainly bring forward his proposal in the queue.

When he is sure of his choice, he presses Create Proposal which will send the information to the order book smart contract via his Metamask wallet.

Few minutes later, his proposal 570 will appear in the dashboard and his proposal list. Nico can cancel anytime his proposal as long as it has not been matched and exchanged by an order.

LakeDiamond Order creation

Today, an industrial client bought some diamonds, and the payment arrived. LakeDiamond converts the fiat into ETH, and open the LKD platform to the menu Order.

Here LakeDiamond will create an order, which will eat the proposals in the order book from the bottom (smaller price first).

The order parameters are:

  • Type of order
  • Description
  • Price per token: 1 CHF (the order book will be eaten, starting from 0 CHF, to 1 CHF maximum)
  • Token amount: 200 LKD (this is the total amount of LKD token to buyback)
  • Ethereum amount: 1.11 ETH (this is the equivalent of the diamond sales, converted from fiat)

Pushing the Create button will open the admin Metamask wallet, and the transaction will be sent to the smart contract.

Matching Order and proposal

The order creation step before will create order 11, which will automatically eat proposal 23 and 59, because they are the first in line for price (0.12 CHF), and date of creation

In more detail we can see in Etherscan:

  • The rewards (0.0773 ETH each) going to the 2 proposals for the price of 0.12 CHF per token
  • The excess of 1.41 ETH going back to the Admin wallet
  • 200 LKD send to 0x000 in order to burn them

As you can see, because both proposals wanted to exchange at a low rate of 0.12 CHF, LakeDiamond did not have to apply the 1 CHF rate per token. So, 1.42 ETH is sent back to his wallet.

This behaviour is a great compromise between LakeDiamond and the token owners in the buyback mechanism:

  • LakeDiamond want to burn all the existing tokens, while giving less ETH as possible
  • The token owners want to exchange their token, at a price they see fair

If only one proposal exists at 1 CHF price, and an order for 0.9 CHF get created, they will be no matches. The ETH simply goes back the LakeDiamond wallet, and the user proposal waits for a higher price.


Thought this post, I wanted to show you how a traditional company could use blockchain technology to scale his business, raising funds, and gradually sending back value to the users.

The LKD token is meant to be liquid with 3 methods of exit (buy diamonds, exchange on the LKD platform, secondary exchange).

The investors take risks, as always, when investing in startups. This token, even living on a decentralised network (Ethereum), brings risks too as it represents something very centralized (LakeDiamond production time).

The exchange happening on the LKD platform is designed to be fair and transparent. LakeDiamond cannot favour themselves or a friend when the buyback happens. Each step of the process - user proposals, orders and matching - can be monitored outside the LKD platform, on Etherscan.

I am sure this model could be greatly perfected and applied to many other companies seeking new investments for growth.

Some extra links:

  • LakeDiamond open source repo, if you want to have a look at the code
  • Video demo of the LKD platform (final version)
  • Video demo of the POC version
  • LakeDiamond whitepaper that I co-authored

Thank you for reading :-) See you in the next post!

October 08, 2019 in #ethereum #traditional company #ico | | | Share on Google+