Add Holdfast to your DBC launchpad
Three calls with @holdfast/sdk. Your launchpad keeps its curve, its UI and its users; holders get paid for staying.
Three calls
import { createLaunch, buy, crank, claim } from '@holdfast/sdk'
// 1. Launch: DFS fee vault → DBC hook config → pool + Holdfast launch
const launch = await createLaunch(conn, {
creator, treasury, name: 'My Token', symbol: 'MYT', uri,
preset: 'fairLaunch', network: 'mainnet',
})
for (const step of launch.steps) {
await signAndSend(await step.build(), step.signers) // one wallet prompt each
}
// 2. Trade: registers the buyer on first use, fixes the hook accounts
await signAndSend(await buy(conn, { owner, mint: launch.mint, solIn: 0.1 }))
// 3. Get paid: after graduation, route fees to holders and claim in SOL
for (const tx of await crank(conn, { mint, signer: creator })) await signAndSend(tx)
await signAndSend(await claim(conn, { owner, mint }))Show conviction in your UI
import { getLaunch, getHolderForOwner, getLeaderboard, projectedShare, claimable, explainError } from '@holdfast/sdk'
const launch = await getLaunch(conn, mint) // rules, totals, protectionEndsAt
const me = await getHolderForOwner(conn, mint, owner) // points, tracked balance, unlockTs
projectedShare(me, launch) // live share of all future rewards
claimable(me, launch) // lamports claimable now
await getLeaderboard(conn, mint, 20)
try { await send(tx) } catch (e) { toast(explainError(e)) } // "Snipe-locked until 14:32:05"Program
E5AkJh1QFPsVTBf6E3Z9MfUWENtb82TGK1hoytkKTEGw
- init_launch: right after DBC pool creation, same transaction.
- register: idempotent; prepended to a buyer’s first buy.
- execute: the Token-2022 transfer hook (~13k CU).
- finalize / sync_rewards / deposit_rewards / claim: graduation and rewards.
Safety caps (enforced on-chain)
- Opening window ≤ 10 min
- Snipe-lock ≤ 30 min
- Max wallet off or ≥ 0.5%
- After ≤ 40 min the hook cannot reject any transfer; at graduation DBC revokes it.
- Fixed supply required (mint authority revoked); rules can’t change after launch.
Accounts
Holder records are keyed by the token-account address, so the accounts a transfer needs are deterministic. During the bonding phase, trade through the SDK (or its patchHookAccounts): the stock DBC SDK resolves hook accounts with placeholder keys. After graduation the hook is gone and the token trades anywhere.
Questions, answered honestly
What is conviction, and how is it calculated?
Conviction is how much you hold × how long you hold it. Every transfer settles your points first (tracked balance × seconds since the last update) and then applies the move, so your points grow every second you hold, with no action from you.
Your share of the rewards is your points divided by everyone’s points. Points are linear in balance, so splitting a bag across wallets gains nothing.
Can Holdfast block me from selling?
Only at the start, and only for a bounded time. The rules are fixed at launch, and the program caps them: an opening window of at most 10 minutes, then a snipe-lock of at most 30 minutes on tokens bought inside that window.
After launch + window + lock (40 minutes worst case) the hook cannot reject any transfer. Sells outside the window are never blocked, and tokens bought after the window are never locked. The hook can reject in exactly three ways: RecipientNotRegistered and MaxWalletExceeded (window only) and SnipeLocked (only until your lock ends, and the error tells you when).
What happens at graduation?
When the bonding curve completes, Meteora’s DBC program revokes the transfer hook, so the token becomes a plain Token-2022 token that trades anywhere. The liquidity moves to a DAMM v2 pool (Compounding mode, with the partner LP locked forever). Holdfast freezes everyone’s conviction at that moment; from then on it is the fixed basis for splitting fees.
Where do the rewards come from, and who gets them?
From the launch’s own trading fees: first the bonding-curve fees, then the DAMM v2 LP fees for as long as the token trades. The fee stream is split between holders, the creator and a treasury (the default is 60 / 30 / 10, set at launch).
The holders’ part is paid out pro rata by final conviction points, in SOL. You claim it yourself from the token page. Only wallets registered with Holdfast earn; registration happens automatically on your first buy through the app or SDK.
What does selling cost me?
You forfeit points in proportion to what you move out. Sell 30% of your tracked balance and you lose 30% of your points; sell everything and you are back to zero. Moving tokens to another wallet counts the same, so it is not a way to hide a bag. The token page shows a preview of the loss before you sell. Selling is never forbidden after the opening rules end: it only costs you your place in the fee stream.
Is it live on mainnet?
No. This is a devnet demo, and it is not audited. The program was reviewed by its builders only (see docs/SECURITY.md), and that review found and fixed a real bug. It is tested against the real Meteora programs on a local validator, and end to end in a browser on devnet.
Known limits: the program is still upgradeable by its deployer (it would be made immutable before any mainnet use), and devnet fee splitting trusts a keeper (see below). Do not put real money behind it.
Why can’t I trade it on Jupiter during the bonding phase?
A transfer hook needs extra accounts on every transfer: here, the sender’s and receiver’s Holdfast records. The stock Meteora DBC SDK fills those in with placeholder keys, and aggregators generally don’t route hook tokens, so a plain swap fails. Trade through this app or @holdfast/sdk (which patches the accounts).
After graduation the hook is gone and the token trades like any other, including on aggregators.
How does a launchpad integrate it?
Three calls from @holdfast/sdk: createLaunch (a normal DBC launch on a Token-2022 mint whose hook is Holdfast), buy (registers the buyer on first use and fixes the hook accounts), and claim after graduation. The code is at the top of this page. Your launchpad keeps its curve, UI and users.
What’s the difference between the devnet and mainnet fee split?
Devnet uses a keeper. The devnet build of Meteora’s Dynamic Fee Sharing lacks a whitelist entry that hook pools need, so there the creator’s wallet claims the fees and deposits the holders’ share. That means holders trust the keeper to deposit honestly. Everything you see on devnet, including the Arena, worked this way.
Mainnet uses Dynamic Fee Sharing. A Meteora vault is the fee claimer and splits fees on-chain between holders, creator and treasury, with no one in the middle. That path is tested end to end against the mainnet program binaries, but it has not been run on mainnet.