Oracle adapters
Status: specification ready; no Harbor-maintained Chainlink-compatible adapter is deployed yet. Do not point production consumers at a Harbor aggregator as if it were AggregatorV3.
Checked in harbor-price-aggregators: feeds consume AggregatorV3 / Chainlink upstreams to build Harbor latestAnswer(). There is still no outbound Harbor→latestRoundData adapter contract for external protocols.
When eng deploys outbound adapters, addresses land in the table below and in mainnet-v1.json (under a future oracleAdapters key). Until then, call Harbor views directly — see Pricing.
Problem
| Consumer expects | Harbor aggregator provides |
|---|---|
latestRoundData() → (roundId, answer, startedAt, updatedAt, answeredInRound) | latestAnswer() → four uint256s (min/max price, min/max wrapped rate), 18 decimals |
| Often 8-decimal USD answers | 18-decimal Harbor units |
decimals(), description(), version() | baseName(), quoteName(), oracleName(), version() |
External protocols that only speak Chainlink aggregator need a thin adapter. Harbor token ERC-20s also do not document a price() method — wrap minter peggedTokenPrice / leveragedTokenPrice if you need a token-priced feed.
Intended adapter shapes (when engineered)
-
HarborAggregator → AggregatorV3
- Reads
latestAnswer(). - Picks a documented component (e.g. mid underlying price, or price × rate / 1e18).
- Scales to 8 decimals if required.
- Synthesizes round metadata (block timestamp; round id policy TBD by eng).
- Forwards staleness: if Harbor already reverted on heartbeat, the adapter should revert too.
- Reads
-
Minter price → AggregatorV3 or
price()peggedTokenPrice()orleveragedTokenPrice()(18 decimals).- Optional ERC-20
price()wrapper for aggregators that call the token.
Deploy inventory (Ethereum mainnet)
| Adapter | Source | Export | Decimals | Address | Notes |
|---|---|---|---|---|---|
| — | — | — | — | not deployed | Spec only |
Eng checklist when shipping:
- Adapter contract + CREATE3 salt / proxy policy
- Per-market or shared deploy list (fill table above)
- Document which
latestAnswercomponent (or minter price) is exported - Add addresses to docs package +
@harbor/sdkaddress book - Optional: SDK
getChainlinkStylePrice(marketId)helper
Track alongside Price oracles and Pricing.
Until adapters exist
- Call Harbor
latestAnswer()/ minter views directly (this is the supported integration). - Or compose Chainlink feeds yourself using the pair page formula — you then own staleness and rate-provider risk.
