BaseBeefyCurveStrategy
Overview
The BaseBeefyCurveStrategy contract extends BaseBeefyStrategy to provide functionality for strategies that interact with both Beefy Finance and Curve protocols. It supplies underlying tokens into a Curve pool, then deposits the Curve LP tokens into a Beefy vault for additional yield.
State Variables
Functions
Initialization Functions
initialize
Initializes the strategy with Curve and Beefy components.
Parameters:
_vault
: MaxApy vault address_keepers
: Array of keeper addresses_strategyName
: Name of the strategy_strategist
: Strategist address_curveLpPool
: Curve LP pool address_beefyVault
: Beefy vault address
Core Functions
_invest
Invests assets by adding liquidity to Curve and depositing LP tokens to Beefy.
Parameters:
amount
: Amount to investminOutputAfterInvestment
: Minimum expected Beefy shares
Returns:
Amount of Beefy shares received
_divest
Withdraws assets from Beefy and removes liquidity from Curve.
Parameters:
amount
: Amount of Beefy shares to withdraw
Returns:
Amount of underlying assets received
View Functions
previewLiquidate
Calculates expected output for withdrawal through both Beefy and Curve.
Parameters:
requestedAmount
: Amount requested to withdraw
Returns:
Expected liquidated amount
Internal View Functions
_shareValue
Calculates underlying value of shares considering both Beefy and Curve conversion.
Parameters:
shares
: Amount of Beefy shares
Returns:
Underlying asset value
_sharesForAmount
Calculates Beefy shares needed for given amount, considering Curve conversion.
Parameters:
amount
: Amount of underlying assets
Returns:
Required Beefy shares
_lpPrice
Returns estimated price of Curve LP token.
Returns:
LP token price
Last updated