SommelierMorphoEthMaximizerStrategy
Overview
The SommelierMorphoEthMaximizerStrategy contract is a specialized strategy that supplies an underlying token into a Sommelier Vault to earn yield. This strategy is adapted from the yearn-steth-acc repository and optimizes ETH returns through Morpho integration.
Constants
State Variables
No additional state variables beyond those inherited from BaseSommelierStrategy.
Functions
Initialization Functions
initialize
Initializes the strategy with Sommelier components.
Parameters:
_vault
: MaxApy vault address_keepers
: Array of keeper addresses_strategyName
: Name of the strategy_strategist
: Strategist address_cellar
: Sommelier Turbo-stETH cellar address
Core Functions
liquidateExact
Withdraws exactly amountNeeded to vault. Can only be called by vault.
Parameters:
amountNeeded
: Amount of underlying asset to withdraw
Returns:
loss
: Amount of loss realized during withdrawal
Internal Core Functions
_divest
Withdraws assets from Cellar Vault, handling potential losses.
Parameters:
shares
: Amount of cellar shares to divest
Returns:
withdrawn
: Amount of assets received after withdrawal
_swapWstEth
Swaps wstETH to underlying WETH using Uniswap V3.
Parameters:
amountIn
: Amount of wstETH to swap
Returns:
Amount of WETH received
Internal View Functions
_wstEthBalance
Retrieves the contract's wstETH balance.
Returns:
Current wstETH balance
Key Features
Integrates with Sommelier's Turbo-stETH cellar for yield optimization
Handles wstETH/ETH conversions through Uniswap V3
Implements safety checks for pause conditions and minimum trade sizes
Manages exact liquidations for vault withdrawals
Monitors and handles potential losses during withdrawals
Last updated