IRiverV1

Alluvial Finance Inc.

River Interface (v1)

The main system interface

Methods

allowance

function allowance(address _owner, address _spender) external view returns (uint256)

Retrieve the allowance value for a spender

Parameters

Name
Type
Description

_owner

address

Address that issued the allowance

_spender

address

Address that received the allowance

Returns

Name
Type
Description

_0

uint256

The allowance in shares for a given spender

approve

function approve(address _spender, uint256 _value) external nonpayable returns (bool)

Approves an account for future spendings

An approved account can use transferFrom to transfer funds on behalf of the token owner

Parameters

Name
Type
Description

_spender

address

Address that is allowed to spend the tokens

_value

uint256

The allowed amount in shares, will override previous value

Returns

Name
Type
Description

_0

bool

True if success

balanceOf

Retrieve the balance of an account

Parameters

Name
Type
Description

_owner

address

Address to be checked

Returns

Name
Type
Description

_0

uint256

The balance of the account in shares

balanceOfUnderlying

Retrieve the underlying asset balance of an account

Parameters

Name
Type
Description

_owner

address

Address to be checked

Returns

Name
Type
Description

_0

uint256

The underlying balance of the account

claimRedeemRequests

Claims several redeem requests

Parameters

Name
Type
Description

_redeemRequestIds

uint32[]

The list of redeem requests to claim

_withdrawalEventIds

uint32[]

The list of resolved withdrawal event ids

Returns

Name
Type
Description

claimStatuses

uint8[]

The operation status results

decimals

Retrieve the decimal count

Returns

Name
Type
Description

_0

uint8

The decimal count

decreaseAllowance

Decrease allowance to another account

Parameters

Name
Type
Description

_spender

address

Spender that receives the allowance

_subtractableValue

uint256

Amount of shares to subtract

Returns

Name
Type
Description

_0

bool

True if success

deposit

Explicit deposit method to mint on msg.sender

depositAndTransfer

Explicit deposit method to mint on msg.sender and transfer to _recipient

Parameters

Name
Type
Description

_recipient

address

Address receiving the minted LsETH

depositToConsensusLayerWithDepositRoot

Deposits current balance to the Consensus Layer by batches of 32 ETH

Parameters

Name
Type
Description

_maxCount

uint256

The maximum amount of validator keys to fund

_depositRoot

bytes32

The root of the deposit tree

getAllowlist

Retrieve the allowlist address

Returns

Name
Type
Description

_0

address

The allowlist address

getBalanceToDeposit

Returns the amount of ETH not yet committed for deposit

Returns

Name
Type
Description

_0

uint256

The amount of ETH not yet committed for deposit

getBalanceToRedeem

Retrieve the current balance to redeem

Returns

Name
Type
Description

_0

uint256

The current balance to redeem

getCLSpec

Retrieve the current cl spec

Returns

Name
Type
Description

_0

CLSpec.CLSpecStruct

The Consensus Layer Specification

getCLValidatorCount

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

getCollector

Retrieve the collector address

Returns

Name
Type
Description

_0

address

The collector address

getCommittedBalance

Returns the amount of ETH committed for deposit

Returns

Name
Type
Description

_0

uint256

The amount of ETH committed for deposit

getCoverageFund

Retrieve the coverage fund

Returns

Name
Type
Description

_0

address

The coverage fund address

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

getDailyCommittableLimits

Retrieve the configured daily committable limits

Returns

Name
Type
Description

_0

DailyCommittableLimits.DailyCommittableLimitsStruct

The daily committable limits structure

getDepositedValidatorCount

Get the deposited validator count (the count of deposits made by the contract)

Returns

Name
Type
Description

_0

uint256

The deposited validator count

getELFeeRecipient

Retrieve the execution layer fee recipient

Returns

Name
Type
Description

_0

address

The execution layer fee recipient address

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

getGlobalFee

Get the current global fee

Returns

Name
Type
Description

_0

uint256

The global fee

getKeeper

Get the keeper address

Returns

Name
Type
Description

_0

address

The keeper address

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

getMetadataURI

Retrieve the metadata uri string value

Returns

Name
Type
Description

_0

string

The metadata uri string value

getOperatorsRegistry

Retrieve the operators registry

Returns

Name
Type
Description

_0

address

The operators registry address

getOracle

Get oracle address

Returns

Name
Type
Description

_0

address

The oracle address

getRedeemManager

Retrieve the redeem manager

Returns

Name
Type
Description

_0

address

The redeem manager 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

getWithdrawalCredentials

Retrieve the withdrawal credentials

Returns

Name
Type
Description

_0

bytes32

The withdrawal credentials

increaseAllowance

Increase allowance to another account

Parameters

Name
Type
Description

_spender

address

Spender that receives the allowance

_additionalValue

uint256

Amount of shares to add

Returns

Name
Type
Description

_0

bool

True if success

initRiverV1

Initializes the River system

Parameters

Name
Type
Description

_depositContractAddress

address

Address to make Consensus Layer deposits

_elFeeRecipientAddress

address

Address that receives the execution layer fees

_withdrawalCredentials

bytes32

Credentials to use for every validator deposit

_oracleAddress

address

The address of the Oracle contract

_systemAdministratorAddress

address

Administrator address

_allowlistAddress

address

Address of the allowlist contract

_operatorRegistryAddress

address

Address of the operator registry

_collectorAddress

address

Address receiving the the global fee on revenue

_globalFee

uint256

Amount retained when the ETH balance increases and sent to the collector

initRiverV1_1

Initialized version 1.1 of the River System

Parameters

Name
Type
Description

_redeemManager

address

The redeem manager address

_epochsPerFrame

uint64

The amounts of epochs in a frame

_slotsPerEpoch

uint64

The slots inside an epoch

_secondsPerSlot

uint64

The seconds inside a slot

_genesisTime

uint64

The genesis timestamp

_epochsToAssumedFinality

uint64

The number of epochs before an epoch is considered final on-chain

_annualAprUpperBound

uint256

The reporting upper bound

_relativeLowerBound

uint256

The reporting lower bound

maxDailyNetCommittableAmount

uint128

The net daily committable limit

maxDailyRelativeCommittableAmount

uint128

The relative daily committable limit

initRiverV1_2

Initializes version 1.2 of the River System

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

name

Retrieve the token name

Returns

Name
Type
Description

_0

string

The token name

requestRedeem

Performs a redeem request on the redeem manager

Parameters

Name
Type
Description

_lsETHAmount

uint256

The amount of LsETH to redeem

_recipient

address

The address that will own the redeem request

Returns

Name
Type
Description

redeemRequestId

uint32

The ID of the newly created redeem request

resolveRedeemRequests

Resolves the provided redeem requests by calling the redeem manager

Parameters

Name
Type
Description

_redeemRequestIds

uint32[]

The list of redeem requests to resolve

Returns

Name
Type
Description

withdrawalEventIds

int64[]

The list of matching withdrawal events, or error codes

sendCLFunds

Input for consensus layer funds, containing both exit and skimming

sendCoverageFunds

Input for coverage funds

sendELFees

Input for execution layer fee earnings

sendRedeemManagerExceedingFunds

Input for the redeem manager funds

setAllowlist

Changes the allowlist address

Parameters

Name
Type
Description

_newAllowlist

address

New address for the allowlist

setCLSpec

Parameters

Name
Type
Description

_newValue

CLSpec.CLSpecStruct

undefined

setCollector

Changes the collector address

Parameters

Name
Type
Description

_newCollector

address

New address for the collector

setConsensusLayerData

Parameters

Name
Type
Description

_report

IOracleManagerV1.ConsensusLayerReport

undefined

setCoverageFund

Changes the coverage fund

Parameters

Name
Type
Description

_newCoverageFund

address

New address for the fund

setDailyCommittableLimits

Parameters

Name
Type
Description

_dcl

DailyCommittableLimits.DailyCommittableLimitsStruct

undefined

setELFeeRecipient

Changes the execution layer fee recipient

Parameters

Name
Type
Description

_newELFeeRecipient

address

New address for the recipient

setGlobalFee

Changes the global fee parameter

Parameters

Name
Type
Description

_newFee

uint256

New fee value

setMetadataURI

Sets the metadata uri string value

Parameters

Name
Type
Description

_metadataURI

string

The new metadata uri string value

setOracle

Set the oracle address

Parameters

Name
Type
Description

_oracleAddress

address

Address of the oracle

setReportBounds

Parameters

Name
Type
Description

_newValue

ReportBounds.ReportBoundsStruct

undefined

sharesFromUnderlyingBalance

Retrieve the shares count from an underlying asset amount

Parameters

Name
Type
Description

_underlyingAssetAmount

uint256

Amount of underlying asset to convert

Returns

Name
Type
Description

_0

uint256

The amount of shares worth the underlying asset amount

symbol

Retrieve the token symbol

Returns

Name
Type
Description

_0

string

The token symbol

totalSupply

Retrieve the total token supply

Returns

Name
Type
Description

_0

uint256

The total supply in shares

totalUnderlyingSupply

Retrieve the total underlying asset supply

Returns

Name
Type
Description

_0

uint256

The total underlying asset supply

transfer

Performs a transfer from the message sender to the provided account

Parameters

Name
Type
Description

_to

address

Address receiving the tokens

_value

uint256

Amount of shares to be sent

Returns

Name
Type
Description

_0

bool

True if success

transferFrom

Performs a transfer between two recipients

Parameters

Name
Type
Description

_from

address

Address sending the tokens

_to

address

Address receiving the tokens

_value

uint256

Amount of shares to be sent

Returns

Name
Type
Description

_0

bool

True if success

underlyingBalanceFromShares

Retrieve the underlying asset balance from an amount of shares

Parameters

Name
Type
Description

_shares

uint256

Amount of shares to convert

Returns

Name
Type
Description

_0

uint256

The underlying asset balance represented by the shares

Events

Approval

Emitted when the allowance of a spender for an owner is set by a call to {approve}. value is the new allowance.

Parameters

Name
Type
Description

owner indexed

address

undefined

spender indexed

address

undefined

value

uint256

undefined

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

PulledCLFunds

Emitted when funds are pulled from the CL recipient

Parameters

Name
Type
Description

pulledSkimmedEthAmount

uint256

The amount of skimmed ETH pulled

pullExitedEthAmount

uint256

The amount of exited ETH pulled

PulledCoverageFunds

Funds have been pulled from the Coverage Fund

Parameters

Name
Type
Description

amount

uint256

The amount pulled

PulledELFees

Funds have been pulled from the Execution Layer Fee Recipient

Parameters

Name
Type
Description

amount

uint256

The amount pulled

PulledRedeemManagerExceedingEth

Emitted when funds are pulled from the redeem manager

Parameters

Name
Type
Description

amount

uint256

The amount pulled

ReportedRedeemManager

Emitted when the redeem manager received a withdraw event report

Parameters

Name
Type
Description

redeemManagerDemand

uint256

The total demand in LsETH of the redeem manager

suppliedRedeemManagerDemand

uint256

The amount of LsETH demand actually supplied

suppliedRedeemManagerDemandInEth

uint256

The amount in ETH of the supplied demand

RewardsEarned

The system underlying supply increased. This is a snapshot of the balances for accounting purposes

Parameters

Name
Type
Description

_collector indexed

address

The address of the collector during this event

_oldTotalUnderlyingBalance

uint256

Old total ETH balance under management by River

_oldTotalSupply

uint256

Old total supply in shares

_newTotalUnderlyingBalance

uint256

New total ETH balance under management by River

_newTotalSupply

uint256

New total supply in shares

SetAllowlist

The stored Allowlist has been changed

Parameters

Name
Type
Description

allowlist indexed

address

The new Allowlist

SetBalanceCommittedToDeposit

Emitted when the balance committed to deposit

Parameters

Name
Type
Description

oldAmount

uint256

The old balance committed to deposit

newAmount

uint256

The new balance committed to deposit

SetBalanceToDeposit

Emitted when the balance to deposit is updated

Parameters

Name
Type
Description

oldAmount

uint256

The old balance to deposit

newAmount

uint256

The new balance to deposit

SetBalanceToRedeem

Emitted when the balance to redeem is updated

Parameters

Name
Type
Description

oldAmount

uint256

The old balance to redeem

newAmount

uint256

The new balance to redeem

SetBounds

The Report Bounds are changed

Parameters

Name
Type
Description

annualAprUpperBound

uint256

The reporting upper bound

relativeLowerBound

uint256

The reporting lower bound

SetCollector

The stored Collector has been changed

Parameters

Name
Type
Description

collector indexed

address

The new Collector

SetCoverageFund

The stored Coverage Fund has been changed

Parameters

Name
Type
Description

coverageFund indexed

address

The new Coverage Fund

SetDepositContractAddress

The stored deposit contract address changed

Parameters

Name
Type
Description

depositContract indexed

address

Address of the deposit contract

SetDepositedValidatorCount

Emitted when the deposited validator count is updated

Parameters

Name
Type
Description

oldDepositedValidatorCount

uint256

The old deposited validator count value

newDepositedValidatorCount

uint256

The new deposited validator count value

SetELFeeRecipient

The stored Execution Layer Fee Recipient has been changed

Parameters

Name
Type
Description

elFeeRecipient indexed

address

The new Execution Layer Fee Recipient

SetGlobalFee

The stored Global Fee has been changed

Parameters

Name
Type
Description

fee

uint256

The new Global Fee

SetMaxDailyCommittableAmounts

Emitted when the daily committable limits are changed

Parameters

Name
Type
Description

minNetAmount

uint256

The minimum amount that must be used as the daily committable amount

maxRelativeAmount

uint256

The maximum amount that can be used as the daily committable amount, relative to the total underlying supply

SetMetadataURI

The stored Metadata URI string has been changed

Parameters

Name
Type
Description

metadataURI

string

The new Metadata URI string

SetOperatorsRegistry

The stored Operators Registry has been changed

Parameters

Name
Type
Description

operatorRegistry indexed

address

The new Operators Registry

SetOracle

The stored oracle address changed

Parameters

Name
Type
Description

oracleAddress indexed

address

The new oracle address

SetRedeemManager

Emitted when the redeem manager address is changed

Parameters

Name
Type
Description

redeemManager

address

The address of the redeem manager

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

SetTotalSupply

Emitted when the total supply is changed

Parameters

Name
Type
Description

totalSupply

uint256

undefined

SetWithdrawalCredentials

The stored withdrawal credentials changed

Parameters

Name
Type
Description

withdrawalCredentials

bytes32

The withdrawal credentials to use for deposits

Transfer

Emitted when value tokens are moved from one account (from) to another (to). Note that value may be zero.

Parameters

Name
Type
Description

from indexed

address

undefined

to indexed

address

undefined

value

uint256

undefined

UserDeposit

User deposited ETH in the system

Parameters

Name
Type
Description

depositor indexed

address

Address performing the deposit

recipient indexed

address

Address receiving the minted shares

amount

uint256

Amount in ETH deposited

Errors

AllowanceTooLow

Allowance too low to perform operation

Parameters

Name
Type
Description

_from

address

Account where funds are sent from

_operator

address

Account attempting the transfer

_allowance

uint256

Current allowance

_value

uint256

Requested transfer value in shares

BalanceTooLow

Balance too low to perform operation

Denied

The access was denied

Parameters

Name
Type
Description

account

address

The account that was denied

EmptyDeposit

And empty deposit attempt was made

ErrorOnDeposit

An error occurred during the deposit

InconsistentPublicKeys

The length of the BLS Public key is invalid during deposit

InconsistentSignatures

The length of the BLS Signature is invalid during deposit

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

InvalidDepositRoot

Invalid deposit root

InvalidEpoch

Thrown when an invalid epoch was reported

Parameters

Name
Type
Description

epoch

uint256

Invalid epoch

InvalidPublicKeyCount

The received count of public keys to deposit is invalid

InvalidPulledClFundsAmount

Thrown when the amount received from the Withdraw contract doe not match the requested amount

Parameters

Name
Type
Description

requested

uint256

The amount that was requested

received

uint256

The amount that was received

InvalidSignatureCount

The received count of signatures to deposit is invalid

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

InvalidWithdrawalCredentials

The withdrawal credentials value is null

NoAvailableValidatorKeys

The internal key retrieval returned no keys

NotEnoughFunds

Not enough funds to deposit one validator

NullTransfer

Invalid empty transfer

OnlyKeeper

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

UnauthorizedTransfer

Invalid transfer recipients

Parameters

Name
Type
Description

_from

address

Account sending the funds in the invalid transfer

_to

address

Account receiving the funds in the invalid transfer

ZeroMintedShares

The computed amount of shares to mint is 0

Last updated