ConvexUSDTCrvUSDStrategy
Overview
The ConvexUSDTCrvUSDStrategy contract is a strategy that supplies USDT into the crvUSD-USDT pool in Curve on Polygon, then stakes the curve LP tokens in Convex to maximize yield. It manages conversions between USDT and other tokens using Curve's AtriCrypto zapper.
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_curveLpPool
: Curve LP pool address_router
: Router address for swaps
Core Functions
_invest
Invests assets through:
Converting USDCe to USDT via zapper
Adding USDT to crvUSD-USDT pool
Staking LP tokens in Convex
Parameters:
amount
: Amount to investminOutputAfterInvestment
: Minimum expected LP tokens
Returns:
Amount of tokens received
_divest
Withdraws assets through:
Withdrawing from Convex
Removing liquidity from Curve
Converting USDT to USDCe via zapper
Parameters:
amount
: LP tokens to divest
Returns:
Amount received after withdrawals and conversions
_unwindRewards
Claims and converts rewards:
Claims CRV rewards
Swaps CRV through multiple hops
Converts crvUSD through Curve pool
Parameters:
rewardPool
: Convex rewards pool
Internal View Functions
_convertUsdtToUsdce
Converts USDT to USDCe using zapper.
Parameters:
usdtAmount
: USDT amount
Returns:
Equivalent USDCe amount
_convertUsdceToUsdt
Converts USDCe to USDT using zapper.
Parameters:
usdceAmount
: USDCe amount
Returns:
Equivalent USDT amount
_lpValue
Calculates underlying value of LP tokens.
Parameters:
lp
: LP token amount
Returns:
USDCe value
_lpForAmount
Calculates LP tokens needed for amount.
Parameters:
amount
: USDCe amount
Returns:
Required LP tokens
_estimatedTotalAssets
Calculates total strategy value including conversions.
Returns:
Total value in USDCe
_lpPrice
Returns Curve LP token price.
_crv
Returns CRV token address.
_crvUsdBalance
Returns strategy's crvUSD balance.
_simulateHarvest
Simulates harvest operation and reverts with simulation data.
Last updated