Closed c4-bot-5 closed 9 months ago
0xRobocop marked the issue as duplicate of #638
0xA5DF marked the issue as duplicate of #757
0xA5DF marked the issue as satisfactory
0xA5DF changed the severity to 2 (Med Risk)
0xA5DF marked the issue as unsatisfactory: Out of scope
0xA5DF marked the issue as unsatisfactory: Out of scope
Lines of code
https://github.com/code-423n4/2024-02-althea-liquid-infrastructure/blob/main/liquid-infrastructure/contracts/LiquidInfrastructureERC20.sol#L270-#L277
Vulnerability details
Impact
Approved Holders receive 0 rewards from distribution.
Proof of Concept
The _beginDistribution() function calculates a holder's entitlement by dividing the contract's balance of the token to be distributed by its own totalSupply, then it multiplies the result by the user's liquidInfrastructure ERC20 token holding. However, this can represent a case of division before multiplication, and using this logic the holders get no rewards from distribution in most cases expecially as it keeps minting tokens to new holders.
The above POC shows that users receive no rewards after distribution even though they should have.
Tools Used
Manual Review
Recommended Mitigation Steps
Multiply the contracts distribution token balance by the users LiquidInfrastructure token holdings before dividing by totalSupply.
Assessed type
Math