How Basket works
Basket is a token launchpad where every coin is paired with a tokenized stock, and every coin's creator fees fill a basket: a fund of xStocks with its own on-chain vault. Your share of a basket is the value your coins' fees put into it, and you can withdraw it to SOL whenever you like.
01Overview
- 01LaunchLaunch a coin on StonkFun, quoted against an xStock.
- 02ChoosePoint it at an existing basket, or found a new one by picking the stocks it accepts.
- 03EarnStonkFun forwards the creator share of every trade; the keeper sweeps it into the basket and mints you units.
- 04HoldFees stay as the stocks they arrive in, so the mix follows the coins that join; the founder can add a weekly dividend.
- 05ExitWithdraw any part of your units to SOL at any time, for a 1% fee.
02Launching a coin
A launch is one Solana transaction built by Basket and signed by you. It creates the coin's bonding-curve pool using StonkFun's standard platform config, the GlobalConfig for your chosen xStock, and StonkFun's curve-rule account. The pool has exactly the shape StonkFun's own launcher produces, so StonkFun adopts it within a minute or two: it gets a StonkFun token page, chart and fee forwarding like any launch made on their site.
One field is different, and it is what makes Basket work: the pool's creator is not your wallet. Basket generates a fresh fee wallet for each launch and sets it as creator. The creator does not need to sign, so the server co-signs only as the new mint. Your wallet pays rent and the network fee (about 0.02 SOL).
An optional dev buy is paid in SOL. The curve only accepts its quote stock, so you approve two transactions in one wallet prompt: first a Jupiter swap of your SOL into the stock, then the launch with a buy_exact_in for the swap's guaranteed minimum output appended. The launch and the dev buy are one atomic transaction, so nobody can trade before you. Because the swap allows 1% slippage, up to about 1% of the stock can be left over in your wallet.
- Supply is 1 billion, 6 decimals, Token-2022, with no transfer tax (a standard launch).
- The curve graduates once it raises the equivalent of 85 SOL in the xStock, then migrates to a regular trading pool with liquidity locked.
- Curve sizing comes live from StonkFun's pricing endpoint, in the xStock's own 8 decimals.
/api/launch/prepare returns the partially signed transaction. After you broadcast it, the page polls /api/launch/confirm, which marks the launch live once the pool exists on chain. The keeper runs the same check every minute, so closing the tab does not lose a launch.
03Baskets
A basket is a fund of xStocks. Baskets can only be created by launching a coin. When you launch, you either join an existing basket or found a new one in the same form: name it, pick the stocks it accepts (anywhere from 1 up to 10), and choose its weekly dividend (none, 5% or 10%).
- A new basket is saved as pending together with its founding launch, and becomes active only when that launch lands on chain. If the launch never lands, the basket is discarded.
- A coin can only feed a basket that holds the stock it is paired with. A founder's own pairing is always one of the new basket's stocks, and a later launch can only join a basket holding its pairing. Fees therefore arrive as a stock the basket keeps; they are never sold for SOL, USDC or anything outside the basket.
- Each basket gets its own vault wallet, so its holdings are visible on chain and never mixed with another basket's.
- There are no target weights. Each coin's fees stay as its own paired stock, so a basket's mix is set entirely by which coins join and how much fee they generate: a basket whose busiest coins are NVDAx-paired ends up mostly NVDAx. Each basket page shows how many coins and how much fee sit behind every stock.
- A basket's accepted stocks are fixed once founded, so later launches know exactly what they are joining.
- Each basket has its own units and NAV. Units in one basket say nothing about another.
04Where the fees go
Every curve trade pays a 1% fee in the quote xStock to StonkFun's platform. StonkFun forwards the creator's share (about 0.5% of every trade, on the curve and after graduation) to the pool's creator account. For a Basket launch that is the launch's fee wallet, so fees arrive already in a stock, and nothing has to be claimed.
Each launch has its own fee wallet, so attribution is exact: every token in a fee wallet came from that launch's trading and nowhere else. The token page shows the fee wallet's live balance waiting to be swept.
05Sweeps and units
Every five minutes the keeper checks every fee wallet. Any xStock balance worth at least $5.00 is moved into the launch's basket vault in one transaction, tagged with the memo basket:sweep:<basket>:<mint>:<units>. The launcher is then credited with units of that basket, priced at its NAV immediately before the sweep lands:
units minted = contribution value (USD) ÷ NAV
Pricing at the NAV before the sweep means a contribution never changes the value of anyone else's units: the basket grows by exactly the value of the units it issues. A new basket's first dollar mints one unit, so NAV starts at $1.00. Values use Jupiter's USD price for each xStock at sweep time.
06No rebalancing
The keeper never swaps one stock for another inside a basket. Fees land as the stock their coin is paired with and stay that way, so what a basket holds is exactly what its coins earned. The only swaps the keeper ever makes are when a holder withdraws: their own slice of each stock is sold for SOL, capped at 1.0% slippage per quote.
07Measuring performance
Every basket and every position is measured two ways, and both are shown throughout the site.
profit / loss = value held now + value paid out − fees deposited
- Return is the basket's time-weighted return, the same measure a fund publishes. Every basket's NAV starts at $1.00 and units are always issued and redeemed at NAV, so fees arriving or holders withdrawing never move it; only the stocks' prices do. It is how you compare one basket's stock picks with another's.
- Profit / loss is in dollars: what the fees deposited are worth now. Deposits are valued when they are swept in, value held uses live Jupiter prices, and value paid out counts dividends at their value when paid and withdrawals at the SOL they paid out (a holder's own P/L counts withdrawals after the 1% fee).
08Withdrawing to SOL
Any unit holder can withdraw any part of a position, at any time, straight to SOL. You sign a short plain-text message in your wallet (not a transaction, and it costs nothing) naming the basket, the units, a one-time nonce and a 10-minute expiry. The server checks the signature against your wallet and moves those units into escrow immediately, so they can't be withdrawn twice.
The keeper then processes the withdrawal:
- Slice. It fixes your exact slice of every stock in the vault:
holding × your units ÷ all units. - Sell. Each slice is swapped to wrapped SOL through Jupiter into the vault's own WSOL account, which exists only for this withdrawal.
- Pay. In one transaction the WSOL account is closed (unwrapped) and exactly its balance is paid out: 99% to you, 1% to the treasury.
You bear your own slippage, so the holders who stay are unaffected. Slices worth under $0.50 aren't worth a swap and stay in the basket. Withdrawals start at $5, and a basket processes one withdrawal at a time, usually within a few minutes. If a swap would move the price more than 3%, that slice waits for liquidity.
09Dividends
A basket founded with a dividend pays it every Friday at 21:00 UTC, after the US close. At that moment the keeper snapshots every holder's units and the vault's balances, then allocates:
your share of S = payout of S × your units ÷ all units
You receive a slice of every stock the basket holds, sent to your wallet as the xStocks themselves, with your token accounts created for you. Wallets owed less than $1.00 in a week are skipped; their slice stays in the vault and remains theirs. NAV falls by the amount paid out, exactly as a fund's price does on its ex-dividend date. Separately, Backed Finance reinvests the real underlying stock dividends into each xStock.
10Keeper safety
- Journal before broadcast. Every keeper transaction is signed and its signature and blockhash expiry are written to the database before it is sent. After a crash, each unresolved transaction is looked up on chain: if it landed, its bookkeeping is completed; if its blockhash expired, it is known never to land and is retried.
- Idempotent ledger. Sweeps, swaps, payouts and withdrawals are keyed by transaction signature or nonce, so replays cannot double-credit units or double-pay.
- Simulate first. Every transaction is simulated before broadcast and dropped if it would fail.
- One job at a time. Jobs run sequentially in one process; dividends pause for a basket while it has a withdrawal in progress.
- Encrypted keys. Fee-wallet and basket-vault keys are stored with AES-256-GCM under a secret held only in the server environment.
11Trust model and risks
Basket is a custodial keeper, not an on-chain program. The vaults and fee wallets are keys held by the operator, and the units ledger is a database. What keeps it honest is that every step is public: every vault's holdings and every sweep, swap, payout and withdrawal are on chain and tagged with memos, so anyone can recompute every holder's units from chain history and check them against the published ledger.
- xStocks are not available to US persons, and neither is Basket.
- A service that pools assets and pays distributions may be regulated as a collective investment in some jurisdictions. Take legal advice first.
- xStocks trade 24/7 but the underlying stocks do not; weekend prices can gap at the Monday open.
- Fee income depends on trading that may never happen. A token can lose all of its value.
12Solana addresses
Programs
LaunchLab and StonkFun accounts
Basket operator accounts
Basket vaults
Pairable xStocks
Each xStock has its own LaunchLab GlobalConfig, StonkFun curve-rule PDA (["platform_curve_rule", platform, global_config]) and StonkFun platform fee vault PDA. Per-launch accounts (pool, pool vaults) are PDAs of the mint and quote, shown on each token page.
13Public API
No key. Responses use { data } or { error: { code, message } }, the same envelope as StonkFun's.