getTwap()
function is not implemented correctly which leads to getTwap()
function always reverting.
In the getTwap()
function,
When the above block of code is executed, the loop will never end as neither timestamp
nor t.endTimestamp
is updated in the block. Thus, if timestamp > t.endTimestamp
is reached and while loop
is executed once, the while loop will continue to loop until roundId
reverts due to underflow
or the whole getTwap()
function throws out-of-gas error.
Any function using getTwap()
function of LibChainlinkOracle.sol
will revert and cause DOS.
Manual Analysis
Update the while block
of getTwap()
function such that:
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.