⬅️ Contracts
CurvePCVDepositPlainPool: implementation for a PCVDeposit that deploys liquidity on Curve, in a plain pool (3 stable assets).
Author: Fei Protocol
Mainnet implementations
Core
Events
ContractAdminRoleUpdate
event ContractAdminRoleUpdate(bytes32,bytes32)
Params
Param |
Type |
Notes |
oldContractAdminRole |
bytes32 indexed |
|
newContractAdminRole |
bytes32 indexed |
|
CoreUpdate
event CoreUpdate(address,address)
Params
Param |
Type |
Notes |
oldCore |
address indexed |
|
newCore |
address indexed |
|
Deposit
event Deposit(address,uint256)
Params
Param |
Type |
Notes |
_from |
address indexed |
|
_amount |
uint256 |
|
Paused
event Paused(address)
Params
Param |
Type |
Notes |
account |
address |
|
Unpaused
event Unpaused(address)
Params
Param |
Type |
Notes |
account |
address |
|
WithdrawERC20
event WithdrawERC20(address,address,address,uint256)
Params
Param |
Type |
Notes |
_caller |
address indexed |
|
_token |
address indexed |
|
_to |
address indexed |
|
_amount |
uint256 |
|
WithdrawETH
event WithdrawETH(address,address,uint256)
Params
Param |
Type |
Notes |
_caller |
address indexed |
|
_to |
address indexed |
|
_amount |
uint256 |
|
Withdrawal
event Withdrawal(address,address,uint256)
Params
Param |
Type |
Notes |
_caller |
address indexed |
|
_to |
address indexed |
|
_amount |
uint256 |
|
Methods
CONTRACT_ADMIN_ROLE
function CONTRACT_ADMIN_ROLE() view returns(bytes32)
a role used with a subset of governor permissions for this contract only
Returns
balance
function balance() view returns(uint256)
returns the balance in USD
Returns
balanceReportedIn
function balanceReportedIn() pure returns(address)
Curve/Convex deposits report their balance in USD
Returns
core
function core() view returns(address)
address of the Core contract referenced
Returns
Param |
Type |
Notes |
|
address |
ICore implementation address |
curvePool
function curvePool() view returns(address)
The Curve pool to deposit in
Returns
deposit
function deposit() nonpayable
deposit tokens into the Curve pool, then stake the LP tokens on Convex to earn rewards.
exitPool
function exitPool() nonpayable
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.
fei
function fei() view returns(address)
address of the Fei contract referenced by Core
Returns
Param |
Type |
Notes |
|
address |
IFei implementation address |
feiBalance
function feiBalance() view returns(uint256)
fei balance of contract
Returns
Param |
Type |
Notes |
|
uint256 |
fei amount held |
isContractAdmin
function isContractAdmin(address) view returns(bool)
returns whether a given address has the admin role for this contract
Params
Param |
Type |
Notes |
_admin |
address |
|
Returns
maxSlippageBasisPoints
function maxSlippageBasisPoints() view returns(uint256)
maximum slippage accepted during deposit / withdraw, expressed in basis points (100% = 10_000).
Returns
pause
function pause() nonpayable
set pausable methods to paused
paused
function paused() view returns(bool)
Returns true if the contract is paused, and false otherwise.
Returns
resistantBalanceAndFei
function resistantBalanceAndFei() view returns(uint256,uint256)
returns the resistant balance in USD and FEI held by the contract
Returns
Param |
Type |
Notes |
resistantBalance |
uint256 |
|
resistantFei |
uint256 |
|
setContractAdminRole
function setContractAdminRole(bytes32) nonpayable
sets a new admin role for this contract
Params
Param |
Type |
Notes |
newContractAdminRole |
bytes32 |
|
setCore
function setCore(address) nonpayable
set new Core reference address
Params
Param |
Type |
Notes |
newCore |
address |
the new core address |
tribe
function tribe() view returns(address)
address of the Tribe contract referenced by Core
Returns
Param |
Type |
Notes |
|
address |
IERC20 implementation address |
tribeBalance
function tribeBalance() view returns(uint256)
tribe balance of contract
Returns
Param |
Type |
Notes |
|
uint256 |
tribe amount held |
unpause
function unpause() nonpayable
set pausable methods to unpaused
withdraw
function withdraw(address,uint256) nonpayable
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().
Params
Param |
Type |
Notes |
to |
address |
|
amountUnderlying |
uint256 |
|
withdrawERC20
function withdrawERC20(address,address,uint256) nonpayable
withdraw ERC20 from the contract
Params
Param |
Type |
Notes |
token |
address |
address of the ERC20 to send |
to |
address |
address destination of the ERC20 |
amount |
uint256 |
quantity of ERC20 to send |
withdrawETH
function withdrawETH(address,uint256) nonpayable
withdraw ETH from the contract
Params
Param |
Type |
Notes |
to |
address |
address to send ETH |
amountOut |
uint256 |
amount of ETH to send |
withdrawOneCoin
function withdrawOneCoin(uint256,address,uint256) nonpayable
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.
Params
Param |
Type |
Notes |
coinIndexInPool |
uint256 |
|
to |
address |
|
amountUnderlying |
uint256 |
|
⬅️ Contracts