Known Issues Section where the permission required for this attack is documented as in-scope.
The InitialisePoolLastRunTime function in the UpdateWeightRunner contract allows pool owners to set an arbitrary last run time, which can be exploited to cause a denial of service in the weight update mechanism. This can be leveraged to gain unfair advantages by the pool owner where they have total control over when the pool is updated.
In the UpdateWeightRunner contract, the InitialisePoolLastRunTime function allows setting the lastPoolUpdateRun timestamp without validation:
A malicious pool owner can set this value to type(uint40).max or any value greater then block.timestamp, which would cause an underflow in the performUpdate function. This effectively prevents the pool from being updated, as the time delta calculations would fail.
The vulnerability is particularly concerning because:
Pool owners with the ability to set the last run time are considered untrusted according to the scope
The timestamp parameter is not validated
The function can be called multiple times thus the attack can be repeated
The impact extends beyond just weight updates, affecting pool performance and LP positions
DOS and **Reintroduce IL (**Impermanent loss) to the pool which is one of the core problems this protocol is trying to solve.
The vulnerability allows malicious pool owners to:
Prevent weight updates from executing properly
Create windows of opportunity for MEV exploitation
Collect fees earlier than intended through likely LP exits
Manual Review
Add validation checks to prevent malicious timestamp values:
The recommended fix:
Adds reasonable bounds for the timestamp value
Prevents DOS attacks through timestamp manipulation
Maintains the intended functionality for legitimate pool operations
Protects LP interests by ensuring continuous pool updates
Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelyhood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.
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.