DepositQueue
contract hold ERC20 tokens as rewards but not accounted for in TVL in RestakeManager
contract leading to lower TVL calculation compared to true TVL
#378
Labels
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
duplicate-383
grade-b
Q-43
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
🤖_114_group
AI based duplicate group recommendation
satisfactory
satisfies C4 submission criteria; eligible for awards
sufficient quality report
This report is of sufficient quality
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 miscalculated
Tools Used
manual review
Recommended Mitigation Steps
account for erc20 tokens held in
DepositQueue
when calculatingrestakeManager::calculateTVL()
Assessed type
Other
The text was updated successfully, but these errors were encountered: