Currently, getTVL counts all token balances in GeVault, and attackers can manipulate getTVL to implement deposit attacks.
Secondly, since the calculation of LP does not use scaling, because there is a precision error in the division, the cost for the attacker to implement the attack is very low.
Lines of code
https://github.com/GoodEntry-io/ge/blob/c7c7de57902e11e66c8186d93c5bb511b53a45b8/contracts/GeVault.sol#L290
Vulnerability details
Impact
Currently, getTVL counts all token balances in GeVault, and attackers can manipulate getTVL to implement deposit attacks. Secondly, since the calculation of LP does not use scaling, because there is a precision error in the division, the cost for the attacker to implement the attack is very low.
Proof of Concept
Let me give you an example with specific numbers:
Tools Used
Manual review
Recommended Mitigation Steps
Assessed type
ERC4626