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

ADX transferrable calculation #9

Open
Ivshti opened this issue Sep 24, 2018 · 0 comments
Open

ADX transferrable calculation #9

Ivshti opened this issue Sep 24, 2018 · 0 comments

Comments

@Ivshti
Copy link

Ivshti commented Sep 24, 2018

if you want to use a more accurate calculation for AdEx, here's the formula to calculate the circulating supply:

const fundAddr = '0xf83f7411046ce4a6fba6584b868fb15d45f0065a'
const teamAddr = '0x230fe2dc4fe6a13adaa87b433862e3b21148546d'
const tsSeconds = Math.floor(Date.now()/1000)
const MUL = 10000; // multiplier, 4 decimals
const TOTAL = 100*1000*1000*MUL; // 100m
const adxTeamBalance = (await token.balanceOf(teamAddr)).toNumber();
const teamTransferrableBalance = (await token.transferableTokens(teamAddr, tsSeconds)).toNumber();
const adxFundBalance = (await token.balanceOf(fundAddr)).toNumber();
const fundTransferrableBalance = (await token.transferableTokens(fundAddr, tsSeconds)).toNumber();
const nonTransferrable = (adxTeamBalance - teamTransferrableBalance) + (adxFundBalance - fundTransferrableBalance)
const circulating = (TOTAL - nonTransferrable) / MUL

can be verified against: https://github.com/adexnetwork/adex-token

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

No branches or pull requests

1 participant