Skip to main content

ConvexStrategy

ConvexStrategy

cvxDepositorAddress

address cvxDepositorAddress

cvxRewardStakerAddress

address cvxRewardStakerAddress

cvxDepositorPTokenId

uint256 cvxDepositorPTokenId

constructor

constructor(struct InitializableAbstractStrategy.BaseStrategyConfig _stratConfig) public

initialize

function initialize(address[] _rewardTokenAddresses, address[] _assets, address[] _pTokens, address _cvxDepositorAddress, address _cvxRewardStakerAddress, uint256 _cvxDepositorPTokenId) external

Initializer for setting up strategy internal state. This overrides the InitializableAbstractStrategy initializer as Curve strategies don't fit well within that abstraction.

Parameters

NameTypeDescription
_rewardTokenAddressesaddress[]Address of CRV & CVX
_assetsaddress[]Addresses of supported assets. MUST be passed in the same order as returned by coins on the pool contract, i.e. DAI, USDC, USDT
_pTokensaddress[]Platform Token corresponding addresses
_cvxDepositorAddressaddressAddress of the Convex depositor(AKA booster) for this pool
_cvxRewardStakerAddressaddressAddress of the CVX rewards staker
_cvxDepositorPTokenIduint256Pid of the pool referred to by Depositor and staker

_lpDepositAll

function _lpDepositAll() internal

_lpWithdraw

function _lpWithdraw(uint256 numCrvTokens) internal

_lpWithdrawAll

function _lpWithdrawAll() internal

_approveBase

function _approveBase() internal

checkBalance

function checkBalance(address _asset) public view returns (uint256 balance)

Get the total asset value held in the platform

Parameters

NameTypeDescription
_assetaddressAddress of the asset

Return Values

NameTypeDescription
balanceuint256Total value of the asset in the platform

collectRewardTokens

function collectRewardTokens() external

Collect accumulated CRV and CVX and send to Vault.