IOracleManagerV1
Alluvial Finance Inc.
Oracle Manager (v1)
This interface exposes methods to handle the inputs provided by the oracle
Methods
getCLSpec
function getCLSpec() external view returns (struct CLSpec.CLSpecStruct)
Retrieve the current cl spec
Returns
_0
CLSpec.CLSpecStruct
The Consensus Layer Specification
getCLValidatorCount
function getCLValidatorCount() external view returns (uint256)
Get CL validator count (the amount of validator reported by the oracles)
Returns
_0
uint256
The CL validator count
getCLValidatorTotalBalance
function getCLValidatorTotalBalance() external view returns (uint256)
Get CL validator total balance
Returns
_0
uint256
The CL Validator total balance
getCurrentEpochId
function getCurrentEpochId() external view returns (uint256)
Retrieve the current epoch id based on block timestamp
Returns
_0
uint256
The current epoch id
getCurrentFrame
function getCurrentFrame() external view returns (uint256 _startEpochId, uint256 _startTime, uint256 _endTime)
Retrieve the current frame details
Returns
_startEpochId
uint256
The epoch at the beginning of the frame
_startTime
uint256
The timestamp of the beginning of the frame in seconds
_endTime
uint256
The timestamp of the end of the frame in seconds
getExpectedEpochId
function getExpectedEpochId() external view returns (uint256)
Retrieve expected epoch id
Returns
_0
uint256
The current expected epoch id
getFrameFirstEpochId
function getFrameFirstEpochId(uint256 _epochId) external view returns (uint256)
Retrieve the first epoch id of the frame of the provided epoch id
Parameters
_epochId
uint256
Epoch id used to get the frame
Returns
_0
uint256
The first epoch id of the frame containing the given epoch id
getLastCompletedEpochId
function getLastCompletedEpochId() external view returns (uint256)
Retrieve the last completed epoch id
Returns
_0
uint256
The last completed epoch id
getLastConsensusLayerReport
function getLastConsensusLayerReport() external view returns (struct IOracleManagerV1.StoredConsensusLayerReport)
Retrieve the last consensus layer report
Returns
_0
IOracleManagerV1.StoredConsensusLayerReport
The stored consensus layer report
getOracle
function getOracle() external view returns (address)
Get oracle address
Returns
_0
address
The oracle address
getReportBounds
function getReportBounds() external view returns (struct ReportBounds.ReportBoundsStruct)
Retrieve the report bounds
Returns
_0
ReportBounds.ReportBoundsStruct
The report bounds
getTime
function getTime() external view returns (uint256)
Retrieve the block timestamp
Returns
_0
uint256
The current timestamp from the EVM context
isValidEpoch
function isValidEpoch(uint256 epoch) external view returns (bool)
Verifies if the provided epoch is valid
Parameters
epoch
uint256
The epoch to lookup
Returns
_0
bool
True if valid
setCLSpec
function setCLSpec(CLSpec.CLSpecStruct _newValue) external nonpayable
Parameters
_newValue
CLSpec.CLSpecStruct
undefined
setConsensusLayerData
function setConsensusLayerData(IOracleManagerV1.ConsensusLayerReport _report) external nonpayable
Parameters
_report
IOracleManagerV1.ConsensusLayerReport
undefined
setOracle
function setOracle(address _oracleAddress) external nonpayable
Set the oracle address
Parameters
_oracleAddress
address
Address of the oracle
setReportBounds
function setReportBounds(ReportBounds.ReportBoundsStruct _newValue) external nonpayable
Parameters
_newValue
ReportBounds.ReportBoundsStruct
undefined
Events
ConsensusLayerDataUpdate
event ConsensusLayerDataUpdate(uint256 validatorCount, uint256 validatorTotalBalance, bytes32 roundId)
The consensus layer data provided by the oracle has been updated
Parameters
validatorCount
uint256
The new count of validators running on the consensus layer
validatorTotalBalance
uint256
The new total balance sum of all validators
roundId
bytes32
Round identifier
ProcessedConsensusLayerReport
event ProcessedConsensusLayerReport(IOracleManagerV1.ConsensusLayerReport report, IOracleManagerV1.ConsensusLayerDataReportingTrace trace)
The provided report has been processed
Parameters
report
IOracleManagerV1.ConsensusLayerReport
The report that was provided
trace
IOracleManagerV1.ConsensusLayerDataReportingTrace
The trace structure providing more insights on internals
SetBounds
event SetBounds(uint256 annualAprUpperBound, uint256 relativeLowerBound)
The Report Bounds are changed
Parameters
annualAprUpperBound
uint256
The reporting upper bound
relativeLowerBound
uint256
The reporting lower bound
SetOracle
event SetOracle(address indexed oracleAddress)
The stored oracle address changed
Parameters
oracleAddress indexed
address
The new oracle address
SetSpec
event SetSpec(uint64 epochsPerFrame, uint64 slotsPerEpoch, uint64 secondsPerSlot, uint64 genesisTime, uint64 epochsToAssumedFinality)
The Consensus Layer Spec is changed
Parameters
epochsPerFrame
uint64
The number of epochs inside a frame
slotsPerEpoch
uint64
The number of slots inside an epoch
secondsPerSlot
uint64
The number of seconds inside a slot
genesisTime
uint64
The genesis timestamp
epochsToAssumedFinality
uint64
The number of epochs before an epoch is considered final
Errors
InvalidDecreasingValidatorsExitedBalance
error InvalidDecreasingValidatorsExitedBalance(uint256 currentValidatorsExitedBalance, uint256 newValidatorsExitedBalance)
The total exited balance decreased
Parameters
currentValidatorsExitedBalance
uint256
The current exited balance
newValidatorsExitedBalance
uint256
The new exited balance
InvalidDecreasingValidatorsSkimmedBalance
error InvalidDecreasingValidatorsSkimmedBalance(uint256 currentValidatorsSkimmedBalance, uint256 newValidatorsSkimmedBalance)
The total skimmed balance decreased
Parameters
currentValidatorsSkimmedBalance
uint256
The current exited balance
newValidatorsSkimmedBalance
uint256
The new exited balance
InvalidEpoch
error InvalidEpoch(uint256 epoch)
Thrown when an invalid epoch was reported
Parameters
epoch
uint256
Invalid epoch
InvalidValidatorCountReport
error InvalidValidatorCountReport(uint256 providedValidatorCount, uint256 depositedValidatorCount, uint256 lastReportedValidatorCount)
The reported validator count is invalid
Parameters
providedValidatorCount
uint256
The received validator count value
depositedValidatorCount
uint256
The number of deposits performed by the system
lastReportedValidatorCount
uint256
The last reported validator count
TotalValidatorBalanceDecreaseOutOfBound
error TotalValidatorBalanceDecreaseOutOfBound(uint256 prevTotalEthIncludingExited, uint256 postTotalEthIncludingExited, uint256 timeElapsed, uint256 relativeLowerBound)
The balance decrease is higher than the maximum allowed by the lower bound
Parameters
prevTotalEthIncludingExited
uint256
The previous total balance, including all exited balance
postTotalEthIncludingExited
uint256
The post-report total balance, including all exited balance
timeElapsed
uint256
The time in seconds since last report
relativeLowerBound
uint256
The lower bound value that was used
TotalValidatorBalanceIncreaseOutOfBound
error TotalValidatorBalanceIncreaseOutOfBound(uint256 prevTotalEthIncludingExited, uint256 postTotalEthIncludingExited, uint256 timeElapsed, uint256 annualAprUpperBound)
The balance increase is higher than the maximum allowed by the upper bound
Parameters
prevTotalEthIncludingExited
uint256
The previous total balance, including all exited balance
postTotalEthIncludingExited
uint256
The post-report total balance, including all exited balance
timeElapsed
uint256
The time in seconds since last report
annualAprUpperBound
uint256
The upper bound value that was used
Last updated