poolUpkeep does not implement the checks-effects-interactions pattern, it is possible to re-enter the function and satisfy the intervalPassed() check again.
Changes
We don't know how much lastPriceTimestamp will increase until PoolCommitter::executeCommitments has finished executing, but we can increment it by updateInterval to prevent a reentrancy because we know that lastPriceTimestamp will increase by at least this amount.
Motivation
poolUpkeep
does not implement the checks-effects-interactions pattern, it is possible to re-enter the function and satisfy the intervalPassed() check again.Changes
lastPriceTimestamp
will increase untilPoolCommitter::executeCommitments
has finished executing, but we can increment it byupdateInterval
to prevent a reentrancy because we know thatlastPriceTimestamp
will increase by at least this amount.