Skip to main content

Documentation Index

Fetch the complete documentation index at: https://blank.build/docs/llms.txt

Use this file to discover all available pages before exploring further.

Developer Staking

There are two different things you can do with staking from the SDK:
  1. Route part of trading fees to stakers. Prefer doing this directly in blank.launch.create().
  2. Drop in an external creator-funded bonus. Done any time, as often as you want.

1. Enable staking at launch

For new tokens, include staking in the launch input:
const result = await blank.launch.create(
  {
    name: "Example Token",
    symbol: "EXAMPLE",
    metadataUri: "ipfs://bafy.../metadata.json",
    staking: {
      shareBps: 2_000, // 20% of the creator's fee share goes to stakers
    },
  },
  wallet
);
shareBps is in basis points (100 bps = 1%). Valid range: 100 to 10,000, i.e. 1% to 100%.

Enable staking after launch

If a token was launched without staking, the current token controller can enable it later:
await blank.staking.enable(
  {
    mint: result.mintAddress,
    stakingShareBps: 2_000, // 20% of the creator's fee share goes to stakers
  },
  wallet
);
The signed-in wallet has to be the current token controller. If staking is already on, the call returns success with the existing pool — no new transaction is built, so nothing extra to sign.

2. Top up the staking pool

If your project wants to add a creator-funded SOL bonus to stakers, choose the amount yourself and call topUp:
await blank.staking.topUp(
  {
    mint: result.mintAddress,
    amountLamports: 1_500_000_000n, // 1.5 SOL
  },
  wallet
);
The SDK converts lamports to a SOL string, builds the transaction, and submits it after your wallet signs.

Things that have to be true

A top-up only works when all of these are satisfied:
  • You’re authenticated as the current token controller.
  • Staking is enabled in our database.
  • The on-chain staking pool exists.
  • The staking program and pool are not paused.
  • There’s at least one active staker other than the controller.
  • Amount is greater than zero and at most 10,000 SOL.
That last one — needing at least one non-controller staker — is the most common stumble. There has to be someone to actually distribute the bonus to.

Preview before signing

If you want to see what the distribution looks like before signing:
GET /api/token/{mint}/staking/top-up/preview?amount=1.5
Authorization: Bearer <blank-user-token>
Heads up: the SDK doesn’t wrap this preview endpoint yet, so you’d call it directly.