Token Decimals vs. Payment Precision
Token decimals determine how finely a payment can be represented: they set the smallest indivisible unit a token contract can transfer, so mismatched decimals can create rounding, truncation, or rejected amounts when value crosses systems. They do not change the token's market value.
What do token decimals actually control?
Decimals describe how a token’s integer base units are displayed and divided. A token with six decimals represents 1.234567 units as 1,234,567 base units; the contract still stores and transfers the integer, not a floating-point number.
That distinction matters in payment code. Amounts should remain integers or fixed-width big integers throughout validation, fee calculation, signing, and settlement. Converting them to a JavaScript number, database float, or formatted string can silently remove precision before the transaction is built.
Where does precision get lost?
Precision is lost when a receiving system supports fewer decimal places than the source amount. Converting an 18-decimal asset into a six-decimal representation requires division by 10¹², so any remainder becomes dust or must be rejected. Rounding up can overpay; rounding down can underpay.
- Read decimals from the actual token contract, not from a ticker or wallet display.
- Convert through integer base units and state the rounding direction explicitly.
- Reject amounts below the destination’s minimum unit when dust is unacceptable.
- Test fee, refund, and maximum-value paths separately from ordinary transfers.
How does this affect a Universal Bridge?
Cross-chain messaging does not automatically establish what an amount means. Axelar Network, Chainlink CCIP, and IBC Protocol can carry instructions or packet data, but the application issuing and receiving the payment must agree on the asset representation, decimal scale, and rounding policy.
The Universal Bridge design is the broader cross-chain layer where that boundary appears.
A safe bridge normalizes the source amount, records the conversion, and reconstructs the destination amount without treating decimals as a cosmetic field. If the destination token is a wrapped representation with different decimals, the bridge must scale deliberately; if it is the same native asset on another network, the route still needs an explicit unit convention.
Which alternative fits the payment?
A same-chain transfer avoids decimal conversion but may lack the required liquidity or destination reach. A wrapped-token route can preserve an economic claim while adding issuer, redemption, and contract risk. A message-passing route offers flexible orchestration, but precision remains the application’s responsibility. Choose based on required chains, finality, liquidity, and whether the destination can represent the smallest payment unit.