Learn about how to interact with an ERC20PeggedIncentive using the SDK
The ERC20 Pegged Incentive is a specialized protocol incentive that allows for the distribution of ERC-20 assets with rewards pegged to the value of another token. This enables creating rewards that maintain a specific value relative to a pegged asset. When users claim rewards, they receive an amount of the reward token equivalent in value to the pegged amount.
The Boost V2 Docs are under active development and will be subject to changes.
Rewards pegged to the value of another token (e.g., USDC) or native chain token (e.g., ETH)
Dynamic reward amounts based on current price ratios
Supports any ERC20 token as the reward asset
Total distribution limit in reward asset tokens
Managed access for incentive control and clawbacks
Unlike budgets, allowlists, and validators, incentives cannot be re-used between multiple Boosts.
To peg rewards to the chain’s native token (e.g., ETH), use zeroAddress (0x0000000000000000000000000000000000000000) as the peg parameter. This tells the protocol to use the native token’s price for calculations.
import { BoostCore } from '@boostxyz/sdk/BoostCore'import { config } from "./config";import { parseUnits, zeroAddress } from 'viem'const core = new BoostCore({ config });await core.createBoost({ maxParticipants: 10n, budget, action, allowList, incentives: [ core.ERC20PeggedIncentive({ asset: '0xRewardToken', // token that will be distributed peg: '0xPeggedToken' || zeroAddress, // token to peg the reward value to (e.g., USDC or ETH) reward: parseUnits("1", 6), // amount in pegged token value (e.g., 1 USDC worth) limit: parseUnits("1000", 18), // maximum total amount of asset token (in wei) that can be distributed as rewards manager: "0xManager", // address with administrative control over the incentive }), ],});
The manager parameter specifies an address that has administrative control over the incentive. This address can perform management operations like triggering clawbacks of undistributed rewards if needed.
// if an incentive address is known, directly construct itconst incentive = core.ERC20PeggedIncentive("0xc55F719709bDad022B320E76f9DfF7e6F5680767")// or if you want a budget from a specific chainconst incentiveOnBase = core.ERC20PeggedIncentive( "0xc55F719709bDad022B320E76f9DfF7e6F5680767", { chainId: 8453 })// or accessible off of a a pre-exiting Boostconst boost = await core.getBoost(0n)const incentive = boost.incentives.find((incentive) => incentive instanceof ERC20PeggedIncentive)