The NegRiskOperator is a permissioned controller for interacting with the NegRiskAdapter. The NegRiskOperator serves as the creator and maintainer for Polymarket's neg risk markets and questions.
The admin may flag individual questions, which will prevent them from resolving normally. Additionally, flagged questions may be emergency resolved manually by the admin, after a one hour delay.
Sets the immutable value of the NegRiskAdapter.
address _nrAdapter
Set the value of the oracle resolution source for all neg risk markets. Reverts if already set to a non-zero value.
address _oracle
Proxies the NegRisk prepareMarket
function. The result is that the NegRiskOperator is the creator of the market, and has the ability to prepare and resolve questions for the market.
uint256 _feeBips
bytes _data
Proxies the NegRisk prepareQuestion
function.
RequestIds are provided which link an oracle request to the specific question. For NegRisk questions, requestIds always differ from questionIds, and the request must be made specifically before the question is prepared.
If the requestId has already been used for some question, the function will revert.
bytes32 _marketId
bytes _data
bytes32 _requestId
Resolves a question on the NegRiskAdapter once the oracle has reported the outcome via reportPayouts
.
There is a one hour delay period which must elapse between the call to reportPayouts
and the call to resolveQuestion
. This serves as a safety period in case there is a manipulation of the oracle.
Receives the result of a question from the oracle. The oracle is expected to respond with a length two array of uint256s, [1,0]
if yes, [0,1]
if no. No other payouts are considered valid.
bytes32 _requestId
uint256[] calldata _payouts