QuantAMM

QuantAMM
49,600 OP
View results
Submission Details
Severity: low
Invalid

Sandwich Attack on InitialisePoolLastRunTime() Allows Forced Weight Updates and Price Manipulation

Summary

Sandwich attack vulnerability in UpdateWeightRunner::InitialisePoolLastRunTime() allows attackers to MEV profits by calling performUpdate() sandwiched by Swap orders on the pool.

Vulnerability Details

  • Attacker frontrun transaction

  1. Monitor mempool for InitialisePoolLastRunTime() calls

  2. Place buy orders for tokens that will appreciate after if performUpdate() is called immediately, Orders will be in small batches to bypass maxTradeSizeRatio

  3. InitialisePoolLastRunTime() sets lastPoolUpdateRun to past timestamp
    poolRuleSettings[_poolAddress].timingSettings.lastPoolUpdateRun = _time;

  4. Call performUpdate() which now passes timing check:
    block.timestamp - settings.timingSettings.lastPoolUpdateRun >= settings.timingSettings.updateInterval

  5. Execute sell orders to profit from weight-driven price changes

Impact

  • Profits from predictable price movements

  • Undermines pool stability mechanisms

Tools Used

Manual review

Updates

Lead Judging Commences

n0kto Lead Judge 11 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Informational or Gas / Admin is trusted / Pool creation is trusted / User mistake / Suppositions

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.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!