Skip to main content

CurvePCVDepositPlainPool

Functions

constructor

function constructor(
address _core,
address _curvePool,
uint256 _maxSlippageBasisPoints
) public

CurvePCVDepositPlainPool constructor

Parameters

NameTypeDescription
_coreaddressFei Core for reference
_curvePooladdressThe Curve pool to deposit in
_maxSlippageBasisPointsuint256max slippage for deposits, in bp

balanceReportedIn

function balanceReportedIn() public returns (address)

Curve/Convex deposits report their balance in USD

deposit

function deposit() public

deposit tokens into the Curve pool, then stake the LP tokens on Convex to earn rewards.

withdraw

function withdraw(
address to,
uint256 amountUnderlying
) public

Exit the Curve pool by removing liquidity in one token. If FEI is in the pool, pull FEI out of the pool. If FEI is not in the pool, exit in the first token of the pool. To exit without chosing a specific token, and minimize slippage, use exitPool().

Parameters

NameTypeDescription
toaddress
amountUnderlyinguint256

withdrawOneCoin

function withdrawOneCoin(
uint256 coinIndexInPool,
address to,
uint256 amountUnderlying
) public

Exit the Curve pool by removing liquidity in one token. Note that this method can cause slippage. To exit without slippage, use the exitPool() method.

Parameters

NameTypeDescription
coinIndexInPooluint256
toaddress
amountUnderlyinguint256

exitPool

function exitPool() public

Exit the Curve pool by removing liquidity. The contract will hold tokens in proportion to what was in the Curve pool at the time of exit, i.e. if the pool is 20% FRAX 60% FEI 20% alUSD, and the contract has 10M$ of liquidity, it will exit the pool with 2M FRAX, 6M FEI, 2M alUSD.

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