Source: src/Oracle.sol
Responsibility
Oracle is the fund’s NAV/price reporting and batch clock. It:
- Defines batches: time windows separated by
nextCutoffTime. Deposit/redeem requests are grouped by batch id, and each batch is priced by exactly one accepted report per asset. - Receives price reports (asset price per share, 1e18-scaled) from an off-chain reporter, holds them as pending through a review window, and flags suspicious prices using configurable safety bounds.
- Releases accepted prices to the Fund during settlement and stores
lastAcceptedPriceper asset.
shares = amount × 1e18 / price — price is the amount of that asset corresponding to one share. The accept functions are onlyFund — reachable only through Fund.acceptReport / Fund.acceptSuspiciousReport. Other admin/reporter functions authorize against the Fund’s access control (spoke pattern).
Batch semantics
currentBatchIdis the batch awaiting a report;getCurrentBatchId()returnscurrentBatchId + 1onceblock.timestamp >= nextCutoffTime, so new requests automatically roll into the next batch while the closed batch is priced.- Accepting a report advances
currentBatchIdand requires a new futurenextCutoffTimein the same call.
Report lifecycle
Timing rules
Price safety
Each check is optional;0 disables it.
A suspicious report is not rejected — it stays pending but can only be consumed via
Fund.acceptSuspiciousReport (a stronger role), or replaced after rejection.
Function reference
Reporter / reviewer
Roles are checked on the Fund.Fund-only
Reached viaFund.acceptReport*.
Admin setters
Roles are checked on the Fund.Views
getCurrentBatchId(), currentBatchId, nextCutoffTime, getReport(asset, batchId), getPendingReport(asset, batchId), lastAcceptedPrice(asset), priceSafety(asset), minAcceptReportDelay, maxAcceptReportDelay, fund().