Why token decimals matter in cross-chain swaps
Token decimals turn raw units into readable amounts, and mismatches can make a cross-chain swap look rounded, mispriced or short after a transfer.
Crypto Daybook Newsroom3 min read
Token decimals tell a wallet or swap service how to turn a token’s raw units into a readable amount. In a cross-chain swap, that conversion matters because the token on one chain may use a different number of decimal places from its counterpart on another.
For example, a token with six decimals represents 1.25 tokens as 1,250,000 raw units. With 18 decimals, the same displayed amount is represented by 1,250,000,000,000,000,000 raw units. The numbers differ; the displayed amount is the same. For the separate question of delays, see this guide to a pending Super Bridge stablecoin transfer. Decimal conversion affects the amount shown, while a pending transfer is a separate issue.
What do token decimals mean?
Decimals set the scale used to display a token’s smallest units. They do not, by themselves, set its price or value. A token contract typically handles balances and transfers as whole numbers of those units, while wallets place the decimal point for people to read.
That means “1 token” is not necessarily the same raw number across tokens. A swap service has to read the right decimal setting for each token it handles. If it assumes the wrong setting, an amount can appear many times too large or too small, even if the underlying transfer used a valid integer amount.
How are decimals handled in a cross-chain swap?
A cross-chain swap converts amounts for the source and destination tokens separately. A bridge may lock tokens on one chain and release or mint a corresponding token on another; the swap route then accounts for the units and decimals of both assets.
In a simplified example, a source token with six decimals and a destination token with 18 decimals may each represent 1.25 tokens with very different raw numbers. The route must convert those numbers before comparing amounts or carrying out the swap. A displayed output can also differ from the input because the assets have different prices, fees apply, or the trade moves the market price.
Rounding can matter when a conversion produces a fraction of the destination token’s smallest unit. Since contracts transfer whole raw units, the fraction may be dropped. The smaller the amount and the coarser the destination token’s precision, the more visible that rounding can be.
What should you check before confirming?
Check the token and network details, then compare the quoted output with the amount you expect to receive. A wallet’s displayed balance is easier to read than raw units, but the decimal setting behind it must match the token being used.
- Confirm the token contract and chain for both sides of the swap.
- Read the quoted output and fees before approving the transaction.
- Check whether the destination token is a bridged version with its own contract and decimal setting.
- For a very small transfer, account for possible rounding to whole raw units.
Decimals are a display scale with real effects on conversion and rounding. For most readers, the practical rule is simple: compare token amounts as displayed, check the route’s quoted output, and make sure the token and chain are correct before confirming.