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

Name
Type
Description

_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

Name
Type
Description

_0

uint256

The CL validator count

getCLValidatorTotalBalance

Get CL validator total balance

Returns

Name
Type
Description

_0

uint256

The CL Validator total balance

getCurrentEpochId

Retrieve the current epoch id based on block timestamp

Returns

Name
Type
Description

_0

uint256

The current epoch id

getCurrentFrame

Retrieve the current frame details

Returns

Name
Type
Description

_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

Retrieve expected epoch id

Returns

Name
Type
Description

_0

uint256

The current expected epoch id

getFrameFirstEpochId

Retrieve the first epoch id of the frame of the provided epoch id

Parameters

Name
Type
Description

_epochId

uint256

Epoch id used to get the frame

Returns

Name
Type
Description

_0

uint256

The first epoch id of the frame containing the given epoch id

getLastCompletedEpochId

Retrieve the last completed epoch id

Returns

Name
Type
Description

_0

uint256

The last completed epoch id

getLastConsensusLayerReport

Retrieve the last consensus layer report

Returns

Name
Type
Description

_0

IOracleManagerV1.StoredConsensusLayerReport

The stored consensus layer report

getOracle

Get oracle address

Returns

Name
Type
Description

_0

address

The oracle address

getReportBounds

Retrieve the report bounds

Returns

Name
Type
Description

_0

ReportBounds.ReportBoundsStruct

The report bounds

getTime

Retrieve the block timestamp

Returns

Name
Type
Description

_0

uint256

The current timestamp from the EVM context

isValidEpoch

Verifies if the provided epoch is valid

Parameters

Name
Type
Description

epoch

uint256

The epoch to lookup

Returns

Name
Type
Description

_0

bool

True if valid

setCLSpec

Parameters

Name
Type
Description

_newValue

CLSpec.CLSpecStruct

undefined

setConsensusLayerData

Parameters

Name
Type
Description

_report

IOracleManagerV1.ConsensusLayerReport

undefined

setOracle

Set the oracle address

Parameters

Name
Type
Description

_oracleAddress

address

Address of the oracle

setReportBounds

Parameters

Name
Type
Description

_newValue

ReportBounds.ReportBoundsStruct

undefined

Events

ConsensusLayerDataUpdate

The consensus layer data provided by the oracle has been updated

Parameters

Name
Type
Description

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

The provided report has been processed

Parameters

Name
Type
Description

report

IOracleManagerV1.ConsensusLayerReport

The report that was provided

trace

IOracleManagerV1.ConsensusLayerDataReportingTrace

The trace structure providing more insights on internals

SetBounds

The Report Bounds are changed

Parameters

Name
Type
Description

annualAprUpperBound

uint256

The reporting upper bound

relativeLowerBound

uint256

The reporting lower bound

SetOracle

The stored oracle address changed

Parameters

Name
Type
Description

oracleAddress indexed

address

The new oracle address

SetSpec

The Consensus Layer Spec is changed

Parameters

Name
Type
Description

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

The total exited balance decreased

Parameters

Name
Type
Description

currentValidatorsExitedBalance

uint256

The current exited balance

newValidatorsExitedBalance

uint256

The new exited balance

InvalidDecreasingValidatorsSkimmedBalance

The total skimmed balance decreased

Parameters

Name
Type
Description

currentValidatorsSkimmedBalance

uint256

The current exited balance

newValidatorsSkimmedBalance

uint256

The new exited balance

InvalidEpoch

Thrown when an invalid epoch was reported

Parameters

Name
Type
Description

epoch

uint256

Invalid epoch

InvalidValidatorCountReport

The reported validator count is invalid

Parameters

Name
Type
Description

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

The balance decrease is higher than the maximum allowed by the lower bound

Parameters

Name
Type
Description

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

The balance increase is higher than the maximum allowed by the upper bound

Parameters

Name
Type
Description

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