Submitted by shw
The recordTrade function in Pricing updates the currentHour variable by 1 every hour. However, if there is no trade (i.e., the recordTrade is not called) during this hour, the currentHour is out of sync with the actual hour. As a result, the averagePriceForPeriod function uses the prices before 24 hours and causes errors on the average price. See Pricing.sol L90-L94.
Recommend calculating how much time passed (e.g., (block.timestamp - startLastHour) / 3600) to update the currentHour variable correctly.
raymogg (Tracer) confirmed
