Judge has assessed an item in Issue #97 as M risk. The relevant finding follows:
DOS StableVault deposit and withdraws if ERC20 with more than 18 decimals used.
Description
withdraw and deposit functions in StableVault will revert if ERC20 token with more than 18 decimals is used.
This is due to an revert when trying to subtract the token decimals from hardcoded 18.
Judge has assessed an item in Issue #97 as M risk. The relevant finding follows:
DOS StableVault deposit and withdraws if ERC20 with more than 18 decimals used. Description withdraw and deposit functions in StableVault will revert if ERC20 token with more than 18 decimals is used. This is due to an revert when trying to subtract the token decimals from hardcoded 18.
deposit: https://github.com/code-423n4/2022-12-tigris/blob/588c84b7bb354d20cbca6034544c4faa46e6a80e/contracts/StableVault.sol#L49
Recommendation: Add a check that token decimals is under 18 in listToken. withdraw: https://github.com/code-423n4/2022-12-tigris/blob/588c84b7bb354d20cbca6034544c4faa46e6a80e/contracts/StableVault.sol#L67: