The FeeConversionKeeper contract contains a fixed-size array allocation vulnerability that can cause denial of service when processing markets with more than 10 assets.
In the checkUpkeep
function, the contract pre-allocates arrays with a fixed size assumption:
Line 75-76.
Code editor here doesn't like to show the full code:
Which assumes each market has at most 10 assets and is dangerous because there's no enforcement of this limit in the market creation process, the index variable can exceed array bounds if a market has >10 assets, and when the array bounds are exceeded, the entire upkeep operation fails.
I've rated this as MEDIUM because it can prevent fee conversion for markets when triggered, but it doesn't result in direct fund loss and there are potential workarounds like manual fee conversion. But
Add a constant maximum assets limit:
This ensures the limitation is enforced at all levels, preventing the DOS condition entirely.
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.