# Operate openOracle — reporting, disputing, matching, settling

> The five paid roles around openOracle: reporter, disputer and settler in the oracle, matcher and executor in openSwap and openPunt. Earnings, risk, parameter filters and the off-chain work each one needs.

Source: https://www.openoracle.org/build/operate

# OPERATE

The oracle pays people to report, dispute and settle. The applications built on it pay for matching and execution. This page is what each seat earns and what it takes to sit in it.

01 Roles 02 Keepers 03 Disputing 04 Reporting 05 Matching

01 // Roles

## Five paid roles

Three seats in the oracle itself, two in every application built on it. Each one is paid by whoever needs the work done.

Seat Role Layer Earns

01 Reporter Oracle The bounty the application posts for opening the game

02 Disputer Oracle Dispute distance, less fees and gas

03 Settler Oracle settlerReward

04 Matcher openSwap · openPunt Escalating fulfillment fee. On openPunt, a liquidation bonus as well

05 Executor openSwap · openPunt Execution compensation

02 // Keepers

## Settling and executing

No price view, no inventory, no directional risk — a fixed payment for pushing a permissionless state transition.

### SETTLER

Once the latest report has survived for `settlementTime`, anyone can call `settle(reportId, params, helper)`. The contract marks the game settled, credits the current reporter with both amounts, and credits you with `settlerReward` in native ETH.

-   ▸ params and helper must match the current stored state hash
-   ▸ Settlement fires the callback if one is configured
-   ▸ Payouts are credited to internal balances, withdrawn later

### EXECUTOR

On openSwap and openPunt, once the oracle game settles, any caller can finalise the trade with `execute()` and earn the execution compensation the parties posted. Additionally, if a request goes without a match past its expiration, you can earn `matcherGasComp` for cancelling the order.

-   ▸ Reconstruct the preimages the contract verifies against its stored hashes
-   ▸ You are paid on any non-reverting outcome

/01 REPORT

Two limit orders at one implied price, backed by real tokens.

/02 DISPUTE

Take a side, replace both with larger orders at a new price.

/03 SETTLE

The timer expires untouched. The last price stands.

03 // Disputing

## Take the mispriced side, replace larger

If the market has moved, one side of the live report is cheap. Taking it makes you the next reporter at the escalated size, at a price you choose.

### WHAT YOU POST

if currentAmount1 < escalationHalt
    newAmount1 = min(escalationHalt,
                     floor(currentAmount1 \* multiplier / 100))
else
    newAmount1 = currentAmount1 + 1

With flag 64 set and currentAmount1 below the halt, you may escalate by any amount from this minimum up to escalationHalt. At or above the halt it must be exactly currentAmount1 + 1. newAmount2 is your choice and sets the new price.

### WHAT YOU EARN

profit =  dispute distance
        − swap fee
        − protocol fee
        − dispute gas
        − volatility loss
        − worst-case settlement gas cost

Fees are charged on the swapped token's amount in the current report — the smaller-valued side. The swap fee goes to the previous reporter; the protocol fee goes to protocolFeeRecipient. Both are in 1e7 units, so 1000 is 0.01%.

### WHEN YOU CAN ACT

disputable from   reportTimestamp + disputeDelay
disputable until  reportTimestamp + settlementTime   (exclusive)

reportTimestamp comes from the most recent ReportSubmitted or ReportDisputed event for that reportId. Both publish the current live preimage, so for a dispute bot they are equivalent signals.

Price the volatility loss

Once you dispute, you are the standing report — if the ratio drifts, the next disputer takes the cheap side from you. The docs put a reasonable buffer at `0.65 × the standard deviation of settlementTime returns`.

▸ Reference

[Disputing](https://docs.openoracle.org/openoracle/game-guide#disputing) [Oracle Accuracy & Cost](https://docs.openoracle.org/openoracle/oracle-accuracy-cost#cost)

open

![openOracle](data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='Layer_1'%20data-name='Layer%201'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20127.18%2078.46'%3e%3cdefs%3e%3cstyle%3e%20.cls-1%20{%20fill:%20%23ff1d25;%20}%20%3c/style%3e%3c/defs%3e%3cpath%20class='cls-1'%20d='M107.97,29.82c-1.79-2.65-4.52-4.9-8.09-6.67-4.04-2.08-9.16-3.71-15.23-4.83s-12.75-1.69-19.85-1.69c-.4,0-.81.01-1.21.01s-.81-.01-1.21-.01c-7.1,0-13.78.57-19.85,1.69-6.07,1.12-11.2,2.75-15.23,4.83-3.57,1.76-6.29,4.02-8.09,6.67-1.79,2.68-2.72,5.8-2.72,9.28,0,.04,0,.09.01.13-.01.04-.01.09-.01.12,0,3.48.93,6.61,2.72,9.28,1.79,2.66,4.51,4.9,8.09,6.68,4.04,2.06,9.16,3.69,15.23,4.81s12.75,1.69,19.85,1.69c.4,0,.81,0,1.21-.01.4.01.81.01,1.21.01,7.1,0,13.78-.57,19.85-1.69,6.07-1.12,11.2-2.75,15.23-4.83,3.57-1.76,6.29-4.01,8.09-6.67,1.81-2.68,2.72-5.8,2.72-9.28v-.25c0-3.48-.91-6.61-2.72-9.28ZM100.63,45.26c-1.49,1.72-3.77,3.15-6.77,4.28-3.36,1.15-7.79,2.05-13.11,2.66-5.04.58-10.81.91-17.16.94-6.35-.03-12.12-.36-17.15-.94-5.34-.61-9.76-1.51-13.12-2.66-3-1.12-5.28-2.56-6.77-4.28-1.45-1.63-2.17-3.6-2.21-6.02.04-2.42.76-4.41,2.21-6.04,1.49-1.72,3.77-3.15,6.77-4.28,3.36-1.15,7.79-2.05,13.12-2.66,5.02-.58,10.79-.91,17.15-.94,6.35.03,12.12.36,17.16.94,5.32.61,9.75,1.51,13.11,2.66,3,1.12,5.28,2.56,6.77,4.28,1.45,1.63,2.17,3.62,2.21,6.04-.04,2.42-.76,4.39-2.21,6.02Z'/%3e%3cpath%20class='cls-1'%20d='M127.16,38.74c-.05-4.5-1.27-8.52-3.65-11.97-1.7-2.48-4.05-4.71-6.97-6.62-.87-8.01-1.72-8.97-2-9.28-2.14-2.41-5.37-4.44-9.63-6.01h-.02c-4.65-1.55-10.7-2.77-18.01-3.6-6.8-.78-14.65-1.21-23.3-1.26-8.65.04-16.5.48-23.3,1.26-7.31.84-13.36,2.05-18.01,3.6h-.01c-4.26,1.57-7.49,3.6-9.63,6.01-.28.31-1.14,1.27-2,9.28-2.92,1.91-5.26,4.14-6.97,6.62C1.29,30.22.06,34.25.01,38.74h-.01v.97h.01c.04,4.5,1.27,8.52,3.65,11.97,1.7,2.48,4.05,4.71,6.97,6.62.87,8.01,1.72,8.97,2,9.28,2.14,2.41,5.37,4.44,9.63,6.01h.01c4.65,1.55,10.7,2.77,18.01,3.6,6.8.78,14.65,1.21,23.3,1.26,8.65-.04,16.5-.48,23.3-1.26,7.31-.84,13.36-2.05,18.01-3.6h.02c4.26-1.57,7.49-3.6,9.63-6.01.28-.31,1.14-1.27,2-9.28,2.92-1.91,5.26-4.14,6.97-6.62,2.38-3.45,3.6-7.47,3.65-11.97h.01v-.97h-.01ZM115.62,57.76c-1.06.67-2.21,1.32-3.42,1.91-5.38,2.72-12.23,4.84-20.36,6.32-8.15,1.48-17.12,2.23-26.68,2.23h-3.14c-9.57,0-18.54-.75-26.68-2.23-8.13-1.48-14.98-3.6-20.34-6.32-1.23-.6-2.38-1.24-3.42-1.91V20.7c1.05-.67,2.2-1.32,3.41-1.91,5.38-2.72,12.23-4.84,20.36-6.32,8.15-1.48,17.12-2.23,26.68-2.23h3.14c9.57,0,18.54.75,26.68,2.23,8.13,1.48,14.98,3.6,20.34,6.32,1.23.6,2.38,1.24,3.44,1.91v37.06Z'/%3e%3c/svg%3e)

![openOracle](data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='Layer_1'%20data-name='Layer%201'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20478.5%20295.21'%3e%3cdefs%3e%3cstyle%3e%20.cls-1%20{%20fill:%20%230c0c0d;%20}%20%3c/style%3e%3c/defs%3e%3cpath%20class='cls-1'%20d='M406.23,112.2c-6.75-9.95-16.99-18.45-30.43-25.08-15.19-7.82-34.48-13.95-57.31-18.17-22.83-4.22-47.98-6.36-74.69-6.36-1.52,0-3.04.06-4.55.06s-3.04-.06-4.56-.06c-26.71,0-51.85,2.14-74.69,6.36-22.83,4.22-42.12,10.35-57.31,18.17-13.44,6.64-23.68,15.13-30.43,25.08-6.75,10.07-10.23,21.82-10.23,34.93,0,.17,0,.34.06.51-.06.17-.06.34-.06.45,0,13.1,3.49,24.86,10.23,34.93,6.75,10.01,16.98,18.45,30.43,25.14,15.18,7.76,34.48,13.89,57.31,18.11,22.83,4.22,47.97,6.36,74.69,6.36,1.52,0,3.04,0,4.56-.06,1.52.06,3.04.06,4.55.06,26.71,0,51.86-2.14,74.69-6.36,22.83-4.22,42.12-10.35,57.31-18.17,13.44-6.64,23.68-15.07,30.43-25.08,6.8-10.07,10.23-21.82,10.23-34.93v-.96c0-13.1-3.43-24.86-10.23-34.93ZM378.61,170.3c-5.62,6.47-14.17,11.87-25.48,16.09-12.65,4.33-29.3,7.7-49.32,10.01-18.95,2.19-40.66,3.43-64.57,3.54-23.9-.11-45.61-1.35-64.51-3.54-20.08-2.31-36.73-5.68-49.38-10.01-11.3-4.22-19.85-9.62-25.48-16.09-5.46-6.13-8.15-13.55-8.32-22.66.17-9.11,2.87-16.59,8.32-22.72,5.62-6.47,14.17-11.87,25.48-16.09,12.65-4.33,29.3-7.7,49.38-10.01,18.9-2.19,40.61-3.43,64.51-3.54,23.9.11,45.61,1.35,64.57,3.54,20.02,2.31,36.67,5.68,49.32,10.01,11.31,4.22,19.85,9.62,25.48,16.09,5.45,6.13,8.16,13.61,8.32,22.72-.17,9.11-2.87,16.53-8.32,22.66Z'/%3e%3cpath%20class='cls-1'%20d='M478.44,145.78c-.17-16.93-4.78-32.06-13.72-45.05-6.41-9.34-15.24-17.72-26.21-24.91-3.26-30.15-6.47-33.74-7.54-34.93-8.04-9.06-20.19-16.7-36.22-22.61h-.06c-17.49-5.85-40.27-10.4-67.77-13.55C301.34,1.8,271.81.17,239.25,0c-32.56.17-62.09,1.8-87.68,4.72-27.5,3.15-50.28,7.7-67.77,13.55h-.06c-16.03,5.91-28.18,13.55-36.22,22.61-1.07,1.18-4.27,4.78-7.54,34.93-10.97,7.2-19.8,15.58-26.21,24.91C4.84,113.72.23,128.85.06,145.78h-.06v3.66h.06c.17,16.93,4.78,32.06,13.72,45.05,6.41,9.34,15.24,17.72,26.21,24.91,3.26,30.15,6.47,33.74,7.54,34.93,8.04,9.06,20.19,16.7,36.22,22.61h.06c17.49,5.85,40.27,10.4,67.77,13.55,25.59,2.92,55.12,4.56,87.68,4.72,32.56-.17,62.09-1.8,87.68-4.72,27.5-3.15,50.28-7.71,67.77-13.55h.06c16.03-5.91,28.18-13.55,36.22-22.61,1.07-1.18,4.27-4.78,7.54-34.93,10.97-7.2,19.8-15.58,26.21-24.91,8.94-12.99,13.55-28.12,13.72-45.05h.05v-3.66h-.05ZM435.02,217.32c-3.99,2.53-8.32,4.95-12.88,7.2-20.25,10.24-46,18.22-76.6,23.79-30.65,5.57-64.4,8.38-100.39,8.38h-11.81c-35.99,0-69.74-2.81-100.39-8.38-30.59-5.57-56.35-13.55-76.54-23.79-4.61-2.25-8.94-4.67-12.88-7.2V77.89c3.94-2.53,8.27-4.95,12.82-7.2,20.25-10.24,46-18.22,76.6-23.79,30.65-5.57,64.4-8.38,100.39-8.38h11.81c35.99,0,69.74,2.81,100.39,8.38,30.59,5.57,56.35,13.55,76.54,23.79,4.61,2.25,8.94,4.67,12.93,7.2v139.42Z'/%3e%3c/svg%3e)

![openOracle](data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='Layer_1'%20data-name='Layer%201'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20478.5%20295.21'%3e%3cdefs%3e%3cstyle%3e%20.cls-1%20{%20fill:%20%230c0c0d;%20}%20%3c/style%3e%3c/defs%3e%3cpath%20class='cls-1'%20d='M406.23,112.2c-6.75-9.95-16.99-18.45-30.43-25.08-15.19-7.82-34.48-13.95-57.31-18.17-22.83-4.22-47.98-6.36-74.69-6.36-1.52,0-3.04.06-4.55.06s-3.04-.06-4.56-.06c-26.71,0-51.85,2.14-74.69,6.36-22.83,4.22-42.12,10.35-57.31,18.17-13.44,6.64-23.68,15.13-30.43,25.08-6.75,10.07-10.23,21.82-10.23,34.93,0,.17,0,.34.06.51-.06.17-.06.34-.06.45,0,13.1,3.49,24.86,10.23,34.93,6.75,10.01,16.98,18.45,30.43,25.14,15.18,7.76,34.48,13.89,57.31,18.11,22.83,4.22,47.97,6.36,74.69,6.36,1.52,0,3.04,0,4.56-.06,1.52.06,3.04.06,4.55.06,26.71,0,51.86-2.14,74.69-6.36,22.83-4.22,42.12-10.35,57.31-18.17,13.44-6.64,23.68-15.07,30.43-25.08,6.8-10.07,10.23-21.82,10.23-34.93v-.96c0-13.1-3.43-24.86-10.23-34.93ZM378.61,170.3c-5.62,6.47-14.17,11.87-25.48,16.09-12.65,4.33-29.3,7.7-49.32,10.01-18.95,2.19-40.66,3.43-64.57,3.54-23.9-.11-45.61-1.35-64.51-3.54-20.08-2.31-36.73-5.68-49.38-10.01-11.3-4.22-19.85-9.62-25.48-16.09-5.46-6.13-8.15-13.55-8.32-22.66.17-9.11,2.87-16.59,8.32-22.72,5.62-6.47,14.17-11.87,25.48-16.09,12.65-4.33,29.3-7.7,49.38-10.01,18.9-2.19,40.61-3.43,64.51-3.54,23.9.11,45.61,1.35,64.57,3.54,20.02,2.31,36.67,5.68,49.32,10.01,11.31,4.22,19.85,9.62,25.48,16.09,5.45,6.13,8.16,13.61,8.32,22.72-.17,9.11-2.87,16.53-8.32,22.66Z'/%3e%3cpath%20class='cls-1'%20d='M478.44,145.78c-.17-16.93-4.78-32.06-13.72-45.05-6.41-9.34-15.24-17.72-26.21-24.91-3.26-30.15-6.47-33.74-7.54-34.93-8.04-9.06-20.19-16.7-36.22-22.61h-.06c-17.49-5.85-40.27-10.4-67.77-13.55C301.34,1.8,271.81.17,239.25,0c-32.56.17-62.09,1.8-87.68,4.72-27.5,3.15-50.28,7.7-67.77,13.55h-.06c-16.03,5.91-28.18,13.55-36.22,22.61-1.07,1.18-4.27,4.78-7.54,34.93-10.97,7.2-19.8,15.58-26.21,24.91C4.84,113.72.23,128.85.06,145.78h-.06v3.66h.06c.17,16.93,4.78,32.06,13.72,45.05,6.41,9.34,15.24,17.72,26.21,24.91,3.26,30.15,6.47,33.74,7.54,34.93,8.04,9.06,20.19,16.7,36.22,22.61h.06c17.49,5.85,40.27,10.4,67.77,13.55,25.59,2.92,55.12,4.56,87.68,4.72,32.56-.17,62.09-1.8,87.68-4.72,27.5-3.15,50.28-7.71,67.77-13.55h.06c16.03-5.91,28.18-13.55,36.22-22.61,1.07-1.18,4.27-4.78,7.54-34.93,10.97-7.2,19.8-15.58,26.21-24.91,8.94-12.99,13.55-28.12,13.72-45.05h.05v-3.66h-.05ZM435.02,217.32c-3.99,2.53-8.32,4.95-12.88,7.2-20.25,10.24-46,18.22-76.6,23.79-30.65,5.57-64.4,8.38-100.39,8.38h-11.81c-35.99,0-69.74-2.81-100.39-8.38-30.59-5.57-56.35-13.55-76.54-23.79-4.61-2.25-8.94-4.67-12.88-7.2V77.89c3.94-2.53,8.27-4.95,12.82-7.2,20.25-10.24,46-18.22,76.6-23.79,30.65-5.57,64.4-8.38,100.39-8.38h11.81c35.99,0,69.74,2.81,100.39,8.38,30.59,5.57,56.35,13.55,76.54,23.79,4.61,2.25,8.94,4.67,12.93,7.2v139.42Z'/%3e%3c/svg%3e)

oracle

04 // Reporting

## Opening a game

The initial reporter takes the first two-sided position. That position expects to lose money, which is why it is paid.

### WHAT FUNDS THE REPORT

currentAmount1 of token1
currentAmount2 of token2
settlerReward  in native ETH

If a token is native ETH the external amount comes through msg.value; ERC-20 amounts are pulled from msg.sender unless covered by internal balance. Excess ETH is credited back to currentReporter.

The ratio of the two amounts is the price you are publishing. Pass `reportTimestamp`, `lastReportOppoTime`, `settlementTimestamp` and `numReports` as zero.

### WHAT IT COSTS YOU

expected loss  ≈  0.65 · σ(T) · L + worst-case settlement gas cost

The multiplier does not apply here. The initial position is at size L, not L · M. A swap fee on the order of σ(T) or larger drives this toward zero at the cost of a wider no-dispute band.

Let the market price it

The application posts a bounty that escalates each round until someone reports. The realised payout is the market’s price for opening a game under current conditions.

▸ Reference

[Reporting / creating a game](https://docs.openoracle.org/openoracle/game-guide#reporting--creating-a-game)

05 // Matching

## THE HARDEST SEAT AT THE TABLE

One transaction commits you as the counterparty and as the oracle’s initial reporter. On openSwap that is a swap, on openPunt a leveraged position.

Propose→Match→ExecuteSwapper · you · anyone

What you run

### WHAT YOU BUILD

-   ▸ Decoder for SwapCreated and SwapMatched packed payloads
-   ▸ Working capital in the oracle, with the relevant application approved via approveInternal
-   ▸ Volatility model for the settlement window you filter to
-   ▸ Pricing model for the deal itself, covering the oracle parameters and the openSwap or openPunt terms, so you know when a fulfillment fee is worth taking
-   ▸ Optional dispute capacity for reports tied to swaps you matched

### SAFETY GUARDRAILS

-   ▸ Rate limits, max size, max collateral-at-risk, and drawdown breakers
-   ▸ Shut down if a settled price is far from the true price
-   ▸ Robust pricing. Disputing with poor pricing carries geometric penalties
-   ▸ For leverage trading, take into account news-driven volatility (macroeconomic data, FOMC meetings, etc)

Funding

Funding is internal-balance only

Matching takes no Permit2 or `msg.value` from the matcher. Everything you commit must already sit in your oracle internal balance, with the application approved as a spender.

▸ Reference

[Providing Liquidity](https://docs.openoracle.org/openswap-v2/providing-liquidity#matching-the-swap) [Smart Contract Reference](https://docs.openoracle.org/openoracle/game-guide#reporting--creating-a-game)
