Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/assets/css/docsShell.css
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ body.docs-shell-page:has(.docs-search[open]) {
color: var(--docs-shell-muted);
font-size: 0.86rem;
line-height: 1.35;
overflow-wrap: anywhere;
text-decoration: none;
}

Expand Down
2 changes: 1 addition & 1 deletion docs/assets/js/docsSearchData.js

Large diffs are not rendered by default.

13 changes: 12 additions & 1 deletion docs/data/open-oracle-coordinator.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@
"preconditions": ["stale-cache", "pending-report", "msg.sender == pendingReportSponsor"],
"outcomes": ["StagedOperationQueued", "operation joins the pending settlement list or remains active according to the bounded batch rules", "pending report remains pending"]
},
{
"trigger": "stageAndRequestOperationBounty",
"preconditions": ["caller is the configured operation bounty board", "no bounty operation is already being staged", "the bounty operator is the pending report sponsor when a report exists"],
"outcomes": ["StagedOperationQueued", "the operation records its bounty id", "fresh-cache execution reports success or failure to the bounty board", "stale-cache execution attaches to the pending callback batch or remains active according to the bounded batch rules"]
},
{
"trigger": "openOracleCallback",
"preconditions": ["pending-report"],
Expand All @@ -60,14 +65,15 @@
"outcomes": ["ExecutedStagedOperation failure", "operation is consumed without requiring a valid price", "delegated-liquidation reservation is released"]
}
],
"events": ["SecurityPoolSet", "RepEthPriceSet", "PriceRequested", "PriceReported", "PriceReportRejected", "PendingReportRecovered", "LiquidationRouteStaged", "StagedOperationQueued", "ExecutedStagedOperation", "CoordinatorStateCheckpoint"],
"events": ["SecurityPoolSet", "OperationBountyBoardSet", "RepEthPriceSet", "PriceRequested", "PriceReported", "PriceReportRejected", "PendingReportRecovered", "LiquidationRouteStaged", "StagedOperationQueued", "ExecutedStagedOperation", "CoordinatorStateCheckpoint"],
"checkpointReasons": { "0": "SecurityPoolSetup", "1": "PriceSeeded", "2": "PriceRequested", "3": "PriceReported", "4": "PriceRejected", "5": "PendingReportRecovered", "6": "OperationQueued", "7": "OperationExecuted" },
"enumValues": {
"OperationType": { "0": "Liquidation", "1": "WithdrawRep" },
"CoordinatorCheckpointReason": { "0": "SecurityPoolSetup", "1": "PriceSeeded", "2": "PriceRequested", "3": "PriceReported", "4": "PriceRejected", "5": "PendingReportRecovered", "6": "OperationQueued", "7": "OperationExecuted" }
},
"eventDeclarations": {
"SecurityPoolSet": "SecurityPoolSet(address indexed securityPool)",
"OperationBountyBoardSet": "OperationBountyBoardSet(address indexed operationBountyBoard)",
"RepEthPriceSet": "RepEthPriceSet(uint256 price)",
"PriceRequested": "PriceRequested(uint256 indexed reportId, uint256 pendingReportMaxSettlementBaseFeeAttoEthPerGas)",
"PriceReportRejected": "PriceReportRejected(uint256 indexed reportId, string reason, uint256 pendingReportId, uint256 pendingReportMaxSettlementBaseFeeAttoEthPerGas, uint256 lastPrice, uint256 lastSettlementTimestamp)",
Expand Down Expand Up @@ -114,6 +120,7 @@
"openOracle": "view",
"openOracleCallback": "nonpayable",
"openOracleSecurityMultiplierBps": "view",
"operationBountyBoard": "view",
"pendingOperationSlotId": "view",
"liquidationApprovalRegistry": "view",
"pendingReportId": "view",
Expand All @@ -129,8 +136,10 @@
"securityPool": "view",
"setRepEthPrice": "nonpayable",
"setLiquidationApprovalRegistry": "nonpayable",
"setOperationBountyBoard": "nonpayable",
"setSecurityPool": "nonpayable",
"settlementTime": "view",
"stageAndRequestOperationBounty": "payable",
"stagedOperationCounter": "view",
"stagedOperations": "view",
"targetPriceErrorForDispute": "view",
Expand All @@ -150,8 +159,10 @@
"requestPriceIfNeededAndStageOperation": "requestPriceIfNeededAndStageOperation(uint8,address,uint256,uint256,uint256,uint256)",
"requestPriceIfNeededAndStageLiquidation": "requestPriceIfNeededAndStageLiquidation(address,address,uint256,bytes32,uint256,uint256,uint256)",
"setLiquidationApprovalRegistry": "setLiquidationApprovalRegistry(address)",
"setOperationBountyBoard": "setOperationBountyBoard(address)",
"setRepEthPrice": "setRepEthPrice(uint256)",
"setSecurityPool": "setSecurityPool(address)",
"stageAndRequestOperationBounty": "stageAndRequestOperationBounty(uint256,address,address,uint8,address,uint256,uint256,uint256,uint256)",
"stagedOperations": "stagedOperations(uint256)"
},
"functionSignatureNote": "The functions map is the complete ABI name-to-mutability inventory. Signatures are listed for parameterized and tuple-returning entry points; zero-input and scalar getters use their Solidity names directly.",
Expand Down
6 changes: 3 additions & 3 deletions docs/mainnet-deployment-addresses.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
{
"id": "deploymentStatusOracle",
"label": "Deployment Status Oracle",
"address": "0x6bBD9e11C3Ef13dad9D556d1f8bf3726DaE76f79"
"address": "0xb36Ac9fCf3C1552426f601415a477aBe20d587a2"
},
{
"id": "multicall3",
Expand Down Expand Up @@ -68,7 +68,7 @@
{
"id": "priceOracleManagerAndOperatorQueuerFactory",
"label": "OpenOracle Price Coordinator Factory",
"address": "0xd8A1b5ed8E0f7c4D5c05a2D6714be6894B764091"
"address": "0xaac5cE13B13f27864671b1B3b39169C23b1aEE41"
},
{
"id": "securityPoolForker",
Expand All @@ -88,7 +88,7 @@
{
"id": "securityPoolFactory",
"label": "Security Pool Factory",
"address": "0xC2bfaaF003dA832edDb3f0945D7FcdF47De4F5a6"
"address": "0x46Ae334a0d48F6929e98f3Ee0603a2953ff21D98"
}
],
"derivedContracts": [
Expand Down
89 changes: 86 additions & 3 deletions docs/reference/contracts.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ <h1>Contract interactions</h1>
<li><a href="#escalationgame">EscalationGame</a></li>
<li><a href="#liquidationapprovalregistry">LiquidationApprovalRegistry</a></li>
<li><a href="#openoraclepricecoordinator">OpenOraclePriceCoordinator</a></li>
<li><a href="#openoracleoperationbountyboard">OpenOracleOperationBountyBoard</a></li>
<li><a href="#sharetoken">ShareToken</a></li>
<li><a href="#uniformpricedualcapbatchauction">UniformPriceDualCapBatchAuction</a></li>
</ul>
Expand Down Expand Up @@ -769,11 +770,11 @@ <h2 id="liquidationapprovalregistry">LiquidationApprovalRegistry</h2>
</table>
<h2 id="openoraclepricecoordinator">OpenOraclePriceCoordinator</h2>
<p>Obtains a fresh REP-per-ETH price and coordinates withdrawals, delegated liquidation routing, approval reservations, and terminal cleanup. <a href="../../solidity/contracts/peripherals/OpenOraclePriceCoordinator.sol">Source</a></p>
<p>Read surface: Configuration getters are <code>MAX_PENDING_SETTLEMENT_OPERATIONS</code>, <code>OPEN_INTEREST_DIVIDER</code>, <code>reputationToken</code>, <code>securityPool</code>, <code>openOracle</code>, <code>weth</code>, <code>liquidationApprovalRegistry</code>, <code>gasConsumedOpenOracleReportPrice</code>, <code>gasConsumedSettlement</code>, <code>gasUnitsForOneDispute</code>, <code>initialReportPriorityFeeAttoEthPerGas</code>, <code>targetPriceErrorForDispute</code>, <code>openOracleSecurityMultiplierBps</code>, <code>settlementTime</code>, <code>disputeDelay</code>, <code>protocolFee</code>, <code>feePercentage</code>, <code>multiplier</code>, <code>timeType</code>, <code>trackDisputes</code>, <code>protocolFeeRecipient</code>, <code>escalationHaltMultiplierBps</code>, <code>maxSettlementBaseFeeMultiplierBps</code>, and <code>minLiquidationPriceDistanceBps</code>. Current report and operation getters are <code>pendingReportId</code>, <code>pendingReportSponsor</code>, <code>pendingOperationSlotId</code>, <code>lastSettlementTimestamp</code>, <code>lastPrice</code>, <code>pendingReportMaxSettlementBaseFeeAttoEthPerGas</code>, <code>stagedOperationCounter</code>, and <code>stagedOperations</code>. Use <code>isPriceValid</code>, <code>minimumToken1ReportAttoEth</code>, <code>getRequestPriceCostAttoEth</code>, <code>getQueuedOperationCostAttoEth</code>, <code>getSettlementCallbackGasLimit</code>, <code>getPendingOperationSlot</code>, <code>getActiveStagedOperationCount</code>, <code>getActiveStagedOperations</code>, <code>getPendingSettlementOperationCount</code>, and <code>getPendingSettlementOperationIds</code> for derived or paged state.</p>
<p>Read surface: Configuration getters are <code>MAX_PENDING_SETTLEMENT_OPERATIONS</code>, <code>OPEN_INTEREST_DIVIDER</code>, <code>reputationToken</code>, <code>securityPool</code>, <code>openOracle</code>, <code>weth</code>, <code>liquidationApprovalRegistry</code>, <code>operationBountyBoard</code>, <code>gasConsumedOpenOracleReportPrice</code>, <code>gasConsumedSettlement</code>, <code>gasUnitsForOneDispute</code>, <code>initialReportPriorityFeeAttoEthPerGas</code>, <code>targetPriceErrorForDispute</code>, <code>openOracleSecurityMultiplierBps</code>, <code>settlementTime</code>, <code>disputeDelay</code>, <code>protocolFee</code>, <code>feePercentage</code>, <code>multiplier</code>, <code>timeType</code>, <code>trackDisputes</code>, <code>protocolFeeRecipient</code>, <code>escalationHaltMultiplierBps</code>, <code>maxSettlementBaseFeeMultiplierBps</code>, and <code>minLiquidationPriceDistanceBps</code>. Current report and operation getters are <code>pendingReportId</code>, <code>pendingReportSponsor</code>, <code>pendingOperationSlotId</code>, <code>lastSettlementTimestamp</code>, <code>lastPrice</code>, <code>pendingReportMaxSettlementBaseFeeAttoEthPerGas</code>, <code>stagedOperationCounter</code>, and <code>stagedOperations</code>. Use <code>isPriceValid</code>, <code>minimumToken1ReportAttoEth</code>, <code>getRequestPriceCostAttoEth</code>, <code>getQueuedOperationCostAttoEth</code>, <code>getSettlementCallbackGasLimit</code>, <code>getPendingOperationSlot</code>, <code>getActiveStagedOperationCount</code>, <code>getActiveStagedOperations</code>, <code>getPendingSettlementOperationCount</code>, and <code>getPendingSettlementOperationIds</code> for derived or paged state.</p>

<p>Report and staged-operation liveness depends on <a href="./security-model.html#assumption-a16">A16 timely inclusion</a>, <a href="./security-model.html#assumption-a17">A17 corrector capability</a>, <a href="./security-model.html#assumption-a18">A18 independent correction incentive</a>, <a href="./security-model.html#assumption-a19">A19 observable correctable price</a>, and <a href="./security-model.html#assumption-a06">A06 lifecycle executors</a>. When <code>lastPrice</code> 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.</p>
<!-- Validated read ABI fingerprint: 288a73d13de5a0f593226105eb11eb177bf085ac2ee708a31645c3d7c4eb7237 -->
<!-- Validated complete compiled ABI fingerprint: 60cd10890a685efe179e17e93a783c660542bd6368f86fed87f46de03695b243 -->
<!-- Validated read ABI fingerprint: 41f3d91e7c93867012ef0372c603c6305208524cf8df9149073c23b9f1bd43cc -->
<!-- Validated complete compiled ABI fingerprint: 037b3c515414b5930e0e8484041e3933b44b55a3c46ddd4acbbf3eb183ad4bd2 -->
<table>
<thead>
<tr>
Expand Down Expand Up @@ -806,6 +807,13 @@ <h2 id="openoraclepricecoordinator">OpenOraclePriceCoordinator</h2>
<td>Opens and atomically funds a fresh WETH/REP report without staging a new operation, then refunds any positive excess ETH through a low-level caller callback. Callback rejection rolls back the report and initial position.</td>
<td><code>PriceRequested</code> and <code>CoordinatorStateCheckpoint</code></td>
</tr>
<tr>
<td><code>stageAndRequestOperationBounty(bountyId, sponsor, creator, operation, targetVault, ...)</code></td>
<td>The coordinator’s configured <code>operationBountyBoard</code> only</td>
<td>No nested bounty staging call is active; the creator and target satisfy the normal operation route; and a stale price has room in the four-operation pending settlement batch.</td>
<td>Stages a self-receiving creator operation while assigning initial-report token funding, report sponsorship, and unused ETH refunds to the accepting operator. The operation result is returned to the board before the coordinator emits its execution event.</td>
<td><code>StagedOperationQueued</code>, possibly <code>PriceRequested</code>, then <code>ExecutedStagedOperation</code>; authoritative <code>CoordinatorStateCheckpoint</code> records</td>
</tr>
<tr>
<td><code>executeStagedOperation(operationId)</code></td>
<td>Anyone</td>
Expand Down Expand Up @@ -834,6 +842,13 @@ <h2 id="openoraclepricecoordinator">OpenOraclePriceCoordinator</h2>
<td>A valid settlement updates the price and auto-executes the bounded pending batch. A terminally rejected settlement consumes the pending batch and releases every liquidation reservation.</td>
<td><code>PriceReported</code> or <code>PriceReportRejected</code>; operation execution events; authoritative <code>CoordinatorStateCheckpoint</code> records</td>
</tr>
<tr>
<td><code>setOperationBountyBoard(board)</code></td>
<td>Coordinator deployment factory only</td>
<td>Board has deployed code and no board was previously installed.</td>
<td>Binds the coordinator-local operation bounty board once.</td>
<td><code>OperationBountyBoardSet</code></td>
</tr>
<tr>
<td><code>setLiquidationApprovalRegistry(registry)</code></td>
<td>Coordinator deployment factory only</td>
Expand All @@ -857,6 +872,74 @@ <h2 id="openoraclepricecoordinator">OpenOraclePriceCoordinator</h2>
</tr>
</tbody>
</table>
<h2 id="openoracleoperationbountyboard">OpenOracleOperationBountyBoard</h2>
<p>Escrows REP or WETH rewards for creator-defined coordinator operations and pays the operator only after successful staged execution. <a href="../../solidity/contracts/peripherals/OpenOracleOperationBountyBoard.sol">Source</a></p>
<p>Read surface: Use <code>coordinator</code>, <code>reputationToken</code>, and <code>weth</code> to identify the bound coordinator and token contracts. <code>nextOperationBountyId</code>, <code>operationBounties</code>, and <code>operationExecutionStatuses</code> expose bounty identity, escrow terms, assignment, staged operation and report IDs, terminal state, and execution outcome. <code>getOperationBounties</code> pages forward from an explicit ID. The co-located deployment factory exposes its immutable <code>owner</code> and shared <code>implementation</code>.</p>

<!-- Validated read ABI fingerprint: b4c41228128077b7670e924c6f3952cfd00a5b10fc12533316cdb7f5e684c601 -->
<!-- Validated complete compiled ABI fingerprint: 46b37ce4b96591befccadb0f39f90495131153c75924d48fd58686fb3282215a -->
<table>
<thead>
<tr>
<th>Transaction</th>
<th>Caller</th>
<th>Main prerequisites</th>
<th>State or asset effect</th>
<th>Primary signals</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>initialize(coordinator, reputationToken, weth)</code></td>
<td>Anyone while uninitialized; the canonical factory initializes new clones atomically</td>
<td>The proxy is not initialized and every supplied address is nonzero. The shared implementation is constructor-locked against initialization.</td>
<td>Binds the proxy to its coordinator and token pair and starts bounty IDs at one.</td>
<td>No event; the factory completes initialization before returning the proxy.</td>
</tr>
<tr>
<td><code>postOperationBounty(operation, targetVault, amount, validForSeconds, rewardToken, rewardAmount, acceptanceDeadline, minimumInitialAttoWeth, maximumInitialAttoWeth)</code></td>
<td>Any creator with sufficient REP or WETH allowance and balance</td>
<td><code>amount</code> is positive attoREP for a withdrawal or positive maximum requested debt in attoETH for a liquidation. The reward is positive coordinator REP or WETH; its token amount uses that token's 18-decimal base unit. The acceptance deadline is strictly in the future; execution validity is from 1 second through 5 minutes. A zero <code>maximumInitialAttoWeth</code> means no maximum; otherwise the minimum cannot exceed it. Withdrawals target the creator and liquidations target another vault.</td>
<td>Creates an open bounty and escrows the full reward on the board.</td>
<td><code>OperationBountyPosted</code></td>
</tr>
<tr>
<td><code>acceptOperationBounty(bountyId, proposedRepPerEthPrice, requestedInitialAttoWeth)</code> with report funding when stale</td>
<td>Any operator at or before the acceptance deadline</td>
<td>Bounty is open; its initial WETH bounds admit the new or existing report; the settlement batch has room; and an existing pending report is sponsored by this operator.</td>
<td>Assigns the bounty, stages its operation, and either executes against a fresh price or attaches to a pending report. When a report must be opened, the operator supplies its REP, WETH, and ETH funding and becomes the report sponsor.</td>
<td><code>OperationBountyAccepted</code>; coordinator staging and reporting events</td>
</tr>
<tr>
<td><code>claimOperationBounty(bountyId)</code></td>
<td>Assigned operator only</td>
<td>Bounty remains assigned and its recorded execution status is succeeded.</td>
<td>Marks the bounty paid and transfers its escrowed reward to the operator.</td>
<td><code>OperationBountyClaimed</code></td>
</tr>
<tr>
<td><code>refundOperationBounty(bountyId)</code></td>
<td>Bounty creator only</td>
<td>Bounty is open, has failed, or remains assigned and pending strictly after <code>queuedAt + settlementTime + validForSeconds</code>; equality is still active. That fixed cancellation deadline does not move when disputes extend report settlement. Successful execution cannot be refunded.</td>
<td>Cancels an open bounty immediately, refunds a failed bounty, or expires an overdue staged operation before refunding its full escrow.</td>
<td><code>OperationBountyRefunded</code>; overdue assigned bounties also produce <code>ExecutedStagedOperation</code></td>
</tr>
<tr>
<td><code>recordOperationResult(bountyId, success)</code></td>
<td>Bound <code>OpenOraclePriceCoordinator</code> only</td>
<td>Bounty remains assigned.</td>
<td>Records the assigned bounty as succeeded or failed so its escrow can be claimed or refunded.</td>
<td>The coordinator emits <code>ExecutedStagedOperation</code> with the same result and any failure detail.</td>
</tr>
<tr>
<td><code>deploy(coordinator, reputationToken, weth, salt)</code></td>
<td>Owning price-coordinator factory only</td>
<td>Caller equals the factory <code>owner</code>; the derived CREATE2 address is unused.</td>
<td>Lazily deploys one shared board implementation, then deterministically deploys and initializes a minimal proxy for the coordinator and token pair.</td>
<td>No dedicated event; the coordinator subsequently emits <code>OperationBountyBoardSet</code>.</td>
</tr>
</tbody>
</table>
<h2 id="sharetoken">ShareToken</h2>
<p>Stores universe-aware ERC-1155 outcome shares and materializes a holder's persistent source entitlement in selected fork branches. <a href="../../solidity/contracts/peripherals/tokens/ShareToken.sol">Source</a></p>
<p>Read surface: Base and relationship getters are <code>name</code>, <code>symbol</code>, <code>zoltar</code>, <code>canonicalPoolByUniverse</code>, <code>_balances</code>, <code>_supplies</code>, and <code>_operatorApprovals</code>. Standard ERC-1155 reads are <code>supportsInterface</code>, <code>balanceOf</code>, <code>totalSupply</code>, <code>balanceOfBatch</code>, and <code>isApprovedForAll</code>; protocol-specific reads are <code>isAuthorized</code>, <code>totalSupplyForOutcome</code>, <code>maximumOutcomeSupply</code>, <code>balanceOfOutcome</code>, <code>balanceOfShares</code>, <code>getMigratedShareAmountAttoShares</code>, <code>getTokenId</code>, <code>getTokenIds</code>, and <code>unpackTokenId</code>.</p>
Expand Down
Loading