Skip to main content

IPoolManager

Functions

token

function token() external returns (address)

IStableMaster

Functions

agToken

function agToken() external returns (address)

mint

function mint(
uint256 amount,
address user,
contract IPoolManager poolManager,
uint256 minStableAmount
) external

Parameters

NameTypeDescription
amountuint256
useraddress
poolManagercontract IPoolManager
minStableAmountuint256

burn

function burn(
uint256 amount,
address burner,
address dest,
contract IPoolManager poolManager,
uint256 minCollatAmount
) external

Parameters

NameTypeDescription
amountuint256
burneraddress
destaddress
poolManagercontract IPoolManager
minCollatAmountuint256

unpause

function unpause(
bytes32 agent,
contract IPoolManager poolManager
) external

Parameters

NameTypeDescription
agentbytes32
poolManagercontract IPoolManager

IStakingRewards

Functions

stakingToken

function stakingToken() external returns (address)

balanceOf

function balanceOf(
address account
) external returns (uint256)

Parameters

NameTypeDescription
accountaddress

stake

function stake(
uint256 amount
) external

Parameters

NameTypeDescription
amountuint256

withdraw

function withdraw(
uint256 amount
) external

Parameters

NameTypeDescription
amountuint256

getReward

function getReward() external

AngleUniswapPCVDeposit

Functions

constructor

function constructor(
address _core,
address _pair,
address _router,
address _oracle,
address _backupOracle,
uint256 _maxBasisPointsFromPegLP,
contract IStableMaster _stableMaster,
contract IPoolManager _poolManager,
contract IStakingRewards _stakingRewards
) public

Uniswap PCV Deposit constructor

Parameters

NameTypeDescription
_coreaddressFei Core for reference
_pairaddressUniswap Pair to deposit to
_routeraddressUniswap Router
_oracleaddressoracle for reference
_backupOracleaddressthe backup oracle to reference
_maxBasisPointsFromPegLPuint256the max basis points of slippage from peg allowed on LP deposit
_stableMastercontract IStableMaster
_poolManagercontract IPoolManager
_stakingRewardscontract IStakingRewards

claimRewards

function claimRewards() external

claim staking rewards

mintAgToken

function mintAgToken(
uint256 amountFei
) public

mint agToken from FEI

the call will revert if slippage is too high compared to oracle.

Parameters

NameTypeDescription
amountFeiuint256

burnAgToken

function burnAgToken(
uint256 amountAgToken
) public

burn agToken for FEI

the call will revert if slippage is too high compared to oracle

Parameters

NameTypeDescription
amountAgTokenuint256

burnAgTokenAll

function burnAgTokenAll() external

burn ALL agToken held for FEI

see burnAgToken(uint256 amount).

setPair

function setPair(
address _pair
) public

set the new pair contract

also approves the router for the new pair token and underlying token

Parameters

NameTypeDescription
_pairaddressthe new pair

setStakingRewards

function setStakingRewards(
contract IStakingRewards _stakingRewards
) public

set a new stakingRewards address

Parameters

NameTypeDescription
_stakingRewardscontract IStakingRewardsthe new stakingRewards

setPoolManager

function setPoolManager(
contract IPoolManager _poolManager
) public

set a new poolManager address

Parameters

NameTypeDescription
_poolManagercontract IPoolManagerthe new poolManager

liquidityOwned

function liquidityOwned() public returns (uint256)

amount of pair liquidity owned by this contract

Return Values

NameTypeDescription
[0]uint256amount of LP tokens

_removeLiquidity

function _removeLiquidity(
uint256 liquidity
) internal returns (uint256)

Parameters

NameTypeDescription
liquidityuint256

_addLiquidity

function _addLiquidity(
uint256 tokenAmount,
uint256 feiAmount
) internal

Parameters

NameTypeDescription
tokenAmountuint256
feiAmountuint256