BaseCollateralGauge
Allocation of original rewards from third-party protocols in the Pool of collaterals
function userHandleAction( address collateralAddress, DataTypes.M1CollateralOptType collateralOptType, address rewardOwnerUser, uint256 amountLp) external
Only
tToken
can call the method, Triggered when users borrow, repay, or liquidatefunction 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.
CollateralPoolRewardTypes.UserClaimableTTokenParams
User-claimable reward parameter structure (
tToken
dimension)Name | Type | Description |
---|---|---|
tToken | address | tToken Contract address |
rewards | address[] | This collateral pool rewards array |
Name | Type | Description |
---|---|---|
collateralAddress | address | Collateral's pool address |
tTokenParams | CollateralPoolRewardTypes.UserClaimableTTokenParams | User-claimable reward parameter structure (tToken dimension) |
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.
CollateralPoolRewardTypes.UserClaimableCollateralParams
User query for claimable rewards parameter structure (
collateral
dimension)Name | Type | Description |
---|---|---|
collateralAddress | address | Collateral's pool address |
collateralParams | CollateralPoolRewardTypes.UserClaimableCollateralParams[] | User query for claimable rewards parameter structure ( collateral dimension) |
function userClaimAllCollateralRewards() external
Receive rewards for the pool in which all collateral assets are located.
Too much collateral will be reported as an error.
function getRewards(address collateralAddress) external view returns (address[] memory)
Get the list of reward
token
owned by this pool of collateralized assetsName | Type | Description |
---|---|---|
collateralAddress | address | Collateral's Pool ddress |
Type | Description |
---|---|
address[] | List of contracts for pool rewards |
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.Name | Type | Description |
---|---|---|
user | address | Wallet address |
collateralAddress | address | Collateral pool address |
tTokenParams | CollateralPoolRewardTypes.UserClaimableTTokenParams | User-claimable reward parameter structure ( tToken dimension) |
CollateralPoolRewardTypes.UserClaimableTTokenResult
Name | Type | Description |
---|---|---|
tToken | address | tToken address |
rewards | address[] | This collateral pool rewards array |
quantity | uint256[] | This collateral pool award quantity array |
Return Values
Type | Description |
---|---|
CollateralPoolRewardTypes.UserClaimableTTokenResult[] | Reward details |
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.Name | Type | Description |
---|---|---|
user | address | wallet address |
collateralAddress | address | Collateral's pool address |
collateralParams | CollateralPoolRewardTypes.UserClaimableCollateralParams | User-claimable reward parameter structure ( collateral dimension) |
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 |
function getUserAllClaimableRewards(address user) external view returns (CollateralPoolRewardTypes.UserClaimableCollateralResult[] memory)
Acquiring users can receive rewards for changing the collateral asset pool.
Name | Type | Description |
---|---|---|
user | address | User Address |
Type | Description |
---|---|
CollateralPoolRewardTypes.UserClaimableCollateralResult[] | reward details |
Last modified 10mo ago