Create a Boost
How to create a boost using the Boost API
Overview
Creating a boost via the Boost API requires the following:
- An access token from the Boost API for the end user deploying the boost
- ActionParam type definitions from the BoostDK, which can be referenced here or installed with:
npm install @rabbitholegg/questdk
- The ABI file for the boost factory contract, which can be found here
- Project ID and task ID values for the chosen action to boost, queried from the Boost API
- An individual reward amount and boost participant limit
- An end time and optional start time
All of the above data is submitted to the POST /boosts endpoint, after which a transaction must be submitted to the blockchain on the reward token blockchain to deploy a new contract specific to the newly created boost.
Querying approved projects and tasks
Each action to be boosted consists of a project (e.g. Zora) and a task (e.g. “mint” or “create”), along with a network for the task. Some actions require specific action parameter values (e.g. contract address is required for the “mint” action), while other actions can be boosted with or without specific action parameters.
The ID values of projects and tasks approved for the Boost Protocol can be queried using the /manager/projects endpoint:
Populating the action parameters
Once the project, task, and network have been chosen, find the ActionParam type matching the chosen task type from the @rabbitholegg/questdk
package, and populate the values. This example will use the MintActionParams type.
Be sure to include a valid, mintable token ID when boosting an ERC-1155 mint. The Boost API simulates the on-chain action specified in each create boost request, and any failure stops the boost from being created.
Selecting a reward amount and participant limit
Each boost requires an individual reward amount of any ERC20 token as well as a maximum number of potential participants, which are used to calculate the total budget necessary for the boost. Choosing a proper individual reward amount is crucial for ensuring the boost performs well and has adequate participation, so the Boost API has tools to help with this process.
Getting an individual reward amount estimate (optional)
Once the reward token and chain have been specified by the end user, your application can optionally query the /manager/reward-estimate endpoint for a set of recommended individual reward amounts.
The three individual reward estimates returned, low
, mid
, and high
, are based on previous boost performance and current gas costs. Choosing the high
value is more likely to result in a higher number of boost completions.
Note that the end result of any boost may still be profit or loss for the boost deployer or boost reward claimers regardless of which if any reward estimate is chosen, depending on the specific action’s costs and fees, as well as on the price of gas at the time of boost completion.
Getting a mint reward amount estimate (optional)
For boosted mints specifically, the /manager/mint-reward-estimate endpoint provides a more specific reward amount estimate, which takes into account project fees and other mint-specific costs.
Calculating the maximum participant limit
After choosing an individual reward amount and desired total budget for the boost, the below formula can be used to calculate the participant limit. The feePercentage
variable represents a sum of the Boost protocol fee of 2.5% and affiliate referral fee of 2.5%.
Ultimately, any participant limit value up to the maximum participant value is valid. If a participant limit below the maximum is chosen, the boost contract will have funds leftover that can be withdrawn by the boost creator after the boost has ended.
Submitting the create boost request
After querying and selecting all the required values, the next step is to submit everything to the create boost endpoint:
Deploying the boost contract
The final step is to send a transaction to the blockchain of the chosen boost action network, calling a function on the boost factory contract to deploy a new contract specifically to the new boost. Below is an example using the viem
package to deploy a boost contract.
Find all the official BoostFactory contract at this address on all supported chains:
0x52629961F71C1C2564C5aa22372CB1b9fa9EBA3E
Boosts are created from the BoostFactory contract (still named “QuestFactory” on chain for now). This transaction also requires the ABI file for the boost factory contract, which can be found here.
Note that for the transaction submission, the reward amount is an integer value of the wei-equivalent denomination of the reward token, so for an individual reward of 1 $DEGEN for example, which uses 18 decimals, the rewardAmount
would be 1000000000000000000
. These values can also be found under reward.amount
and reward.decimals
in the response body from the create boost endpoint.
Once the above transaction succeeds, the boost has been created and will appear on all relevant Boost client apps! Use the Boost ID value from the create boost response to lookup the new boost on boost.xyz or through the boost details endpoint.