The calculateMultiplierAndSetWeightsFromRule() function doesn't update lastPoolUpdateRun timestamp, allowing attackers to sandwich rule-based weight updates with performUpdate() calls.
Attack flow:
Monitor mempool for rule-based weight calculations
Buy tokens that will appreciate after weight changes
After rule weight update completes, Prices spike and attacker call performUpdate() which succeeds since lastPoolUpdateRun wasn't updated
Sell tokens at better prices in same transaction
Financial loss through MEV sandwich attacks
Manipulation of rule-based weight calculations
Bypass of updateInterval protection for rule updates
Manual review
Add timestamp update in calculateMultiplierAndSetWeightsFromRule():
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.