OpenOraclePriceCoordinator
Per-question adapter to the portfolio universe’s shared REP/ETH feed. It exposes reporting and canonical price reads without staging capital operations. OpenOraclePriceCoordinator source contract
Read surface
priceFeed and sharedPriceFeed identify the shared universe feed. It owns accepted price, freshness and report candidates. lastSettlementTimestamp records settlement eligibility, not delayed execution time. isPriceValid checks the accepted price and canonical priceValidUntil; pending or rejected reports do not extend expiry. pendingReportId and pendingReportSponsor identify the latest candidate, without blocking independent candidates. Reports use separate escrows. reportDelegate implements authenticated shared report creation. securityPool is bound once by the coordinator factory. Capital operations execute directly against an accepted price; there is no operation queue. Additional validated getters: lastPrice, pendingReportMaxSettlementBaseFeeAttoEthPerGas, minimumToken1ReportAttoEth, getRequestPriceCostAttoEth, getSettlementCallbackGasLimit, reputationToken, openOracle, weth, gasConsumedOpenOracleReportPrice, gasConsumedSettlement, gasUnitsForOneDispute, initialReportPriorityFeeAttoEthPerGas, targetPriceErrorForDispute, openOracleSecurityMultiplierBps, settlementTime, disputeDelay, protocolFee, feePercentage, multiplier, timeType, trackDisputes, protocolFeeRecipient, escalationHaltMultiplierBps, maxSettlementBaseFeeMultiplierBps, minLiquidationPriceDistanceBps.
Security assumptions
Report liveness depends on A16 timely inclusion, A17 corrector capability, A18 independent correction incentive, A19 observable correctable price, and A06 lifecycle executors. When lastPrice is zero, the official client currently needs an offchain market quote to propose the first report; quote availability is a client limitation rather than a protocol security assumption. Proposals copied from a nonzero cached price do not use that quote path.
State-changing interactions
Each call lists its parameter names in ABI order. The contract index defines the columns.
| Transaction | Caller | Main prerequisites | State or asset effect | Primary signals |
|---|---|---|---|---|
requestPrice(proposedRepPerEthPrice, requestedInitialAttoWeth, bountyAttoEth) with report funding |
Anyone; shared candidates may coexist and renew before the accepted price expires | Nonzero proposed REP-per-ETH price, a bounty of at least 101 attoETH covered by msg.value, and sufficient WETH/REP funding and approvals for the shared feed’s live exposure and inventory bounds. Zero requested WETH uses the computed minimum. Funding is isolated in a new report escrow; the caller must accept any excess-ETH refund. | Opens and atomically funds a fresh WETH/REP report without staging a new operation, retains the whole committed bounty as the settler reward, then refunds any ETH above the bounty through a low-level caller callback. Callback rejection rolls back the report and initial position. | PriceRequested and ReportFundingAssigned from the shared feed. |
recoverSettledPendingReport() |
Anyone | A pending report ID exists and its stored OpenOracle storedGame(reportId).settlementTimestamp is nonzero. |
Recovers the feed’s latest settled candidate without accepting its price. Use feed.recoverReport(reportId) for another unprocessed settled candidate. Recovery marks only that candidate rejected and returns its isolated escrow credits to its original sponsor. | PendingReportRecovered from the shared feed. |
setSharedPriceFeed(feed) |
Deployment worker only | No prior shared feed or ledger; nonzero feed with matching REP, WETH, and OpenOracle. | Binds the shared report source once, before the question ledger is assigned. | SharedPriceFeedSet |
syncExposure() |
Anyone; pool accounting checkpoints also invoke it | A shared coordinator must already be registered by its canonical factory. | Reads the live portfolio aggregate, max(standing commitments, funded demand), and emits a checkpoint if it changed. Question finality does not independently clear this shared exposure. | Feed ExposureCheckpoint when the portfolio aggregate changes |
setSecurityPool(securityPool) |
The coordinator’s deployer only; production binding passes through the authenticated factory and deployment-worker chain | Current securityPool is zero (Security pool already set); the argument itself is not required to be nonzero. |
A nonzero value binds the pool permanently. A zero value emits SecurityPoolSet with zero but leaves the setter callable by its deployer. SecurityPoolFactory supplies the nonzero canonical pool immediately after deploying the pool. A prepared coordinator cannot be claimed by another caller between transactions. |
SecurityPoolSet |