BaseCollateralGauge

BaseCollateralGauge

Allocation of original rewards from third-party protocols in the Pool of collaterals

Write Methods

userHandleAction

function userHandleAction( address collateralAddress, DataTypes.M1CollateralOptType collateralOptType, address rewardOwnerUser, uint256 amountLp) external

OnlytTokencan call the method, Triggered when users borrow, repay, or liquidate

userClaimCollateralRewardsBySingleTToken

function userClaimCollateralRewardsBySingleTToken(address collateralAddress, CollateralPoolRewardTypes.UserClaimableTTokenParams memory tTokenParams) external

Users receive rewards for the pool in which that collateral asset is located, based on the collateral asset.

Struct

CollateralPoolRewardTypes.UserClaimableTTokenParams

User-claimable reward parameter structure (tToken dimension)

Name
Type
Description

tToken

address

tTokenContract address

rewards

address[]

This collateral pool rewards array

Call Params

Name
Type
Description

collateralAddress

address

Collateral's pool address

tTokenParams

CollateralPoolRewardTypes.UserClaimableTTokenParams

User-claimable reward parameter structure (tToken dimension)

userClaimCollateralRewardsByCollateral

function userClaimCollateralRewardsByCollateral(CollateralPoolRewardTypes.UserClaimableCollateralParams[] memory collateralParams) externa

The user receives, based on the collateral asset, the rewards of the pool in which that collateral asset is located.

struct

CollateralPoolRewardTypes.UserClaimableCollateralParams

User query for claimable rewards parameter structure (collateral dimension)

Call Params

Name
Type
Description

collateralAddress

address

Collateral's pool address

collateralParams

CollateralPoolRewardTypes.UserClaimableCollateralParams[]

User query for claimable rewards parameter structure (collateral dimension)

userClaimAllCollateralRewards

function userClaimAllCollateralRewards() external

Receive rewards for the pool in which all collateral assets are located.

Too much collateral will be reported as an error.

View Methods

getRewards

function getRewards(address collateralAddress) external view returns (address[] memory)

Get the list of reward token owned by this pool of collateralized assets

Call Params

Name
Type
Description

collateralAddress

address

Collateral's Pool ddress

Return Values

Type
Description

address[]

List of contracts for pool rewards

getUserClaimableRewardsBySingleTToken

function getUserClaimableRewardsBySingleTToken(address user, address collateralAddress, CollateralPoolRewardTypes.UserClaimableTTokenParams[] memory tTokenParams) external view returns (CollateralPoolRewardTypes.UserClaimableTTokenResult[] memory)

Acquire based on single or multiple tToken dimensions to obtain rewards for users who can receive a pool of re-collateralized assets.

Call Params

Name
Type
Description

user

address

Wallet address

collateralAddress

address

Collateral pool address

tTokenParams

CollateralPoolRewardTypes.UserClaimableTTokenParams

User-claimable reward parameter structure (tToken dimension)

struct

CollateralPoolRewardTypes.UserClaimableTTokenResult

Name
Type
Description

tToken

address

tTokenaddress

rewards

address[]

This collateral pool rewards array

quantity

uint256[]

This collateral pool award quantity array

Return Values

Type
Description

CollateralPoolRewardTypes.UserClaimableTTokenResult[]

Reward details

getUserClaimableRewardsByCollateral

function getUserClaimableRewardsByCollateral(address user, CollateralPoolRewardTypes.UserClaimableCollateralParams[] memory collateralParams) external view returns (CollateralPoolRewardTypes.UserClaimableCollateralResult[] memory)

Based on single or multiple collateral dimension acquisition, get the rewards that users can receive to change the pool of collateral assets.

Call Params

Name
Type
Description

user

address

wallet address

collateralAddress

address

Collateral's pool address

collateralParams

CollateralPoolRewardTypes.UserClaimableCollateralParams

User-claimable reward parameter structure (collateral dimension)

struct

CollateralPoolRewardTypes.UserClaimableCollateralResult

Name
Type
Description

collateral

address

Collateral asset contract address

tTokenResults

CollateralPoolRewardTypes.UserClaimableCollateralResult[]

Reward Details Array

Return Values

Type
Description

CollateralPoolRewardTypes.UserClaimableCollateralResult[]

Reward details

getUserAllClaimableRewards

function getUserAllClaimableRewards(address user) external view returns (CollateralPoolRewardTypes.UserClaimableCollateralResult[] memory)

Acquiring users can receive rewards for changing the collateral asset pool.

Call Params

Name
Type
Description

user

address

User Address

Return Values

Type
Description

CollateralPoolRewardTypes.UserClaimableCollateralResult[]

reward details

Last updated