The Boost V2 Docs are under active development and will be subject to changes.

The ERC20 Variable Incentive is designed to store and distribute dynamic amounts of assets that can be claimed by users. The Boost SDK provides several methods to retrieve information about the current state of its rewards.

API

asset

Retrieves the address of the ERC20-like asset to be rewarded on claim.

Parameters

parameters
Omit<wagmi.ReadContractParameters, 'address' | 'args' | 'functionName' | 'abi'>

Optional parameters to pass to the underlying readContract method. Checkout wagmi’s documentation for more information. address, args, functionName, abi are handled for you under the hood.

Returns

ERC20-like address
Address

The address of the asset transferred on claim

currentReward

Calculates the current reward based on the time since the last claim.

The reward is calculated based on the time since the last claim, the available budget, and the reward parameters. It increases linearly over time in the absence of claims, with each hour adding rewardBoost to the current reward, up to the available budget.

For example, if there is one claim in the first hour, then no claims for three hours, the claimable reward would be initialReward - rewardDecay + (rewardBoost * 3)

Parameters

parameters
Omit<wagmi.ReadContractParameters, 'address' | 'args' | 'functionName' | 'abi'>

Optional parameters to pass to the underlying readContract method. Checkout wagmi’s documentation for more information. address, args, functionName, abi are handled for you under the hood.

Returns

Promise<bigint>
bigint

Returns reward as of this moment in time

totalBudget

Retrieves the total amount this incentive is allowed to distribute.

Parameters

parameters
Omit<wagmi.ReadContractParameters, 'address' | 'args' | 'functionName' | 'abi'>

Optional parameters to pass to the underlying readContract method. Checkout wagmi’s documentation for more information. address, args, functionName, abi are handled for you under the hood.

Returns

Promise<bigint>
bigint

Returns the budget

cgdaParams

Retrieves the total amount this incentive is allowed to distribute.

Parameters

parameters
Omit<wagmi.ReadContractParameters, 'address' | 'args' | 'functionName' | 'abi'>

Optional parameters to pass to the underlying readContract method. Checkout wagmi’s documentation for more information. address, args, functionName, abi are handled for you under the hood.

Returns

Promise<CGDAParameters>