How creator fees become
deeper liquidity.
A technical reference for how every coin launched here is created on Raydium LaunchLab under the StonkFun platform, how its creator fees are split into the coin and its quote token, and how both sides are deposited into the coin's Raydium pool with the LP burned.
On this page
Overview#
Every coin launched here is a standard Raydium LaunchLab launch: a Token-2022 mint created with initialize_with_token2022, 1,000,000,000 supply, a constant-product bonding curve that migrates to a Raydium CPMM pool when it completes. It is attributed to the StonkFun platform, so it shows up on StonkFun with its token page, chart and fee forwarding. The only difference is who the pool's creator is.
Normally the creator's share of trading fees is income for whoever launched the coin. Here, the creator is a per-coin engine wallet, and a keeper process turns its income into liquidity: half the value is converted into the coin, the two sides are deposited into the coin's pool, and the LP tokens are burned.
Paired with anything#
A coin can pair against any quote token StonkFun lists as launchable: SOL, stablecoins, xStocks, PreStocks, Backpack and Tessera assets, and community coins. The quote is what the bonding curve raises and the other side of the pool after graduation, so a coin paired with NVDAX is priced in NVDAX and its liquidity is NVDAX.
- The curve is sized per quote from StonkFun's
/launchlab/pricing:totalFundRaisingBis the raw raise in the quote's own decimals, chosen so every pair opens and graduates at the same USD market cap. - Fees, inventory and deposits are all in the coin's quote token. Thresholds are set in USD so they mean the same on every pair.
- A dev buy is paid in the quote token, so launching against anything but SOL needs that token in your wallet.
Coin lifecycle#
| Phase | Where fees go | What the engine does |
|---|---|---|
| Launch | — | The coin is minted with its own engine wallet as the LaunchLab creator. The launcher signs as fee payer and can add a dev buy. |
| On the curve | StonkFun forwards the creator share to the engine wallet | Buys the coin on the curve with half the value and holds the rest in the quote token: a 50/50 inventory. |
| Graduation | — | LaunchLab migrates the curve's liquidity into a Raydium CPMM pool. The engine's inventory is now deployable. |
| In the pool | StonkFun keeps forwarding the creator share | Rebalances to the pool price, deposits both sides, burns the LP. |
The liquidity engine#
Each keeper cycle runs four steps per coin. Each step is its own transaction, simulated before it is sent.
1 · Collect#
StonkFun takes the pool's 1% platform fee and forwards the creator's share to the pool creator, the engine wallet, in the quote token. There is nothing to sign for it: the engine books whatever arrived since its last snapshot as fees. For SOL pairs, any WSOL is unwrapped first. If anything has accrued in the LaunchLab creator vault instead (older fee shapes do), it is claimed with claim_creator_fee once it is worth $1.
2 · Split#
The engine targets an inventory that is 50% coin and 50% quote by value. Before graduation it buys on the bonding curve with buy_exact_in; after graduation it buys in the CPMM pool with swap_base_input. The buy size comes from the rebalance math, so tokens left over from earlier rounds are used before buying more.
3 · Deposit#
Once the coin has graduated and the quote inventory is worth at least $2, the engine deposits into the pool. It asks for the LP that both sides of its inventory can back, less 2% headroom, and caps each side at what it holds, so a small price move still fits. Dust that does not pair stays in inventory for the next cycle.
4 · Burn#
The LP tokens minted by the deposit are burned with an SPL Burn in the same transaction. The pool keeps the reserves; nobody holds the claim on them. Each coin page shows the pool's burned share as lp_burned / lp_supply.
Rebalance math#
Let Q be spendable quote (for SOL pairs, the balance minus the 0.01 SOL rent reserve), T the engine's token balance and p the price in quote per token.
On the curve (p = (virtualB + realB) / (virtualA − realA)):
value = Q + T·p
buy = value · 0.5 − T·p // bring the coin side to 50%
if buy ≥ $0.25 and buy ≤ Q: buy_exact_in(buy)
In the CPMM pool (p = quoteReserve / coinReserve):
buy = (Q − T·p) / 2 // equal value on both sides at the pool price
if buy ≥ $0.25: swap_base_input(buy)
Deposit:
lp = min(T · lpSupply / coinReserve,
Q · lpSupply / quoteReserve) · (1 − 2%)
deposit(lp, maxCoin = T, maxQuote = Q) + burn(lp)Because the pool buy happens immediately before the deposit, the post-buy price is slightly above p. The headroom on lp absorbs that drift; the unpaired remainder is a few basis points and is deployed next cycle.
Engine wallets#
Each coin has its own engine wallet, derived from a master seed and the mint, and set as the pool's creator at launch, so its fees, inventory and deposits never mix with another coin's. No private key is stored; the keeper re-derives it each cycle. The engine wallet keeps a 0.01 SOL reserve for token-account rent that is never deployed, and the keeper wallet tops it up and pays every network fee.
Transactions#
| Step | Instructions | Signers |
|---|---|---|
| Launch | ComputeBudget · initialize_with_token2022 (+ allow-config, curve-rule accounts) · optional wrap · buy_exact_in · unwrap | launcher, mint |
| Collect | ComputeBudget · CloseAccount(WSOL) or claim_creator_fee | keeper, engine |
| Curve buy | ComputeBudget · create ATAs (idempotent) · wrap · buy_exact_in · unwrap | keeper, engine |
| Pool buy | ComputeBudget · create ATAs (idempotent) · wrap · swap_base_input · unwrap | keeper, engine |
| Deposit + burn | ComputeBudget · create LP ATA · wrap · deposit · Burn(LP) · unwrap | keeper, engine |
Wrap and unwrap only appear on SOL pairs. All engine transactions are v0 with a 600k compute-unit limit.
Why the graduated pool#
A LaunchLab coin graduates into one Raydium CPMM pool, and that is where its price and volume live. Depositing anywhere else would split liquidity across venues, leave the main pool thin, and hand the spread between them to arbitrageurs. Deepening the pool the coin graduated into is the only placement that lowers slippage for every trader. It also closes the loop: trades in that pool keep paying the creator share back into the engine.
The keeper#
An off-chain keeper runs the engine around the clock. Every 15 seconds it:
- Refreshes LaunchLab curve state for every live coin, which decides whether it trades on the curve or in its pool.
- Runs collect → split → deposit → burn for every coin, several coins in parallel.
- Indexes new trades and refreshes holders for the site.
Trade indexing#
Trades come from chain, so trades placed on StonkFun, Raydium or any aggregator appear too. The keeper pages getSignaturesForAddress on the LaunchLab pool and, after graduation, on the CPMM pool, then parses each transaction with jsonParsed:
- Side and size come from the trader: the largest change in the coin balance outside the venue.
- Quote amount is the venue vaults' quote delta. When the coin and the quote move the same way it is a deposit or withdrawal, not a trade, and it is skipped.
Failure handling#
| Failure | Behaviour |
|---|---|
| Simulation fails | Nothing is sent. An error row is written to the engine log (deduplicated for 10 minutes) and the step retries next cycle. |
| Sent but not confirmed | Resent with a fresh blockhash only once the old one has expired, so a step never runs twice. The next cycle reads real balances. |
| Keeper offline | Forwarded fees wait on the engine wallet. Nothing is lost; the next run picks everything up. |
| No USD price for the quote | The engine skips that coin until a price is available, so thresholds are never misjudged. |
| Coin never graduates | Inventory stays on the engine wallet as coin + quote. Its buys still supported the price on the curve. |
Parameters#
The live values the engine runs with.
| Key | Value | Note |
|---|---|---|
fees.source | Creator share, forwarded | StonkFun takes the pool's 1% fee and forwards the creator's share to the coin's engine wallet, in the quote token. |
claim.minUsd | 1 USD | Anything left in the LaunchLab creator vault is claimed once it is worth this much. |
split.tokenBps | 50% | Target share of inventory value held as the coin. |
split.rebalance | Pool ratio | After graduation, buys only what is needed to pair the quote at the pool price. |
swap.curve.slippage | 3% | buy_exact_in on the bonding curve before graduation. |
swap.amm.slippage | 3% | swap_base_input on the graduated pool. |
deposit.minUsd | 2 USD | Inventory below this keeps accumulating. |
deposit.slippage | 2% | Headroom between the LP asked for and the inventory that backs it. |
lp.mode | Burn | Burned in the deposit transaction: added liquidity can never be withdrawn. |
reserve.sol | 0.01 SOL | Never deployed; pays token-account rent. Topped up by the keeper. |
keeper.cycle | 15 s | Refresh curves → claim, split, deposit, burn → index trades. |
keeper.feePayer | Keeper wallet | Pays every network fee and tops up engine wallets' rent reserve. |
launch.creator | Engine wallet | Each coin's own engine wallet is the pool creator, so StonkFun forwards its fees there. Fixed at mint. |
launch.pair | Any StonkFun pair | SOL, stables, xStocks, PreStocks, memes: whatever StonkFun lists as launchable. |
launch.supply | 1,000,000,000 | Token-2022, 6 decimals, standard launch: no transfer tax. |
Trust model#
- Trading, curve math, graduation and pool accounting are Raydium's LaunchLab and CPMM programs. The site only builds transactions.
- Fee forwarding is StonkFun's: it pays the creator share to each coin's engine wallet.
- Forwarded fees and inventory sit in each coin's engine wallet until the keeper deploys them.
- LP that has been burned is out of anyone's reach, the operator included.
- Every engine action is a public transaction linked from the Engine page.
- The server only relays transactions against the prepared mint and fee payer, through the LaunchLab program.
FAQ#
Does the creator earn anything?+
No creator fee income. Creators get a coin whose liquidity grows with its volume, and can take the dev buy in the launch transaction.
What can a coin pair with?+
Anything StonkFun lists as launchable when you launch: SOL, USDC, xStocks like NVDAX or SPYX, and more. See Paired with anything.
What happens to fees before graduation?+
They are split: half buys the coin on the curve, half is held in the quote token. That inventory is deposited the moment the coin graduates.
Can the added liquidity be pulled?+
No. The LP tokens are burned in the same transaction as the deposit.
Does my coin show up on StonkFun?+
Yes. Launches carry StonkFun's platform id and match its launch shape, so StonkFun adopts them like its own.