Contract Relationships
Read Functions
getForward
getForwardByTenor
getForwardPrice
OracleStale if the price exceeds maxForwardAge.
getFixingPrice
isOracleValid
latestForwardRoundId
getActiveFixingTimestamps
Pair Registry
| Function | Returns |
|---|---|
getPairPriceId(pairId) | Pyth price feed ID |
getPairPriceExpo(pairId) | Pyth price exponent (e.g., -5) |
isPairEnabled(pairId) | Whether pair is enabled |
getAllPairs() | All registered pair IDs |
getPairCount() | Number of registered pairs |
getPairAt(index) | Pair ID by index |
Safeguard Views
| Function | Returns |
|---|---|
getLastForwardPublishTime(pairId) | Timestamp of last forward publish |
getLastAcceptedForwardPrice(pairId, fixingTimestamp) | Last accepted forward price |
Write Functions
publishForwardRound
PUBLISHER_ROLE. Subject to M2 safeguard checks.
| Name | Type | Description |
|---|---|---|
pairId | bytes32 | Currency pair identifier |
fixingTimestamp | uint64 | Maturity timestamp |
price | int256 | Forward price (18 decimal precision) |
roundId | uint64 | Sequential round identifier |
M2 safeguard checks reject updates that violate spacing (
minForwardUpdateSpacing), exceed move limits (maxOracleMovePerUpdateBps), or deviate too far from the prior forward (maxDeviationVsPriorBps) or last close price (maxDeviationVsLastCloseBps). See Oracle Safeguards.publishForwardRounds
recordFixingPriceFromPyth
| Name | Type | Description |
|---|---|---|
pairId | bytes32 | Currency pair identifier |
fixingTimestamp | uint64 | Matured fixing timestamp |
pythUpdateData | bytes[] | Signed Pyth price data from Hermes API |
clearForwardRound
clearMaturedForwards
Admin Functions
registerPair
disablePair
adminSetFixingPrice
clearAllForwards
Events
| Event | When Emitted |
|---|---|
PairRegistered | New currency pair registered |
PairDisabled | Currency pair disabled |
ForwardRoundPublished | Forward price published by publisher |
ForwardRoundCleared | Forward round storage cleared |
FixingPriceRecorded | Fixing price recorded from Pyth |
OracleInvalidated | Oracle marked invalid |
OracleSafeguardConfigUpdated | Safeguard configuration changed |
Related Pages
Oracle Pricing
Forward price formula and interest rate parity.
Oracle Safeguards
M2 safeguard checks and thresholds.
Publisher Operations
Running the forward price publisher service.