Open howlbot-integration[bot] opened 6 months ago
alcueca marked the issue as not a duplicate
alcueca marked the issue as duplicate of #383
alcueca marked the issue as satisfactory
alcueca changed the severity to QA (Quality Assurance)
alcueca marked the issue as grade-b
Lines of code
https://github.com/code-423n4/2024-04-renzo/blob/1c7cc4e632564349b204b4b5e5f494c9b0bc631d/contracts/Deposits/DepositQueue.sol#L254-L277 https://github.com/code-423n4/2024-04-renzo/blob/1c7cc4e632564349b204b4b5e5f494c9b0bc631d/contracts/RestakeManager.sol#L352
Vulnerability details
Impact
unfair lower TVL calculation for users that submits withdraw request before a
sweepERC20
function calledProof of Concept
in
restakeManager::calculateTVL()
the function calculates adds only the native balance ofDepositQueue
to total TVL but doesn't account for the ERC20 tokens held there as rewards that will be swept usingdepositQueue::sweepERC20
this will harm users that will submit withdrawals before the sweep is called giving them lower amount redeemed due to lower TVL miscalculatedTools Used
manual review
Recommended Mitigation Steps
account for erc20 tokens held in
DepositQueue
when calculatingrestakeManager::calculateTVL()
Assessed type
Other