code-423n4 / 2021-06-tracer-findings

1 stars 0 forks source link

No support for token with decimals > 18 #113

Closed code423n4 closed 3 years ago

code423n4 commented 3 years ago

Handle

s1m0

Vulnerability details

Impact

The smart contract doesn't behave correctly if deployed with token that have decimals > 18.

Proof of Concept

The functions tokenToWad and wadToToken revert if the tokenDecimals is > 18. These functions are called in critical places like deposit() and withdraw.

Recommended Mitigation Steps

Consider checking in the constructor that _tokenDecimals is <= 18.

raymogg commented 3 years ago

Duplicate of #116

loudoguno commented 3 years ago

changed risk from 1 to 2 as per judges sheet