The ERC20 Variable 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. 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.

Key Features

  • Supports native assets as well as any ERC20
  • Rewards dynamic at claim time

Unlike budgets, allowlists, and validators, incentives cannot be re-used between multiple Boosts.

Create a new ERC20VariableIncentive

Get an existing ERC20VariableIncentive

Sign a claim amount

// Get the index of the incentive to claim
const incentiveIndex = boost.incentives.findIndex(incentive => incentive instanceof ERC20VariableCriteriaIncentive)

// build claim data, signing a variable amount for the incentive
const allClaimData = boost.incentives.map(incentive => {
  if (incentive instanceof ERC20VariableIncentive || incentive instanceof ERC20VariableCriteriaIncentive) {
    const rewardAmount = parseUnits("10", 18);
    return incentive.buildClaimData(rewardAmount);
  } else {
    return ''
  }
})

// Sign a valid transaction with the variable reward amount
const { data } = await axios.get('/signatures', {
  params: {
    boostId: `${chainId}:${boost.id}`,
    txHash,
    claimData: allClaimData.join(',')
  }
});

// claim the ERC20VariableIncentive
const { signature, incentiveId, claimant } = data.at(incentiveIndex);
await core.claimIncentive(
  boost.id,
  incentiveId,
  claimant,
  signature,
);