RewardsLens

Git Source

Inherits: MarketsLens

Author: Morpho Labs.

Intermediary layer serving as proxy to lighten the bytecode weight of the Lens.

Functions

getUserUnclaimedRewards

EXTERNAL ///

Returns the unclaimed COMP rewards for the given cToken addresses.

function getUserUnclaimedRewards(address[] calldata _poolTokens, address _user) external view returns (uint256);

Parameters

NameTypeDescription
_poolTokensaddress[]The cToken addresses for which to compute the rewards.
_useraddressThe address of the user.

getAccruedSupplierComp

Returns the accrued COMP rewards of a user since the last update.

function getAccruedSupplierComp(address _supplier, address _poolToken, uint256 _balance)
    external
    view
    returns (uint256);

Parameters

NameTypeDescription
_supplieraddressThe address of the supplier.
_poolTokenaddressThe cToken address.
_balanceuint256The user balance of tokens in the distribution.

Returns

NameTypeDescription
<none>uint256The accrued COMP rewards.

getAccruedSupplierComp

Returns the accrued COMP rewards of a user since the last update.

function getAccruedSupplierComp(address _supplier, address _poolToken) external view returns (uint256);

Parameters

NameTypeDescription
_supplieraddressThe address of the supplier.
_poolTokenaddressThe cToken address.

Returns

NameTypeDescription
<none>uint256The accrued COMP rewards.

getAccruedBorrowerComp

Returns the accrued COMP rewards of a user since the last update.

function getAccruedBorrowerComp(address _borrower, address _poolToken, uint256 _balance)
    external
    view
    returns (uint256);

Parameters

NameTypeDescription
_borroweraddressThe address of the borrower.
_poolTokenaddressThe cToken address.
_balanceuint256The user balance of tokens in the distribution.

Returns

NameTypeDescription
<none>uint256The accrued COMP rewards.

getAccruedBorrowerComp

Returns the accrued COMP rewards of a user since the last update.

function getAccruedBorrowerComp(address _borrower, address _poolToken) external view returns (uint256);

Parameters

NameTypeDescription
_borroweraddressThe address of the borrower.
_poolTokenaddressThe cToken address.

Returns

NameTypeDescription
<none>uint256The accrued COMP rewards.

getCurrentCompSupplyIndex

Returns the updated COMP supply index.

function getCurrentCompSupplyIndex(address _poolToken) external view returns (uint256);

Parameters

NameTypeDescription
_poolTokenaddressThe cToken address.

Returns

NameTypeDescription
<none>uint256The updated COMP supply index.

getCurrentCompBorrowIndex

Returns the updated COMP borrow index.

function getCurrentCompBorrowIndex(address _poolToken) external view returns (uint256);

Parameters

NameTypeDescription
_poolTokenaddressThe cToken address.

Returns

NameTypeDescription
<none>uint256The updated COMP borrow index.