Current implementation assume that all token are 18 decimal
Summary
Although most erc20 tokens are 18 decimals, some may still be able to make a token with different than 18 decimals, for some special reason. However, here the contract assumes all tokens are 18 decimal.
Vulnerability Detail
Dividing directly by 1e18 and assuming all tokens are 1e18 can cause the different result in mintAmount.
ali_shehab
high
Current implementation assume that all token are 18 decimal
Summary
Although most erc20 tokens are 18 decimals, some may still be able to make a token with different than 18 decimals, for some special reason. However, here the contract assumes all tokens are 18 decimal.
Vulnerability Detail
Dividing directly by 1e18 and assuming all tokens are 1e18 can cause the different result in mintAmount.
Impact
Code Snippet
https://github.com/sherlock-audit/2022-10-merit-circle/blob/main/merit-liquidity-mining/contracts/TimeLockPool.sol#L96
Tool used
Manual Review
Recommendation
Always while dividing use erc20(tokens).decimal() so you can get the real decimal for any token.