While calculating the twap price in terms of ether division before multiplication is used which will result in the loss of precision.This seems to be intended but this can cause a small impact on the price of the USD in terms of ETH.
See summary
Small amount of USD will be lost while converting the value in ETH denominations.
for example if the price of 1 ETH = 1902991929. the if we do the maths
1902991929 / 1000000 = 1902 * 1e18 = 1902e18
Here we have a small loss of .9 USD.
manual
Use multiplication before division.
In this case the simple fix will be
uint256 twapPriceInEther = (twapPrice * 1 ether) / Constants.DECIMAL_USDC;
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.