Skip to main content

ConvexPCVDeposit

Functions

constructor

function constructor(
address _core,
address _curvePool,
address _convexBooster,
address _convexRewards
) public

ConvexPCVDeposit constructor

Parameters

NameTypeDescription
_coreaddressFei Core for reference
_curvePooladdressThe Curve pool whose LP tokens are staked
_convexBoosteraddressThe Convex Booster contract (for deposit/withdraw)
_convexRewardsaddressThe Convex Rewards contract (for claiming rewards)

balanceReportedIn

function balanceReportedIn() public returns (address)

Curve/Convex deposits report their balance in USD

deposit

function deposit() public

deposit Curve LP tokens on Convex and stake deposit tokens in the Convex rewards contract. Note : this call is permissionless, and can be used if LP tokens are transferred to this contract directly.

withdraw

function withdraw(
address to,
uint256 amountLpTokens
) public

unstake LP tokens from Convex Rewards, and withdraw Curve LP tokens from Convex

Parameters

NameTypeDescription
toaddress
amountLpTokensuint256

claimRewards

function claimRewards() public

claim CRV & CVX rewards earned by the LP tokens staked on this contract.

balance

function balance() public returns (uint256)

returns the balance in USD

resistantBalanceAndFei

function resistantBalanceAndFei() public returns (uint256 resistantBalance, uint256 resistantFei)

returns the resistant balance in USD and FEI held by the contract