RewardsLens
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
Name | Type | Description |
---|---|---|
_poolTokens | address[] | The cToken addresses for which to compute the rewards. |
_user | address | The 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
Name | Type | Description |
---|---|---|
_supplier | address | The address of the supplier. |
_poolToken | address | The cToken address. |
_balance | uint256 | The user balance of tokens in the distribution. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The 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
Name | Type | Description |
---|---|---|
_supplier | address | The address of the supplier. |
_poolToken | address | The cToken address. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The 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
Name | Type | Description |
---|---|---|
_borrower | address | The address of the borrower. |
_poolToken | address | The cToken address. |
_balance | uint256 | The user balance of tokens in the distribution. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The 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
Name | Type | Description |
---|---|---|
_borrower | address | The address of the borrower. |
_poolToken | address | The cToken address. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The accrued COMP rewards. |
getCurrentCompSupplyIndex
Returns the updated COMP supply index.
function getCurrentCompSupplyIndex(address _poolToken) external view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
_poolToken | address | The cToken address. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The updated COMP supply index. |
getCurrentCompBorrowIndex
Returns the updated COMP borrow index.
function getCurrentCompBorrowIndex(address _poolToken) external view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
_poolToken | address | The cToken address. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The updated COMP borrow index. |