Learn about how to interact with an ERC20 Variable Criteria Incentive using the SDK
The ERC20 Variable Criteria Incentive is a protocol incentive that allows for a variable distribution of native and ERC-20 assets, with each claim amount being determined dynamically at claim time depending on a value extracted from a provided transaction.
On Boost creation, a predetermined amount of the specified asset is transferred into this incentive from the associated budget.
The Boost V2 Docs are under active development and will be subject to changes.
Read the smart contracts
See technical documentation
See the source
Unlike budgets, allowlists, and validators, incentives cannot be re-used between multiple Boosts.
The incentive criteria determines how the reward amount is extracted from transaction data. You can configure it to read values from either contract events or function calls.
The criteria object requires four fields:
criteriaType
: Either SignatureType.EVENT
for event logs or SignatureType.FUNC
for function callssignature
: The event or function signature to match againstfieldIndex
: Which parameter in the event/function to extract the value from (0-based index)targetContract
: The contract address to watch for the event/functionYou can use the @boostxyz/signatures
package to get pre-defined event signatures instead of using raw hex values. For example: import { selectors } from '@boostxyz/signatures/events'
Here’s an example setting up criteria to extract an amount from a Transfer event:
Here’s an example setting up criteria to extract an amount from a mint function:
The extracted value will be used to calculate the reward amount, which is then capped by the maxReward
parameter if necessary.
Learn about how to interact with an ERC20 Variable Criteria Incentive using the SDK
The ERC20 Variable Criteria Incentive is a protocol incentive that allows for a variable distribution of native and ERC-20 assets, with each claim amount being determined dynamically at claim time depending on a value extracted from a provided transaction.
On Boost creation, a predetermined amount of the specified asset is transferred into this incentive from the associated budget.
The Boost V2 Docs are under active development and will be subject to changes.
Read the smart contracts
See technical documentation
See the source
Unlike budgets, allowlists, and validators, incentives cannot be re-used between multiple Boosts.
The incentive criteria determines how the reward amount is extracted from transaction data. You can configure it to read values from either contract events or function calls.
The criteria object requires four fields:
criteriaType
: Either SignatureType.EVENT
for event logs or SignatureType.FUNC
for function callssignature
: The event or function signature to match againstfieldIndex
: Which parameter in the event/function to extract the value from (0-based index)targetContract
: The contract address to watch for the event/functionYou can use the @boostxyz/signatures
package to get pre-defined event signatures instead of using raw hex values. For example: import { selectors } from '@boostxyz/signatures/events'
Here’s an example setting up criteria to extract an amount from a Transfer event:
Here’s an example setting up criteria to extract an amount from a mint function:
The extracted value will be used to calculate the reward amount, which is then capped by the maxReward
parameter if necessary.