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

Token Supply Mismatch: Explorer Shows Discrepancy in Wallet Balance #1

Open
flechemano opened this issue Dec 14, 2024 · 1 comment
Open

Comments

@flechemano
Copy link

When deploying a test token contract, I set the total supply to 100000. After deployment, the token's total supply displayed correctly on the explorer (view token info). However, the wallet balance at the deploying address (view wallet) shows an unexpectedly large number of tokens with excessive zeros.

Steps to Reproduce:

  1. Deploy a new token contract on the test blockchain.

  2. Set the following parameters:

Token Name: CyberFl

Symbol: CyFl

Total Supply: 100000

  1. Deploy the contract.

  2. Check the total token supply and wallet balance on the explorer.

Expected Behavior:

The total supply should match the input value (100000).

The wallet balance should reflect the expected number of tokens.

Actual Behavior:

The total supply on the explorer shows correctly as 100000.

The wallet balance for the deploying address shows an inflated number of tokens 16,665,157,472,552,165,007,407,956,006,526,820,076,178,637,675,451,779,657,981,833,417,096,758.625536

Observed Data:

Explorer Token Info: https://testnet.cypherscan.ai/token/0xEA0c283548ef5030d1e628a204a930E04f6C0141

Wallet Token Balance: https://testnet.cypherscan.ai/address/0xFd175c768A38d769c56CD8a733c18EA49C48E074?tab=token_transfers&token=0xEA0c283548ef5030d1e628a204a930E04f6C0141

Possible Cause:
The discrepancy might stem from an issue with unit handling in the contract logic or the explorer's interpretation of token decimals. For example, the token might internally represent values with 18 decimal places by default, causing a mismatch between the intended total supply and displayed wallet balances.

Environment:

Blockchain network: Cypher TestNet

@zakaria5313
Copy link

same i see balance some number wrongly

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

2 participants