⬅️ Contracts

ERC20CompoundPCVDeposit

ERC-20 implementation for a Compound PCV Deposit

Author: Fei Protocol

Mainnet implementations

Name Address
compoundDaiPCVDeposit 0xe0f73b8d76D2Ad33492F995af218b03564b8Ce20
indexCoopFusePoolDpiPCVDeposit 0x3dD3d945C4253bAc5B4Cc326a001B7d3f9C4DD66
indexCoopFusePoolFeiPCVDeposit 0xD6960adba53212bBE96E54a7AFeDA2066437D000
rariPool18FeiPCVDeposit 0x5A8CB4556e5D5935Af06beab8292905f48131479
rariPool22FeiPCVDeposit 0x7CeBaB7b4B4399343f6D0D36B550EE097F60d7fE
rariPool24FeiPCVDeposit 0x1434F99EDB2bD03DECCCFe21288767b8324B7403
rariPool25FeiPCVDeposit 0xe1662531aA5de1DAD8ab5B5756b8F6c8F3C759Ca
rariPool26FeiPCVDeposit 0xFdCc96967C86250f333cE52Ba706Ec2961c3302f
rariPool27FeiPCVDeposit 0x91f50E3183a8CC30D2A981C3aFA85A2Bf6691c67
rariPool128FeiPCVDeposit 0x02101960B3B317839254a17ba54a811A087cB3A0
rariPool19DpiPCVDeposit 0x3dD3d945C4253bAc5B4Cc326a001B7d3f9C4DD66
rariPool19FeiPCVDeposit 0xD6960adba53212bBE96E54a7AFeDA2066437D000
rariPool6FeiPCVDeposit 0xB51f09B6F103D697dc5d64DC904Ad6a2Dad39987
rariPool7FeiPCVDeposit 0x74B235Fef146cDB5BE0D3786a9f3774674b3615E
rariPool8FeiPCVDeposit 0x37349d9cc523D28e6aBFC03fc5F44879bC8BfFD9
rariPool9FeiPCVDeposit 0xF2D8beE45f29A779cFB9F04ac233E703974a2C53
rariPool9RaiPCVDeposit 0x9aAdFfe00eAe6d8e59bB4F7787C6b99388A6960D
rariPool28FeiPCVDeposit 0xb0D5eBA35E1cecE568096064Ed68A49C6A24d961
rariPool31FeiPCVDeposit 0x81DCB06eA4db474D1506Ca6275Ff7D870bA3A1Be
rariPool72FeiPCVDeposit 0x4A5Af5A124E672C156241b76CAd4E41D09dd4883
rariPool79FeiPCVDeposit 0x76dFcf06E7D7B8248094DC319b284fB244f06309
rariPool90FeiPCVDeposit 0x61d26126D2F8A44b41c1D8E1B1F276551DC8EEc6
rariPool91FeiPCVDeposit 0x2296a2417D1f02d394ab22aF794a0f426eD53436
liquityFusePoolLusdPCVDeposit 0x8C51E4532CC745cF3DFec5CEBd835D07E7BA1002
rariPool7LusdPCVDeposit 0x6026a1559CDd44a63C5CA9A078CC996a9eb68ABB

Core, PCVDripController, PriceBoundPSM, Fei, PCVDepositWrapper, CErc20Delegator

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
Param Type Notes
bytes32

balance

function balance() view returns(uint256)

returns total balance of PCV in the Deposit excluding the FEI

returns stale values from Compound if the market hasn't been updated

Returns
Param Type Notes
uint256

balanceReportedIn

function balanceReportedIn() view returns(address)

display the related token of the balance reported

Returns
Param Type Notes
address

cToken

function cToken() view returns(address)
Returns
Param Type Notes
address

core

function core() view returns(address)

address of the Core contract referenced

Returns
Param Type Notes
address ICore implementation address

deposit

function deposit() nonpayable

deposit ERC-20 tokens to Compound

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
Param Type Notes
bool

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
Param Type Notes
bool

resistantBalanceAndFei

function resistantBalanceAndFei() view returns(uint256,uint256)

gets the resistant token balance and protocol owned fei of this deposit

Returns
Param Type Notes
uint256
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

token

function token() view returns(address)

the token underlying the cToken

Returns
Param Type Notes
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

withdraw tokens from the PCV allocation

Params
Param Type Notes
to address the address to send PCV to
amountUnderlying uint256 of tokens withdrawn

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

⬅️ Contracts