IStrategy
Last updated
Last updated
Author: Layr Labs, Inc.
Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service
Custom Strategy
implementations may expand extensively on this interface.
Used to deposit tokens into this Strategy
This function is only callable by the strategyManager contract. It is invoked inside of the strategyManager's depositIntoStrategy
function, and individual share balances are recorded in the strategyManager as well.
Parameters
Name | Type | Description |
---|---|---|
Returns
Name | Type | Description |
---|---|---|
Used to withdraw tokens from this Strategy, to the recipient
's address
This function is only callable by the strategyManager contract. It is invoked inside of the strategyManager's other functions, and individual share balances are recorded in the strategyManager as well.
Parameters
Used to convert a number of shares to the equivalent amount of underlying tokens for this strategy.
In contrast to sharesToUnderlyingView
, this function may make state modifications
Implementation for these functions in particular may vary significantly for different strategies
Parameters
Returns
Used to convert an amount of underlying tokens to the equivalent amount of shares in this strategy.
In contrast to underlyingToSharesView
, this function may make state modifications
Implementation for these functions in particular may vary significantly for different strategies
Parameters
Returns
convenience function for fetching the current underlying value of all of the user
's shares in this strategy. In contrast to userUnderlyingView
, this function may make state modifications
convenience function for fetching the current total shares of user
in this strategy, by querying the strategyManager
contract
Used to convert a number of shares to the equivalent amount of underlying tokens for this strategy.
In contrast to sharesToUnderlying
, this function guarantees no state modifications
Implementation for these functions in particular may vary significantly for different strategies
Parameters
Returns
Used to convert an amount of underlying tokens to the equivalent amount of shares in this strategy.
In contrast to underlyingToShares
, this function guarantees no state modifications
Implementation for these functions in particular may vary significantly for different strategies
Parameters
Returns
convenience function for fetching the current underlying value of all of the user
's shares in this strategy. In contrast to userUnderlying
, this function guarantees no state modifications
The underlying token for shares in this Strategy
The total number of extant shares in this Strategy
Returns either a brief string explaining the strategy's goal & purpose, or a link to metadata that explains in more detail.
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 |
---|---|---|
token
IERC20
is the ERC20 token being deposited
amount
uint256
is the amount of token being deposited
<none>
uint256
newShares is the number of new shares issued at the current exchange ratio.
recipient
address
is the address to receive the withdrawn funds
token
IERC20
is the ERC20 token being transferred out
amountShares
uint256
is the amount of shares being withdrawn
amountShares
uint256
is the amount of shares to calculate its conversion into the underlying token
<none>
uint256
The amount of underlying tokens corresponding to the input amountShares
amountUnderlying
uint256
is the amount of underlyingToken
to calculate its conversion into strategy shares
<none>
uint256
The amount of underlying tokens corresponding to the input amountShares
amountShares
uint256
is the amount of shares to calculate its conversion into the underlying token
<none>
uint256
The amount of shares corresponding to the input amountUnderlying
amountUnderlying
uint256
is the amount of underlyingToken
to calculate its conversion into strategy shares
<none>
uint256
The amount of shares corresponding to the input amountUnderlying