BaseCollateralGauge
Last updated
Last updated
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
OnlytToken
can call the method, Triggered when users borrow, repay, or liquidate
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.
CollateralPoolRewardTypes.UserClaimableTTokenParams
User-claimable reward parameter structure (tToken
dimension)
Name | Type | Description |
---|---|---|
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)
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 assets
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.
CollateralPoolRewardTypes.UserClaimableTTokenResult
Return Values
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.
CollateralPoolRewardTypes.UserClaimableCollateralResult
Return Values
function getUserAllClaimableRewards(address user) external view returns (CollateralPoolRewardTypes.UserClaimableCollateralResult[] memory)
Acquiring users can receive rewards for changing the collateral asset pool.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Type | Description |
---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Type | Description |
---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Type | Description |
---|---|
Name | Type | Description |
---|---|---|
Type | Description |
---|---|
tToken
address
tToken
Contract address
rewards
address[]
This collateral pool rewards array
collateralAddress
address
Collateral's pool address
tTokenParams
CollateralPoolRewardTypes.UserClaimableTTokenParams
User-claimable reward parameter structure (tToken dimension)
collateralAddress
address
Collateral's pool address
collateralParams
CollateralPoolRewardTypes.UserClaimableCollateralParams[]
User query for claimable rewards parameter structure (collateral
dimension)
collateralAddress
address
Collateral's Pool ddress
address[]
List of contracts for pool rewards
user
address
Wallet address
collateralAddress
address
Collateral pool address
tTokenParams
CollateralPoolRewardTypes.UserClaimableTTokenParams
User-claimable reward parameter structure (tToken
dimension)
tToken
address
tToken
address
rewards
address[]
This collateral pool rewards array
quantity
uint256[]
This collateral pool award quantity array
CollateralPoolRewardTypes.UserClaimableTTokenResult[]
Reward details
user
address
wallet address
collateralAddress
address
Collateral's pool address
collateralParams
CollateralPoolRewardTypes.UserClaimableCollateralParams
User-claimable reward parameter structure (collateral
dimension)
collateral
address
Collateral asset contract address
tTokenResults
CollateralPoolRewardTypes.UserClaimableCollateralResult[]
Reward Details Array
CollateralPoolRewardTypes.UserClaimableCollateralResult[]
Reward details
user
address
User Address
CollateralPoolRewardTypes.UserClaimableCollateralResult[]
reward details