Open howlbot-integration[bot] opened 6 months ago
CloudEllie marked the issue as duplicate of #381
alcueca marked the issue as not a duplicate
alcueca marked the issue as duplicate of #381
alcueca marked the issue as satisfactory
alcueca changed the severity to QA (Quality Assurance)
Lines of code
https://github.com/code-423n4/2024-04-renzo/blob/519e518f2d8dec9acf6482b84a181e403070d22d/contracts/Deposits/DepositQueue.sol#L252-L277 https://github.com/code-423n4/2024-04-renzo/blob/519e518f2d8dec9acf6482b84a181e403070d22d/contracts/RestakeManager.sol#L286-L287 https://github.com/code-423n4/2024-04-renzo/blob/519e518f2d8dec9acf6482b84a181e403070d22d/contracts/RestakeManager.sol#L351-L355
Vulnerability details
Impact
calculateTVLs()
fails to account for erc20 tokens inDepositQueue
contract leading to incorrect TVL calculation.This will lead to an incorrect check in
deposit()
and TVL limit will not actually hold, since a lower value is being returned than the actual value.Proof of Concept
Total value of each erc20 tokens in withdrawQueue contract was included in tvl calculation
value of ETH in withdrawQueue was also included in tvl total
Now, tvl total included ETH in
depositQueue
But failed to include
depositQueue
erc20 tokens value to the total TVL. However, it is possible that there are erc20 tokens present in thedepositQueue
waiting to be swept by an admin.Tools Used
Manual review
Recommended Mitigation Steps
Include erc20 tokens value present in
depositQueue
contract the way it was done forwithdrawQueue
Assessed type
Context