All AMMs have to be past nextFundingTime to update
The funding settlement routine reverts whenever any single AMM is not yet past its next funding time, so one AMM that is not ready blocks updates for every other AMM. An attacker or ordinary timing could therefore stall funding settlement across all markets until the slowest AMM's timer elapses.
Submitted by 0xliumin
settleFunding calls will revert until all AMMs are ready to be updated.
Proof of Concept
AMM 1 has a nextFundingTime of now. AMM 2 has a nextFundingTime in 30 minutes. AMM 1 won’t be able to be updated until after AMM 2’s nextFundingTime elapses.
Recommended Mitigation Steps
You shouldn’t revert at the place mentioned in the links to affected code. Just return so that the other AMMs can still get updated.
atvanguard (Hubble) confirmed and resolved
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the settlement loop reverts on a not-yet-due AMM instead of skipping it, so a single unready AMM aborts the whole batch.
Impact
Funding updates for ready AMMs are blocked until every other AMM's funding time has passed, which could delay settlement across all markets.
What the attacker needed
Multiple AMMs with differing funding times
The fix
The report recommends not reverting in that case but returning instead, so the other AMMs can still be updated; the project confirmed and resolved it.
How it was found
- Have one AMM whose next funding time has arrived.
- Have another AMM whose next funding time is still in the future.
- Call the funding settlement routine and observe it reverting.
- Note that the first AMM cannot be updated until the second AMM's time passes.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Each trading market (an AMM) has a timer saying when its funding can next be recalculated. The code that updates funding loops over all markets and stops with an error if even one market's timer has not run out. That means one market that is not ready freezes the update for all the others.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.