In the UpdateWeightRunner.sol
where there's no validation between the number of oracles (_poolSettings.oracles.length
) and the number of tokens during pool initialization. This mismatch will lead to array access violations in weight calculations, causing transaction reverts and effectively creating a Denial of Service (DoS) condition when performing an update for a valid pool
In setRuleForPool()
, oracles are set without validation:
During weight updates, _getData()
gets oracle data based on the oracles that are assigned to the pool, while _performUpdateAndGetData()
gets getNormalizedWeights
based on the Weights of the assets in the pool using the total number of tokens:
within the perform update:
_calculateQuantAMMMovingAverage()
assumes array lengths match:
If oracle count < token count: The loop in _calculateQuantAMMMovingAverage
will attempt to access non-existent array indices in _newData
, causing a revert
If oracle count > token count: Extra oracle data will be ignored but still cause inconsistency
Add validation during pool initialization
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.