Skip to content

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

@flechemano

Description

@flechemano

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions