getTokenPrice()
will return an incorrect price because it checks for lookback wrongly.
getTokenPrice()
calculates a token price with the option of using a TWA lookback.
But it gets a raw price for a positive lookback and uses a twap for 0 lookback. So it will return a wrong price with any lookback.
The protocol will use an incorrect token price when it calculates with a chainlink price feed.
Manual Review
We should fix like this.
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.