Open GalloDaSballo opened 3 months ago
massUpdatePools looks as follows:
massUpdatePools
function massUpdatePools() public { uint length = pools.length; for (uint n = 0; n < length; n++) { updatePool(pools[n]); } }
Meaning it will iterate over all known pools
The gas limit on SEI is 10MLN gas per block
Assuming around 25k gas per update, that's 400 pools before the function reverts
I just did some quick napkin math on the amount of storage slots used, you should write a test to verify the limit as to avoid getting reverts in prod
That said, anything below 100 pools will have a high margin of safety
Ensure you do not surpass 100 pools as to avoid consuming too much gas which could cause reverts
Impact
massUpdatePools
looks as follows:Meaning it will iterate over all known pools
The gas limit on SEI is 10MLN gas per block
Assuming around 25k gas per update, that's 400 pools before the function reverts
I just did some quick napkin math on the amount of storage slots used, you should write a test to verify the limit as to avoid getting reverts in prod
That said, anything below 100 pools will have a high margin of safety
Mitigation
Ensure you do not surpass 100 pools as to avoid consuming too much gas which could cause reverts