Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Circulating Supply #34

Open
kroggen opened this issue Feb 8, 2022 · 1 comment
Open

Proposal: Circulating Supply #34

kroggen opened this issue Feb 8, 2022 · 1 comment
Labels
feature feature request

Comments

@kroggen
Copy link
Member

kroggen commented Feb 8, 2022

It is common for teams to create a token and lock parts of the supply so that they can only be used after some expiration time. This can be done in Aergo using the Token Locker

It makes more sense for tokens with fixed supply (those that are not mintable). In this case the team cannot mint new tokens and they can only use that fixed supply, in which some part they locked for future use.

The team can prove to investors that some amount of the tokens are really locked by using the Token Locker.

The Aergoscan could read that information of locked tokens directly from the Token Locker contract, and display it on the token page:

  • Circulating supply ( = total_supply - locked_supply )
  • Locked supply ( retrieved from the token locker )
  • Total Supply ( retrieved from the ARC1 contract )

To read the locked amount on the token locker:

local amount = contract.call(token_locker, "get_total_locked", token_address)

It will return the amount that is really locked, ie: in which the locks did not expire (at this moment).


When the user clicks on the locked supply, Aergoscan can retrieve details of the locked tokens, like the expiration time for each amount, and display in a popup using a chart.

This information can be retrieved with:

local locks_str = contract.call(token_locker, "locks_per_token", token_address)

It returns a JSON string with information about each lock, mainly amount and
expiration_time. This last one in unix timestamp, that can be converted to a UTC datetime for display.

@kroggen
Copy link
Member Author

kroggen commented Feb 8, 2022

It could also display if the token has a fixed supply, with something like:

Supply: Fixed

And for mintable tokens:

Supply: Variable

Or, instead of the above, display the extensions that were enabled on the token contract

@kroggen kroggen added the feature feature request label Feb 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature feature request
Projects
None yet
Development

No branches or pull requests

1 participant