Learn about how to interact with a Continuous Gradual Dutch Auction Incentive using the SDK
The Continuous Gradual Dutch Auction Incentive is a protocol incentive that allows for rewards that adjust dynamically based on claim volume. See this document for more information on gradual dutch auctions. On Boost creation, the incentive’s total budget 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.
import { BoostCore } from '@boostxyz/sdk/BoostCore'import { config } from "./config";const core = new BoostCore({ config });await core.createBoost({ maxParticipants: 10n, budget, action, allowList, incentives: [ core.CGDAIncentive({ asset: '0xERC20', // The address of the underlying asset, or zeroAddress for native token initialReward: 5n, // The initial amount for the first claim totalBudget: 10n, // The total amount distributable by this incentive rewardBoost: 1n, // How much to increase the reward each hour rewardDecay: 1n, // How much to subtract from the reward each hour manager: '0xBUDGET_ADDRESS', }), ],});
// if an incentive address is known, directly construct itconst incentive = core.CGDAIncentive("0xc55F719709bDad022B320E76f9DfF7e6F5680767")// or if you want a budget from a specific chainconst incentiveOnBase = core.CGDAIncentive( "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 CGDAIncentive)