RiverV1
Kiln
River (v1)
This contract merges all the manager contracts and implements all the virtual methods stitching all components together.
Operators add BLS Public Keys of validators running in their infrastructure.
User deposits ETH to the system and gets LsTokens minted in exchange.
Upon deposit, the system verifies if the User is allowed to depositby querying the Allowlist.
When the system has enough funds to deposit validators, keys are pulled from the Operators Registry.
The deposit data is computed and the validators are funded via the OfficialDeposit contract.
Oracles report the total balance of the running validators and the total countof running validators.
The running validators propose blocks that reward the EL Fee Recipient. The funds are pulled back in the system.
Methods
DEPOSIT_SIZE
Size of a deposit in ETH
Returns
PUBLIC_KEY_LENGTH
Size of a BLS Public key in bytes
Returns
SIGNATURE_LENGTH
Size of a BLS Signature in bytes
Returns
acceptAdmin
Accept the transfer of ownership
Only callable by the pending admin. Resets the pending admin if succesful.
allowance
Retrieve the allowance value for a spender
Parameters
Returns
approve
Approves an account for future spendings
An approved account can use transferFrom to transfer funds on behalf of the token owner
Parameters
Returns
balanceOf
Retrieve the balance of an account
Parameters
Returns
balanceOfUnderlying
Retrieve the underlying asset balance of an account
Parameters
Returns
decimals
Retrieve the decimal count
Returns
decreaseAllowance
Decrease allowance to another account
Parameters
Returns
deposit
Explicit deposit method to mint on msg.sender
depositAndTransfer
Explicit deposit method to mint on msg.sender and transfer to _recipient
Parameters
depositToConsensusLayer
Deposits current balance to the Consensus Layer by batches of 32 ETH
Parameters
getAdmin
Retrieves the current admin address
Returns
getAllowlist
Retrieve the allowlist address
Returns
getBalanceToDeposit
Returns the amount of pending ETH
Returns
getCLValidatorCount
Get CL validator count (the amount of validator reported by the oracles)
Returns
getCLValidatorTotalBalance
Get CL validator total balance
Returns
getCollector
Retrieve the collector address
Returns
getCoverageFund
Retrieve the coverage fund
Returns
getDepositedValidatorCount
Get the deposited validator count (the count of deposits made by the contract)
Returns
getELFeeRecipient
Retrieve the execution layer fee recipient
Returns
getGlobalFee
Get the current global fee
Returns
getMetadataURI
Retrieve the metadata uri string value
Returns
getOperatorsRegistry
Retrieve the operators registry
Returns
getOracle
Get oracle address
Returns
getPendingAdmin
Retrieve the current pending admin address
Returns
getWithdrawalCredentials
Retrieve the withdrawal credentials
Returns
increaseAllowance
Increase allowance to another account
Parameters
Returns
initRiverV1
Initializes the River system
Parameters
name
Retrieve the token name
Returns
proposeAdmin
Proposes a new address as admin
This security prevents setting an invalid address as an admin. The pendingadmin has to claim its ownership of the contract, and prove that the newaddress is able to perform regular transactions.
Parameters
sendCoverageFunds
Input for coverage funds
sendELFees
Input for execution layer fee earnings
setAllowlist
Changes the allowlist address
Parameters
setCollector
Changes the collector address
Parameters
setConsensusLayerData
Sets the validator count and validator total balance sum reported by the oracle
Can only be called by the oracle addressThe round id is a blackbox value that should only be used to identify unique reportsWhen a report is performed, River computes the amount of fees that can be pulledfrom the execution layer fee recipient. This amount is capped by the max allowedincrease provided during the report.If the total asset balance increases (from the reported total balance and the pulled funds)we then compute the share that must be taken for the collector on the positive delta.The execution layer fees are taken into account here because they are the product ofnode operator's work, just like consensus layer fees, and both should be handled in thesame manner, as a single revenue stream for the users and the collector.
Parameters
setCoverageFund
Changes the coverage fund
Parameters
setELFeeRecipient
Changes the execution layer fee recipient
Parameters
setGlobalFee
Changes the global fee parameter
Parameters
setMetadataURI
Sets the metadata uri string value
Parameters
setOracle
Set the oracle address
Parameters
sharesFromUnderlyingBalance
Retrieve the shares count from an underlying asset amount
Parameters
Returns
symbol
Retrieve the token symbol
Returns
totalSupply
Retrieve the total token supply
Returns
totalUnderlyingSupply
Retrieve the total underlying asset supply
Returns
transfer
Performs a transfer from the message sender to the provided account
Parameters
Returns
transferFrom
Performs a transfer between two recipients
Parameters
Returns
underlyingBalanceFromShares
Retrieve the underlying asset balance from an amount of shares
Parameters
Returns
Events
Approval
Parameters
ConsensusLayerDataUpdate
The consensus layer data provided by the oracle has been updated
Parameters
FundedValidatorKey
A validator key got funded on the deposit contract
Parameters
Initialize
Emitted when the contract is properly initialized
Parameters
PulledCoverageFunds
Funds have been pulled from the Coverage Fund
Parameters
PulledELFees
Funds have been pulled from the Execution Layer Fee Recipient
Parameters
RewardsEarned
The system underlying supply increased. This is a snapshot of the balances for accounting purposes
Parameters
SetAdmin
The admin address changed
Parameters
SetAllowlist
The stored Allowlist has been changed
Parameters
SetCollector
The stored Collector has been changed
Parameters
SetCoverageFund
The stored Coverage Fund has been changed
Parameters
SetDepositContractAddress
The stored deposit contract address changed
Parameters
SetELFeeRecipient
The stored Execution Layer Fee Recipient has been changed
Parameters
SetGlobalFee
The stored Global Fee has been changed
Parameters
SetMetadataURI
The stored Metadata URI string has been changed
Parameters
SetOperatorsRegistry
The stored Operators Registry has been changed
Parameters
SetOracle
The stored oracle address changed
Parameters
SetPendingAdmin
The pending admin address changed
Parameters
SetWithdrawalCredentials
The stored withdrawal credentials changed
Parameters
Transfer
Parameters
UserDeposit
User deposited ETH in the system
Parameters
Errors
AllowanceTooLow
Allowance too low to perform operation
Parameters
BalanceTooLow
Balance too low to perform operation
Denied
The access was denied
Parameters
EmptyDeposit
And empty deposit attempt was made
ErrorOnDeposit
An error occured 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
InvalidArgument
The argument was invalid
InvalidCall
The call was invalid
InvalidEmptyString
The string is empty
InvalidFee
The fee is invalid
InvalidInitialization
An error occured during the initialization
Parameters
InvalidPublicKeyCount
The received count of public keys to deposit is invalid
InvalidSignatureCount
The received count of signatures to deposit is invalid
InvalidValidatorCountReport
The reported validator count is invalid
Parameters
InvalidWithdrawalCredentials
The withdrawal credentials value is null
InvalidZeroAddress
The address is zero
NoAvailableValidatorKeys
The internal key retrieval returned no keys
NotEnoughFunds
Not enough funds to deposit one validator
NullTransfer
Invalid empty transfer
SliceOutOfBounds
The slice is outside of the initial bytes bounds
SliceOverflow
The length overflows an uint
Unauthorized
The operator is unauthorized for the caller
Parameters
UnauthorizedTransfer
Invalid transfer recipients
Parameters
ZeroMintedShares
The computed amount of shares to mint is 0
Last updated