SommelierTurboEthXStrategy

Overview

The SommelierTurboEthXStrategy contract is a strategy that supplies an underlying token into a Sommelier Vault to earn yield, with specific handling for ethX token conversions through Uniswap V3.

Constants

address constant ethX = ETHX_MAINNET;                                             // EthX token address
IUniswapV3Router constant router = IUniswapV3Router(UNISWAP_V3_ROUTER_MAINNET);  // Uniswap V3 router

Functions

Initialization Functions

initialize

function initialize(
    IMaxApyVault _vault,
    address[] calldata _keepers,
    bytes32 _strategyName,
    address _strategist,
    ICellar _cellar
) public override initializer

Initializes the strategy with required components.

Parameters:

  • _vault: MaxApy vault address

  • _keepers: Array of keeper addresses

  • _strategyName: Name of the strategy

  • _strategist: Strategist address

  • _cellar: Sommelier cellar address

Core Functions

liquidateExact

Withdraws exactly amountNeeded to vault.

Parameters:

  • amountNeeded: Amount to withdraw

Returns:

  • loss: Amount of realized loss

Internal Core Functions

_divest

Withdraws assets from Cellar Vault.

Parameters:

  • shares: Amount of shares to withdraw

Returns:

  • withdrawn: Amount of assets received

_swapEthX

Swaps ethX tokens to underlying WETH using Uniswap V3.

Parameters:

  • amountIn: Amount of ethX to swap

Returns:

  • Amount of WETH received

Internal View Functions

_ethXBalance

Returns the contract's ethX balance.

Returns:

  • Current ethX balance

Last updated