Open hats-bug-reporter[bot] opened 5 months ago
Github username: @https://github.com/Pavel2202 Twitter username: https://twitter.com/timenov_pavel Submission hash (on-chain): 0x27da7f4ff2a68cff41196f705cbe820c03bfb92b96b196520ce50d2b618a6d6b Severity: low
Description: Description\ The decimals function is optional in the initial ERC20 and might fail for old tokens that do not implement it.
Attachments
https://github.com/Tokemak/v2-core-hats/blob/74b397ce988a418a1bd02a45716cfc964922be26/src/strategy/LMPStrategy.sol#L370-L371
https://github.com/Tokemak/v2-core-hats/blob/74b397ce988a418a1bd02a45716cfc964922be26/src/strategy/LMPStrategy.sol#L786
https://github.com/Tokemak/v2-core-hats/blob/74b397ce988a418a1bd02a45716cfc964922be26/src/strategy/LMPStrategy.sol#L821
If there was a token used in the system that didn't support decimals() then reverting is the desired behavior. Making it work by using a default of 18 would risk improperly calculating our results.
Github username: @https://github.com/Pavel2202 Twitter username: https://twitter.com/timenov_pavel Submission hash (on-chain): 0x27da7f4ff2a68cff41196f705cbe820c03bfb92b96b196520ce50d2b618a6d6b Severity: low
Description: Description\ The decimals function is optional in the initial ERC20 and might fail for old tokens that do not implement it.
Attachments
https://github.com/Tokemak/v2-core-hats/blob/74b397ce988a418a1bd02a45716cfc964922be26/src/strategy/LMPStrategy.sol#L370-L371
https://github.com/Tokemak/v2-core-hats/blob/74b397ce988a418a1bd02a45716cfc964922be26/src/strategy/LMPStrategy.sol#L786
https://github.com/Tokemak/v2-core-hats/blob/74b397ce988a418a1bd02a45716cfc964922be26/src/strategy/LMPStrategy.sol#L821