IStrategyManager
Author: Layr Labs, Inc.
Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service
See the StrategyManager
contract itself for implementation details.
Functions
depositIntoStrategy
Deposits amount
of token
into the specified strategy
, with the resultant shares credited to msg.sender
The msg.sender
must have previously approved this contract to transfer at least amount
of token
on their behalf.
Cannot be called by an address that is 'frozen' (this function will revert if the msg.sender
is frozen). WARNING: Depositing tokens that allow reentrancy (eg. ERC-777) into a strategy is not recommended. This can lead to attack vectors where the token balance and corresponding strategy shares are not in sync upon reentrancy.
Parameters
Name | Type | Description |
---|---|---|
|
| is the specified strategy where deposit is to be made, |
|
| is the denomination in which the deposit is to be made, |
|
| is the amount of token to be deposited in the strategy by the staker |
Returns
Name | Type | Description |
---|---|---|
|
| The amount of new shares in the |
depositIntoStrategyWithSignature
Used for depositing an asset into the specified strategy with the resultant shares credited to staker
, who must sign off on the action. Note that the assets are transferred out/from the msg.sender
, not from the staker
; this function is explicitly designed purely to help one address deposit 'for' another.
The msg.sender
must have previously approved this contract to transfer at least amount
of token
on their behalf.
A signature is required for this function to eliminate the possibility of griefing attacks, specifically those targeting stakers who may be attempting to undelegate.
Cannot be called on behalf of a staker that is 'frozen' (this function will revert if the staker
is frozen). WARNING: Depositing tokens that allow reentrancy (eg. ERC-777) into a strategy is not recommended. This can lead to attack vectors where the token balance and corresponding strategy shares are not in sync upon reentrancy
Parameters
Name | Type | Description |
---|---|---|
|
| is the specified strategy where deposit is to be made, |
|
| is the denomination in which the deposit is to be made, |
|
| is the amount of token to be deposited in the strategy by the staker |
|
| the staker that the deposited assets will be credited to |
|
| the timestamp at which the signature expires |
|
| is a valid signature from the |
Returns
Name | Type | Description |
---|---|---|
|
| The amount of new shares in the |
removeShares
Used by the DelegationManager to remove a Staker's shares from a particular strategy when entering the withdrawal queue
addShares
Used by the DelegationManager to award a Staker some shares that have passed through the withdrawal queue
withdrawSharesAsTokens
Used by the DelegationManager to convert withdrawn shares to tokens and send them to a recipient
stakerStrategyShares
Returns the current shares of user
in strategy
getDeposits
Get all details on the staker's deposits and corresponding shares
Returns
Name | Type | Description |
---|---|---|
|
| (staker's strategies, shares in these strategies) |
|
|
stakerStrategyListLength
Simple getter function that returns stakerStrategyList[staker].length
.
addStrategiesToDepositWhitelist
Owner-only function that adds the provided Strategies to the 'whitelist' of strategies that stakers can deposit into
Parameters
Name | Type | Description |
---|---|---|
|
| Strategies that will be added to the |
removeStrategiesFromDepositWhitelist
Owner-only function that removes the provided Strategies from the 'whitelist' of strategies that stakers can deposit into
Parameters
Name | Type | Description |
---|---|---|
|
| Strategies that will be removed to the |
delegation
Returns the single, central Delegation contract of EigenLayer
slasher
Returns the single, central Slasher contract of EigenLayer
eigenPodManager
Returns the EigenPodManager contract of EigenLayer
migrateQueuedWithdrawal
calculateWithdrawalRoot
Events
Deposit
Emitted when a new deposit occurs on behalf of staker
.
Parameters
Name | Type | Description |
---|---|---|
|
| Is the staker who is depositing funds into EigenLayer. |
|
| Is the token that |
|
| Is the strategy that |
|
| Is the number of new shares |
StrategyWhitelisterChanged
Emitted when the strategyWhitelister
is changed
StrategyAddedToDepositWhitelist
Emitted when a strategy is added to the approved list of strategies for deposit
StrategyRemovedFromDepositWhitelist
Emitted when a strategy is removed from the approved list of strategies for deposit
Structs
DeprecatedStruct_WithdrawerAndNonce
DeprecatedStruct_QueuedWithdrawal
Struct type used to specify an existing queued withdrawal. Rather than storing the entire struct, only a hash is stored. In functions that operate on existing queued withdrawals -- e.g. startQueuedWithdrawalWaitingPeriod
or completeQueuedWithdrawal
, the data is resubmitted and the hash of the submitted data is computed by calculateWithdrawalRoot
and checked against the stored hash in order to confirm the integrity of the submitted data.
Last updated