Skip to content

UiIncentiveDataProviderV3

Contract that returns an array of all reserve incentives or user claimable rewards within a particular market, used by the SparkLend Interface to display incentives data.

The SparkLend Utilities SDK includes an interface to make calls to this contract, and functions to format the response for frontend use-cases.

Data Structures

AggregatedReserveIncentiveData

NameTypeDescription
underlyingAssetaddressAddress of the asset supplied/borrowed in Pool
aIncentiveDataIncentiveDataDetails of rewards distributed for supplying to SparkLend Pool i.e. rewards for spToken holders.
vIncentiveDataIncentiveDataDetails of rewards distributed for variable debt borrowed from SparkLend Pool i.e. rewards for vToken holders.
sIncentiveDataIncentiveDataDetails of rewards distributed for stable debt borrowed from SparkLend Pool i.e. rewards for sToken holders.

IncentiveData

NameTypeDescription
tokenAddressaddressAddress of corresponding a/s/vToken.
incentiveControllerAddressaddressAddress of Rewards Controller
rewardsTokenInformationRewardInfo[]Array of details for all reward tokens that are available for given a/s/vToken

RewardInfo

NameTypeDescription
rewardTokenSymbolstringSymbol of Reward Token
rewardTokenAddressaddressAddress of Reward Token
rewardOracleAddressaddressPrice Oracle for Reward token
emissionPerSeconduint256Reward Token emitted per second
incentivesLastUpdateTimestampuint256Unix timestamp of last update made on asset’s reward token.
tokenIncentivesIndexuint256Latest distribution index of the reward token
emissionEndTimestampuint256Unix timestamp of when the Incentive emission of given reward token ends for the corresponding asset
rewardPriceFeedint256Latest answer/price from reward token price oracle
rewardTokenDecimalsuint8Decimals of reward token
precisionuint8Decimals of asset token (a/s/vToken)
priceFeedDecimalsuint8Decimals of price provided by oracle

UserReserveIncentiveData

NameTypeDescription
underlyingAssetaddressAddress of the asset supplied/borrowed in Pool
spTokenIncentivesUserDataUserIncentiveDataDetails of user rewards received for supplying to SparkLend Pool i.e. rewards for spToken.
vTokenIncentivesUserDataUserIncentiveDataDetails of user rewards received for borrowing at variable rate from SparkLend Pool i.e. rewards for vToken.
sTokenIncentivesUserDataUserIncentiveDataDetails of user rewards received for borrowing at stable rate from SparkLend Pool i.e. rewards for sToken.

UserIncentiveData

NameTypeDescription
tokenAddressaddressAddress of corresponding a/s/vToken.
incentiveControllerAddressaddressAddress of Rewards Controller for reward claim tx
userRewardsInformationUserRewardInfo[]Array of details for all reward tokens accrued/claimed by user for given a/s/vToken

UserRewardInfo

NameTypeDescription
rewardTokenSymbolstringSymbol of Reward Token
rewardOracleAddressaddressPrice Oracle for Reward token
rewardTokenAddressaddressAddress of Reward Token
userUnclaimedRewardsuint256User’s unclaimed rewards
tokenIncentivesUserIndexuint256Latest user distribution index
rewardPriceFeedint256Latest answer/price from reward token price oracle
priceFeedDecimalsuint8Decimals of price provided by oracle
rewardTokenDecimalsuint8Decimals of reward token

Methods

getReservesIncentivesData

function getReservesIncentivesData(IPoolAddressesProvider provider)

Returns AggregatedReserveIncentiveData[] for the pool associated with given provider.

getUserReservesIncentivesData

function getUserReservesIncentivesData(IPoolAddressesProvider provider, address user)

Returns UserReserveIncentiveData[] for the given user for the pool associated with given .

getFullReservesIncentiveData

function getFullReservesIncentiveData(IPoolAddressesProvider provider, address user)

Returns both AggregatedReserveIncentiveData[] and UserReserveIncentiveData[] for the given user for the pool associated with given provider.