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

Implementing getTotalBurnt, getTotalCirculatingSupply API #1617

Closed
aidan-kwon opened this issue Aug 31, 2022 · 3 comments
Closed

Implementing getTotalBurnt, getTotalCirculatingSupply API #1617

aidan-kwon opened this issue Aug 31, 2022 · 3 comments
Assignees
Labels
enhancement New feature or enhancement Github

Comments

@aidan-kwon
Copy link
Member

aidan-kwon commented Aug 31, 2022

Background
Blockchain data services such as CoinMarketCap need to know the total burnt amount of KLAY and the total circulating supply.
They can calculate the number with on-chain data, however, it requires lots of time and engineering resources.
If we implement APIs for that information, they can quickly get it in anytime.

Consideration

  1. klay_getTotalBurnt
  • Two kinds of KLAY burning methods are used generally
    • KIP71 Burn mechanism: half of tx fee will be removed from the state
    • Sending to 0xdead: Anyone can send KLAY to 0xdead address to burn KLAY
  • We can consider two types of returns depending on an input parameter
    • klay_getTotalBurnt([Additional burn address]): if Additional burn address is nil, return only the burnt amount by KIP71 Burn mechanism. With an input, we can add the balance of the input address
  • We may need to store the data in the database. In that cases, find a safe way to calculate all previous block data
  1. klay_totalCirculatingSupply
  • We need to collect requirements and definition from data services or business team to define the specification
@smseo
Copy link
Member

smseo commented Aug 31, 2022

@aidan-kwon IMO, we should provide klay_getTotalSupply, not klay_totalCirculatingSupply because klay_totalCirculatingSupply might have to rely on offchain data.

Let's first focus on klay_getTotalBurnt and klay_getTotalSupply.
cc @kjeom

@exalate-issue-sync
Copy link

Exalate commented: Issue Created by: aidan-kwon

@sjnam sjnam added enhancement New feature or enhancement and removed Github labels Sep 12, 2023
@blukat29
Copy link
Contributor

Implemented by #2148.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or enhancement Github
Projects
None yet
Development

No branches or pull requests

5 participants