Introduction

The objective of this project is to develop functionality to properly determine the number of tokens that are locked at any given time in order to properly determine FIO token circulating supply.

Today this calculation is based on the following:

This calculation does not properly consider:

Mainnet locks background

Some tokens have been locked at Mainnet as described in Mainnet locks

The lockedtokens table stores:

total_grant_amount

Total amount of locked tokens

unlocked_period_count

Number of predefined schedule time periods which have passed

grant_type

Type of lock

inhibit_unlocking

Integration flag determines if FIO Member has launched integration

remaining_locked_amount

Remaining locked tokens

timestamp

Date when locks set (Mainnet)

It is worth noting that the remaining_locked_amount is only updated when the account is subject to an action impacting token balance such as:

Therefore in its current state, sum of remaining_locked_amount is not a good way to calculate locked tokens, because if a predefined time period passes, the amount will not be automatically updated. That’s why time is used in existing calculations.

Solutions Considered

On-chain

An enhancement to the FIO Protocol could be be made to create a new maintenance call, which would recalculate locked tokens for every account in locked token table for both Mainnet locks and FIP-6 locks.

Pros:

Cons:

SELECTED: Off-chain

Custom logic could be built on existing Graphana stats service or similar which would properly report locked tokens:

Pros:

Cons:

Solution Specification

Circulating Supply Service

Existing Circulating Service needs to be modified to accurately compute locked tokens:

Grafana import

A data feed to Grafana should be generated which would enable the creation of a stacked graph, similar to this, which shows circulating supply over time in the following categories:

Initiative link

https://fioprotocol.atlassian.net/browse/WP-92