Assessment reports>STFX>Discussion>Eighteen-decimal compliance

Eighteen-decimal compliance

The decimal normalization factor in the claim function in Spot.sol is as follows:

amount / (10 ** (18 - tokenDecimals));

However, this approach only works for tokens with 18 or fewer decimals and will cause the function to revert with tokens that have more than 18 decimals. It is worth noting, however, that tokens with more than 18 decimals are currently rare in the ecosystem.

Zellic © 2024Back to top ↑