Tokens with more than 18 decimals can cause issues #174
Labels
bug
Something isn't working
duplicate
This issue or pull request already exists
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
Lines of code
https://github.com/code-423n4/2022-09-canto/blob/65fbb8b9de22cf8f8f3d742b38b4be41ee35c468/src/Swap/BaseV1-core.sol#L93-L94
Vulnerability details
PoC
There are some tokens with more than 18 decimals. For example (YAMv2 has 24 decimals).
However, all you math is based on the fact that the maximum number of digits for a token is 18.
Recommended
Check that the tokens has 18 digits or less when creating the pair.
The text was updated successfully, but these errors were encountered: