Skip to main content

LendingPool

Functions

deposit

function deposit(
address asset,
uint256 amount,
address onBehalfOf,
uint16 referralCode
) external

Parameters

NameTypeDescription
assetaddress
amountuint256
onBehalfOfaddress
referralCodeuint16

withdraw

function withdraw(
address asset,
uint256 amount,
address to
) external

Parameters

NameTypeDescription
assetaddress
amountuint256
toaddress

IncentivesController

Functions

claimRewards

function claimRewards(
address[] assets,
uint256 amount,
address to
) external

Parameters

NameTypeDescription
assetsaddress[]
amountuint256
toaddress

getRewardsBalance

function getRewardsBalance(
address[] assets,
address user
) external returns (uint256)

Parameters

NameTypeDescription
assetsaddress[]
useraddress

AavePCVDeposit

Functions

constructor

function constructor(
address _core,
contract LendingPool _lendingPool,
contract IERC20 _token,
contract IERC20 _aToken,
contract IncentivesController _incentivesController
) public

Aave PCV Deposit constructor

Parameters

NameTypeDescription
_coreaddressFei Core for reference
_lendingPoolcontract LendingPoolthe Aave v2 lending pool
_tokencontract IERC20the underlying token of the PCV deposit
_aTokencontract IERC20the associated Aave aToken for the deposit
_incentivesControllercontract IncentivesControllerthe Aave incentives controller for the aToken

claimRewards

function claimRewards() external

claims Aave rewards from the deposit and transfers to this address

deposit

function deposit() external

deposit buffered aTokens

withdraw

function withdraw(
address to,
uint256 amountUnderlying
) external

withdraw tokens from the PCV allocation

Parameters

NameTypeDescription
toaddressthe address to send PCV to
amountUnderlyinguint256of tokens withdrawn

balance

function balance() public returns (uint256)

returns total balance of PCV in the Deposit

aTokens are rebasing, so represent 1:1 on underlying value

balanceReportedIn

function balanceReportedIn() public returns (address)

display the related token of the balance reported

Events

ClaimRewards

event ClaimRewards(
address caller,
uint256 amount
)

Parameters

NameTypeDescription
calleraddress
amountuint256