Contract - LendingPool.sol.
The updateState() function is -
ReserveLibrary.updateReserveState() ->
ReserveLibrary.updateReserveInterests() ->
The problem is that updateReserveInterests is also being called inside deposit(), withdraw() and updateInterestRatesAndLiquidity() functions of LendingPool.sol.
An attacker sees transactions of deposit(), withdraw() or updateInterestRatesAndLiquidity() in mempool.
He will frontrun those txs, by paying extra gas fee calling updateState() -
This will update set lastUpdateTimestamp to current block.timestamp reserve.lastUpdateTimestamp = uint40(block.timestamp); .
Now when the any of transaction deposit(), withdraw() or updateInterestRatesAndLiquidity() will be executed, they will return without performing any operation because timeDelta will be 0 -
Attacker can perform this attack operation everytime, causing unintended behaviors.
Greifing attack for functions deposit(), withdraw() or updateInterestRatesAndLiquidity().
Leading to unexpected behavior, and also potentially can cause loss of funds to both protocol and user.
Manual
Put access modifier on updateState() function, for admin or owner.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.