Kiln
Consensus Layer Deposit Manager (v1)
This contract handles the interactions with the official deposit contract, funding all validatorsWhenever a deposit to the consensus layer is requested, this contract computed the amount of keysthat could be deposited depending on the amount available in the contract. It then tries to retrievevalidator keys by calling its internal virtual method _getNextValidators. This method should beoverridden by the implementing contract to provide [0; _keyCount] keys when invoked.
Size of a deposit in ETH
Name | Type | Description |
---|---|---|
Size of a BLS Public key in bytes
Name | Type | Description |
---|---|---|
Size of a BLS Signature in bytes
Deposits current balance to the Consensus Layer by batches of 32 ETH
Returns the amount of ETH not yet committed for deposit
Returns the amount of ETH committed for deposit
Get the deposited validator count (the count of deposits made by the contract)
Retrieve the withdrawal credentials
The stored deposit contract address changed
Emitted when the deposited validator count is updated
The stored withdrawal credentials changed
An error occured during the deposit
The length of the BLS Public key is invalid during deposit
The length of the BLS Signature is invalid during deposit
The received count of public keys to deposit is invalid
The received count of signatures to deposit is invalid
The withdrawal credentials value is null
The internal key retrieval returned no keys
Not enough funds to deposit one validator
The slice is outside of the initial bytes bounds
The length overflows an uint
Kiln
User Deposit Manager (v1)
This contract handles the inbound transfers cases or the explicit submissions
Explicit deposit method to mint on msg.sender
Explicit deposit method to mint on msg.sender and transfer to _recipient
Name | Type | Description |
---|
User deposited ETH in the system
And empty deposit attempt was made
The call was invalid
The address is zero
Kiln
Oracle Manager (v1)
This contract handles the inputs provided by the oracleThe Oracle contract is plugged to this contract and is in charge of pushingdata whenever a new report has been deemed valid. The report consists in twovalues: the sum of all balances of all deposited validators and the count ofvalidators that have been activated on the consensus layer.
Get CL validator count (the amount of validator reported by the oracles)
Name | Type | Description |
---|
Get CL validator total balance
Name | Type | Description |
---|
Get oracle address
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.
Set the oracle address
The consensus layer data provided by the oracle has been updated
The stored oracle address changed
The reported validator count is invalid
The address is zero
The operator is unauthorized for the caller
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
_0
uint256
undefined
_0
uint256
undefined
_0
uint256
undefined
_maxCount
uint256
The maximum amount of validator keys to fund
_0
uint256
The amount of ETH not yet committed for deposit
_0
uint256
The amount of ETH committed for deposit
_0
uint256
The deposited validator count
_0
bytes32
The withdrawal credentials
depositContract indexed
address
Address of the deposit contract
oldDepositedValidatorCount
uint256
The old deposited validator count value
newDepositedValidatorCount
uint256
The new deposited validator count value
withdrawalCredentials
bytes32
The withdrawal credentials to use for deposits
depositor | address | Address performing the deposit |
recipient | address | Address receiving the minted shares |
amount | uint256 | Amount in ETH deposited |
_0 | address | The oracle address |
_validatorCount | uint256 | The number of active validators on the consensus layer |
_validatorTotalBalance | uint256 | The balance sum of the active validators on the consensus layer |
_roundId | bytes32 | An identifier for this update |
_maxIncrease | uint256 | The maximum allowed increase in the total balance |
_oracleAddress | address | Address of the oracle |
validatorCount | uint256 | undefined |
validatorTotalBalance | uint256 | undefined |
roundId | bytes32 | undefined |
oracleAddress | address | undefined |
providedValidatorCount | uint256 | The received validator count value |
depositedValidatorCount | uint256 | The number of deposits performed by the system |
caller | address | Address performing the call |
_recipient | address | Address receiving the minted LsETH |
_0 | uint256 | The CL validator count |
_0 | uint256 | The CL Validator total balance |
Kiln
Shares Manager (v1)
This contract handles the shares of the depositor and the ERC20 interface
Retrieve the allowance value for a spender
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Approves an account for future spendings
An approved account can use transferFrom to transfer funds on behalf of the token owner
Retrieve the balance of an account
Retrieve the underlying asset balance of an account
Retrieve the decimal count
Decrease allowance to another account
Increase allowance to another account
Retrieve the token name
Retrieve the shares count from an underlying asset amount
Retrieve the token symbol
Retrieve the total token supply
Retrieve the total underlying asset supply
Performs a transfer from the message sender to the provided account
Performs a transfer between two recipients
Retrieve the underlying asset balance from an amount of shares
Allowance too low to perform operation
Balance too low to perform operation
The address is zero
Invalid empty transfer
Invalid transfer recipients
Alluvial
ERC20VestableVotesUpgradeableV1
This is an ERC20 extension that- can be used as source of vote power (inherited from OpenZeppelin ERC20VotesUpgradeable)- can delegate vote power from an account to another account (inherited from OpenZeppelin ERC20VotesUpgradeable)- can manage token vestings: ownership is progressively transferred to a beneficiary according to a vesting schedule- keeps a history (checkpoints) of each account's vote power@notice Notes from OpenZeppelin - vote power can be delegated either by calling the {delegate} function, or by providing a signature to be used with {delegateBySig}- keeps a history (checkpoints) of each account's vote power- power can be queried through the public accessors {getVotes} and {getPastVotes}.- by default, token balance does not account for voting power. This makes transfers cheaper. The downside is that itrequires users to delegate to themselves in order to activate checkpoints and have their voting power tracked.@notice Notes about token vesting- any token holder can call the method {createVestingSchedule} in order to transfer tokens to a beneficiary according to a vesting schedule. Whencreating a vesting schedule, tokens are transferred to an escrow that holds the token while the vesting progresses. Voting power of the escrowed token is delegated to thebeneficiary or a delegatee account set by the vesting schedule creator- the schedule beneficiary call {releaseVestingSchedule} to get vested tokens transferred from escrow- the schedule creator can revoke a revocable schedule by calling {revokeVestingSchedule} in which case the non-vested tokens are transfered from the escrow back to the creator- the schedule beneficiary can delegate escrow voting power to any account by calling {delegateVestingEscrow}@notice Vesting schedule attributes are- start : start time of the vesting period- cliff duration: duration before which first tokens gets ownable- total duration: duration of the entire vesting (sum of all vesting period durations)- period duration: duration of a single period of vesting- lock duration: duration before tokens gets unlocked. can exceed the duration of the vesting chedule- amount: amount of tokens granted by the vesting schedule- beneficiary: beneficiary of tokens after they are releaseVestingScheduled- revocable: whether the schedule can be revoked@notice Vesting schedule- if currentTime < cliff: vestedToken = 0- if cliff <= currentTime < end: vestedToken = (vestedPeriodCount(currentTime) * periodDuration * amount) / totalDuration- if end < currentTime: vestedToken = amount@notice Remark: After cliff new tokens get vested at the end of each period@notice Vested token & lock period- a vested token is a token that will be eventually releasable from the escrow to the beneficiary once the lock period is over- lock period prevents beneficiary from releasing vested tokens before the lock period ends. Vested tokenswill eventually be releasable once the lock period is over@notice Example: Joe gets a vesting starting on Jan 1st 2022 with duration of 1 year and a lock period of 2 years.On Jan 1st 2023, Joe will have all tokens vested but can not yet release it due to the lock period.On Jan 1st 2024, lock period is over and Joe can release all tokens.
See {IERC20Permit-DOMAIN_SEPARATOR}.
Name | Type | Description |
---|
See {IERC20-allowance}.
Name | Type | Description |
---|
See {IERC20-approve}. NOTE: If amount
is the maximum uint256
, the allowance is not updated on transferFrom
. This is semantically equivalent to an infinite approval. Requirements: - spender
cannot be the zero address.
See {IERC20-balanceOf}.
Get the pos
-th checkpoint for account
.
Computes the releasable amount of tokens for a vesting schedule.
Computes the vested amount of tokens for a vesting schedule.
Creates a new vesting scheduleThere may delay between the time a user should start vesting tokens and the time the vesting schedule is actually created on the contract.Typically a user joins the Liquid Collective but some weeks pass before the user gets all legal agreements in place and signed for thetoken grant emission to happen. In this case, the vesting schedule created for the token grant would start on the join date which is in the past.
As vesting schedules can be created in the past, this means that you should be careful when creating a vesting schedule and what duration parametersyou use as this contract would allow creating a vesting schedule in the past and even a vesting schedule that has already ended.
Returns the number of decimals used to get its user representation. For example, if decimals
equals 2
, a balance of 505
tokens should be displayed to a user as 5.05
(505 / 10 ** 2
). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for display purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.
Atomically decreases the allowance granted to spender
by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - spender
cannot be the zero address. - spender
must have allowance for the caller of at least subtractedValue
.
Delegate votes from the sender to delegatee
.
Delegates votes from signer to delegatee
Delegate vesting escrowed tokens
Get the address account
is currently delegating to.
Retrieve the totalSupply
at the end of blockNumber
. Note, this value is the sum of all balances. It is but NOT the sum of all the delegated votes! Requirements: - blockNumber
must have been already mined
Retrieve the number of votes for account
at the end of blockNumber
. Requirements: - blockNumber
must have been already mined
Get vesting schedule
The vesting schedule structure represents a static configuration used to compute the desiredvesting details of a beneficiary at all times. The values won't change even after tokens are released.The only dynamic field of the structure is end, and is updated whenever a vesting schedule is revoked
Get count of vesting schedules
Gets the current votes balance for account
Atomically increases the allowance granted to spender
by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - spender
cannot be the zero address.
Get vesting global unlock schedule activation status for a vesting schedule
Returns the name of the token.
See {IERC20Permit-nonces}.
Get number of checkpoints for account
.
See {IERC20Permit-permit}.
Release vesting scheduleWhen tokens are released from the escrow, the delegated address of the escrow will see its voting power decrease.The beneficiary has to make sure its delegation parameters are set properly to be able to use/delegate the voting power of its balance.
Revoke vesting schedule
Returns the symbol of the token, usually a shorter version of the name.
See {IERC20-totalSupply}.
See {IERC20-transfer}. Requirements: - to
cannot be the zero address. - the caller must have a balance of at least amount
.
See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum uint256
. Requirements: - from
and to
cannot be the zero address. - from
must have a balance of at least amount
. - the caller must have allowance for from
's tokens of at least amount
.
Get the address of the escrow for a vesting schedule
Emitted when the allowance of a spender
for an owner
is set by a call to {approve}. value
is the new allowance.
A new vesting schedule has been created
Emitted when an account changes their delegate.
Emitted when a token transfer or delegate change results in changes to a delegate's number of votes.
Vesting escrow has been delegated
Triggered when the contract has been initialized or reinitialized.
Vesting schedule has been released
Vesting schedule has been revoked
Emitted when value
tokens are moved from one account (from
) to another (to
). Note that value
may be zero.
Underflow in global unlock logic (should never happen)
Attempt to revoke a vesting schedule with an invalid end parameter
Invalid parameter for a vesting schedule
The operator is unauthorized for the caller
Vesting schedule creator has unsufficient balance to create vesting schedule
The vesting schedule is locked
The VestingSchedule was not found
The vesting schedule is not revocable
Attempt to revoke a schedule in the past
No token to release
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
Name | Type | Description |
---|
_owner
address
Address that issued the allowance
_spender
address
Address that received the allowance
_0
uint256
The allowance in shares for a given spender
_spender
address
Address that is allowed to spend the tokens
_value
uint256
The allowed amount in shares, will override previous value
_0
bool
True if success
_owner
address
Address to be checked
_0
uint256
The balance of the account in shares
_owner
address
Address to be checked
_0
uint256
The underlying balance of the account
_0
uint8
The decimal count
_spender
address
Spender that receives the allowance
_subtractableValue
uint256
Amount of shares to subtract
_0
bool
True if success
_spender
address
Spender that receives the allowance
_additionalValue
uint256
Amount of shares to add
_0
bool
True if success
_0
string
The token name
_underlyingAssetAmount
uint256
Amount of underlying asset to convert
_0
uint256
The amount of shares worth the underlying asset amopunt
_0
string
The token symbol
_0
uint256
The total supply in shares
_0
uint256
The total underlying asset supply
_to
address
Address receiving the tokens
_value
uint256
Amount of shares to be sent
_0
bool
True if success
_from
address
Address sending the tokens
_to
address
Address receiving the tokens
_value
uint256
Amount of shares to be sent
_0
bool
True if success
_shares
uint256
Amount of shares to convert
_0
uint256
The underlying asset balance represented by the shares
owner indexed
address
undefined
spender indexed
address
undefined
value
uint256
undefined
from indexed
address
undefined
to indexed
address
undefined
value
uint256
undefined
_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
_from
address
Account sending the funds in the invalid transfer
_to
address
Account receiving the funds in the invalid transfer
_0 | uint256 | undefined |
spender | address | undefined |
amount | uint256 | undefined |
_0 | bool | undefined |
account | address | undefined |
_0 | uint256 | undefined |
account | address | undefined |
pos | uint32 | undefined |
_0 | ERC20VotesUpgradeable.Checkpoint | undefined |
_index | uint256 | index of the vesting schedule |
_0 | uint256 | amount of releasable tokens |
_index | uint256 | index of the vesting schedule |
_0 | uint256 | amount of vested tokens |
_start | uint64 | start time of the vesting |
_cliffDuration | uint32 | duration to vesting cliff (in seconds) |
_duration | uint32 | total vesting schedule duration after which all tokens are vested (in seconds) |
_periodDuration | uint32 | duration of a period after which new tokens unlock (in seconds) |
_lockDuration | uint32 | duration during which tokens are locked (in seconds) |
_revocable | bool | whether the vesting schedule is revocable or not |
_amount | uint256 | amount of token attributed by the vesting schedule |
_beneficiary | address | address of the beneficiary of the tokens |
_delegatee | address | address to delegate escrow voting power to |
_ignoreGlobalUnlockSchedule | bool | whether the vesting schedule should ignore the global lock |
_0 | uint256 | index of the created vesting schedule |
_0 | uint8 | undefined |
spender | address | undefined |
subtractedValue | uint256 | undefined |
_0 | bool | undefined |
delegatee | address | undefined |
delegatee | address | undefined |
nonce | uint256 | undefined |
expiry | uint256 | undefined |
v | uint8 | undefined |
r | bytes32 | undefined |
s | bytes32 | undefined |
_index | uint256 | index of the vesting schedule |
_delegatee | address | address to delegate the token to |
_0 | bool | True on success |
account | address | undefined |
_0 | address | undefined |
blockNumber | uint256 | undefined |
_0 | uint256 | undefined |
account | address | undefined |
blockNumber | uint256 | undefined |
_0 | uint256 | undefined |
_index | uint256 | Index of the vesting schedule |
_0 | VestingSchedulesV2.VestingSchedule | undefined |
_0 | uint256 | count of vesting schedules |
account | address | undefined |
_0 | uint256 | undefined |
spender | address | undefined |
addedValue | uint256 | undefined |
_0 | bool | undefined |
_index | uint256 | Index of the vesting schedule |
_0 | bool | true if the vesting schedule should ignore the global unlock schedule |
_0 | string | undefined |
owner | address | undefined |
_0 | uint256 | undefined |
account | address | undefined |
_0 | uint32 | undefined |
owner | address | undefined |
spender | address | undefined |
value | uint256 | undefined |
deadline | uint256 | undefined |
v | uint8 | undefined |
r | bytes32 | undefined |
s | bytes32 | undefined |
_index | uint256 | Index of the vesting schedule to release |
_0 | uint256 | released amount |
_index | uint256 | Index of the vesting schedule to revoke |
_end | uint64 | End date for the schedule |
_0 | uint256 | amount returned to the vesting schedule creator |
_0 | string | undefined |
_0 | uint256 | undefined |
to | address | undefined |
amount | uint256 | undefined |
_0 | bool | undefined |
from | address | undefined |
to | address | undefined |
amount | uint256 | undefined |
_0 | bool | undefined |
_index | uint256 | Index of the vesting schedule |
_0 | address | address of the escrow |
owner | address | undefined |
spender | address | undefined |
value | uint256 | undefined |
index | uint256 | Vesting schedule index |
creator | address | Creator of the vesting schedule |
beneficiary | address | Vesting beneficiary address |
amount | uint256 | Vesting schedule amount |
delegator | address | undefined |
fromDelegate | address | undefined |
toDelegate | address | undefined |
delegate | address | undefined |
previousBalance | uint256 | undefined |
newBalance | uint256 | undefined |
index | uint256 | Vesting schedule index |
oldDelegatee | address | old delegatee |
newDelegatee | address | new delegatee |
beneficiary | address | vesting schedule beneficiary |
version | uint8 | undefined |
index | uint256 | Vesting schedule index |
releasedAmount | uint256 | Amount of tokens released to the beneficiary |
index | uint256 | Vesting schedule index |
returnedAmount | uint256 | Amount of tokens returned to the creator |
newEnd | uint256 | New end timestamp after revoke action |
from | address | undefined |
to | address | undefined |
value | uint256 | undefined |
msg | string | undefined |
caller | address | Address performing the call |
index | uint256 | vesting schedule index |
_0 | bytes32 | undefined |
owner | address | undefined |
spender | address | undefined |