Submitted by shw, also found by gpersoon
The averagePriceForPeriod function of LibPrices does not handle the case where j equals 0 (i.e., no trades happened in the last 24 hours). The transaction reverts due to dividing by 0 without a proper error message returned.
Recommend adding require(j > 0, "...") before line 73 to handle this special case.
raymogg (Tracer) confirmed
