Outlier resolution--logic bugs
Note: This issue was independently raised by the Voltage Technologies Ltd. team during
the review period.
Description
The following issues were discovered in the oracle resolution puzzle:
As we explain in section ref↗, the oracle coin stores price data with the oldest price at the head. However, the resolution operation appends the newest price to the head.
prices (if price_to_apply
(c price_to_apply PRICES)
PRICES
)
Additionally, the outcome of the resolution vote is improperly accounted for when determining the price. If, after maturity, the
current_decision_bool
is false, theprice_to_apply
should be empty, but the puzzle is using the price from theOUTLIER_INFO
instead.
Impact
This means that the oracle coin's accounting can be broken if an outlier resolution vote occurs.
Recommendations
The issues discussed above are already fixed by the Circuit DAO team as follows:
They added the new
price_to_apply
at the end of thePRICES
.They added an if condition to correctly set the
price_to_apply
value.
Remediation
This issue has been acknowledged by Voltage Technologies Ltd., and a fix was implemented in commit cef2f579↗.