Submitted by LessDupes, also found by adam-idarrha, araj, zigtur, jokr, SBSecurity, fyamf, 0xCiphky, Tendency, p0wd3r, bigtone, maxim371, NentoR, kennedy1030, mussucal, 0xnightfall, FastChecker, baz1ka, aman, 0xAadi, 0xhacksmithh, 0rpse, and KupiaSec
The function OperatorDelegator.getTokenBalanceFromStrategy() is used by the RestakeManager to calculate the protocol TVL, which in turn is used to calculate the amount of ezETH to mint against a given value in collateral tokens.
This function, however, incorrectly checks for the queued amount of address(this) instead of address(token); therefore, consistently failing to consider collaterals in the withdrawal process for calculation:
Within this code, queuedShares[address(this)] will always return 0; therefore, missing the opportunity to count the contribution of queuedShares[address(token)].
Any amount of collateral in the OperatorDelegator withdrawal process will not be counted for TVL calculation. This causes the TVL to be low, so more ezETH will be minted for the same amount of collateral, unfairly favoring people who mint ezETH during an OperatorDelegator withdrawal, penalizing holders, and those who initiate a RestakeManager withdraw.
The following PoC in Foundry shows how the issue can lead to a decrease in TVL. The PoC can be run in Foundry by using the setup and mock infra provided here.
Foundry
Consider changing the address used for the mapping lookup:
jatinj615 (Renzo) confirmed
Renzo mitigated
Status: Mitigation confirmed. Full details in reports from 0xCiphky, grearlake, Fassi_Security, Bauchibred, and LessDupes.
