IStrategyManager
Last updated
Last updated
Author: Layr Labs, Inc.
Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service
See the StrategyManager
contract itself for implementation details.
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 |
---|---|---|
Returns
Name | Type | Description |
---|---|---|
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
Returns
Used by the DelegationManager to remove a Staker's shares from a particular strategy when entering the withdrawal queue
Used by the DelegationManager to award a Staker some shares that have passed through the withdrawal queue
Used by the DelegationManager to convert withdrawn shares to tokens and send them to a recipient
Returns the current shares of user
in strategy
Get all details on the staker's deposits and corresponding shares
Returns
Simple getter function that returns stakerStrategyList[staker].length
.
Owner-only function that adds the provided Strategies to the 'whitelist' of strategies that stakers can deposit into
Parameters
Owner-only function that removes the provided Strategies from the 'whitelist' of strategies that stakers can deposit into
Parameters
Returns the single, central Delegation contract of EigenLayer
Returns the single, central Slasher contract of EigenLayer
Returns the EigenPodManager contract of EigenLayer
Emitted when a new deposit occurs on behalf of staker
.
Parameters
Emitted when the strategyWhitelister
is changed
Emitted when a strategy is added to the approved list of strategies for deposit
Emitted when a strategy is removed from the approved list of strategies for deposit
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.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
strategy
address
is the specified strategy where deposit is to be made,
token
address
is the denomination in which the deposit is to be made,
amount
uint256
is the amount of token to be deposited in the strategy by the staker
shares
uint256
The amount of new shares in the strategy
created as part of the action.
strategy
IStrategy
is the specified strategy where deposit is to be made,
token
IERC20
is the denomination in which the deposit is to be made,
amount
uint256
is the amount of token to be deposited in the strategy by the staker
staker
address
the staker that the deposited assets will be credited to
expiry
uint256
the timestamp at which the signature expires
signature
bytes
is a valid signature from the staker
. either an ECDSA signature if the staker
is an EOA, or data to forward following EIP-1271 if the staker
is a contract
shares
uint256
The amount of new shares in the strategy
created as part of the action.
<none>
IStrategy[]
(staker's strategies, shares in these strategies)
<none>
uint256[]
strategiesToWhitelist
address[]
Strategies that will be added to the strategyIsWhitelistedForDeposit
mapping (if they aren't in it already)
strategiesToRemoveFromWhitelist
IStrategy[]
Strategies that will be removed to the strategyIsWhitelistedForDeposit
mapping (if they are in it)
staker
address
Is the staker who is depositing funds into EigenLayer.
token
IERC20
Is the token that staker
deposited.
strategy
IStrategy
Is the strategy that staker
has deposited into.
shares
uint256
Is the number of new shares staker
has been granted in strategy
.