ConvexCrvUSDWethCollateralStrategy
Overview
The ConvexCrvUSDWethCollateralStrategy contract is a sophisticated strategy that supplies CrvUSD into the CrvUSD(WETH Collateral) lending pool in Curve, then stakes the curve LP tokens in Convex to maximize yield. It manages multiple token conversions and interactions between Curve lending pools and Convex staking.
Constants
State Variables
Functions
Initialization Functions
constructor
Empty constructor marked as initializer.
initialize
Initializes the strategy with required components.
Parameters:
_vault
: MaxApy vault address_keepers
: Array of keeper addresses_strategyName
: Name of the strategy_strategist
: Strategist address_curveLendingPool
: Curve lending pool address_curveUsdcCrvUsdPool
: Curve USDC-crvUSD pool address
Internal Core Functions
_invest
Invests assets through multiple steps:
Swaps USDC for crvUSD
Adds liquidity to lending pool
Stakes LP tokens in Convex
Parameters:
amount
: Amount to investminOutputAfterInvestment
: Minimum expected LP tokens
Returns:
Amount of tokens received
_divest
Withdraws assets through multiple steps:
Withdraws from Convex
Removes liquidity from lending pool
Swaps crvUSD for USDC
Parameters:
amount
: Amount of LP tokens to divest
Returns:
Amount of USDC received
_unwindRewards
Claims and converts rewards to underlying:
Claims CRV and CVX rewards
Swaps CVX for CRV
Swaps CRV for USDC through WETH
Parameters:
rewardPool
: Convex rewards pool
View Functions
previewLiquidate
Simulates withdrawal including losses.
Parameters:
requestedAmount
: Amount to withdraw
Returns:
Expected output amount
Internal View Functions
_lpValue
Calculates underlying value of LP tokens.
Parameters:
lp
: Amount of LP tokens
Returns:
Underlying value
_lpForAmount
Calculates LP tokens needed for given amount.
Parameters:
amount
: Amount of underlying
Returns:
Required LP tokens
_lpPrice
Empty implementation for LP price.
_crv
Returns CRV token address.
_cvx
Returns CVX token address.
_simulateHarvest
Simulates harvest operation with detailed result reporting.
Last updated