Basket
Connect wallet
Documentation

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

  1. 01
    Launch
    Launch a coin on StonkFun, quoted against an xStock.
  2. 02
    Choose
    Point it at an existing basket, or found a new one by picking the stocks it accepts.
  3. 03
    Earn
    StonkFun forwards the creator share of every trade; the keeper sweeps it into the basket and mints you units.
  4. 04
    Hold
    Fees stay as the stocks they arrive in, so the mix follows the coins that join; the founder can add a weekly dividend.
  5. 05
    Exit
    Withdraw 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:

NAV = basket vault value (USD) ÷ basket units outstanding
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.

return = NAV per unit now + dividends paid per unit − $1.00
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:

  1. Slice. It fixes your exact slice of every stock in the vault: holding × your units ÷ all units.
  2. Sell. Each slice is swapped to wrapped SOL through Jupiter into the vault's own WSOL account, which exists only for this withdrawal.
  3. 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:

payout of stock S = vault balance of S × basket dividend rate
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

Raydium LaunchLab
Bonding curve: creates and trades every launch
Raydium CPMM
Pool each launch migrates to at graduation
Jupiter Aggregator v6
SOL dev-buy swaps and withdrawal swaps
Token-2022
Every launch mint and every xStock
SPL Token
Wrapped SOL account used to unwrap withdrawal proceeds
Associated Token Account
Creates holder and vault token accounts
Memo
Tags sweeps, dividends and withdrawals for public reconciliation
Compute Budget
Priority fees and compute limits
System
Rent, gas top-ups and SOL payouts

LaunchLab and StonkFun accounts

StonkFun platform (standard)
Platform config every Basket launch is created under
StonkFun platform (reward)
Taxed-launch platform; Basket does not use it
LaunchLab authority
PDA ["vault_auth_seed"]: signs for every pool vault
LaunchLab event authority
PDA ["__event_authority"]: CPI event log
Wrapped SOL mint
Withdrawal proceeds before unwrapping

Basket operator accounts

Operations wallet
Pays keeper fees, token-account rent and vault gas; relays withdrawal SOL within one transaction
Treasury
Receives the 1% withdrawal fee
Fee wallets
one per launch
Pool creator of each launch; listed on each token page and in /api/v1/tokens

Basket vaults

#6 Generational Wealth

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.

xStockMintLaunchLab GlobalConfigStonkFun curve rulePlatform fee vault
SPYxXsoCS1TfEyfFhfvj8EtZ528L3CaKBDBRqRapnBbDF2WB7ctMMdGvy46Am56myTtzfkNzt9kWZVTNGM2BWrJ9adgQYZp1YzqEHU67ngXphF9LAkxkxWGvpWEv3rXh4yDbWAF68CZpdXTVnQUMaRyuRFpfAddeVZgmtF3ickD7fBwW57
QQQxXs8S1uUs1zvS2p7iwtsG3b6fkhpvmwz4GYU3gWAmWHZ83KjqrTThSwY5dL1nDAf3Mi8eM9nZi33yM8Ntx2aJYuEF4Awa6pJvj2HG86ny1csdm17a3TvtHu4gy1cjNZ2uHeU7z7ZtsdMPi5fr7g2AJyigozwwYpwhHafHiQNHWbiBCk3
NVDAxXsc9qvGR1efVDFGLrVsmkzv3qi45LTBjeUKSPmx9qEh2NuVPU5ViAyQsZamVfJ1vU6Cp77WSzret4LtNTMiWFQ49MHtkhfnaBGgUPxThD67t1GYbYY7urggGvsat3AXWe9gFKREvMp4rLfBHu5edVF7bek4REhzunNsbVrKKW2aqpqE
AAPLxXsbEhLAtcf6HdfpFZ5xEMdqW8nfAvcsP5bdudRLJzJp9RkoV181ksAPNnZmGMyici4MgswhewW2hqvhkVd4DoHiJ99C7BUJDwtM79CT4nS2G64TpGAfcgtfqQHX9kcqMNSP3766zjPeSPztWqKHpi8oXPwX1BBq9GJXJPbRM8JFdR1j
MSFTxXspzcW1PRtgf6Wj92HCiZdjzKCyFekVD8P5Ueh3dRMXG9uCP4DwMDzMxQCQ38TnNGbVaoiAY2pP1BWd7rev1LmSAfS1PY5fpaEnrZsn8tEH354f98kzJUFNu8ttMyXJJw676AnL5J4nXBAj5FieoKVD3pxQ4hifqCURVsvpQmrnTdSV
AMZNxXs3eBt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C55WHjHBvG9JsMB7CWjTLyPy3uGDZazyFTPvdqKcLEPQNozBPWxg4wFRBgtDi9o3u4Ku7dGWCkwbF1yVHpUNxJNaMu18uAqJeD6sXmtYMiHyt5Ae4mMaBZqSv9WNSymvnVxhSMWNhmGzrK9kmQCCVBvY9sBc

13Public API

No key. Responses use { data } or { error: { code, message } }, the same envelope as StonkFun's.

GET/api/v1/basketsEvery active basket: accepted stocks, actual mix, value, NAV, return, P/L
GET/api/v1/baskets/{id}One basket: holdings, coins, sweeps, swaps, epochs, withdrawals
GET/api/v1/tokensEvery live launch with its basket, fee wallet and fees generated
GET/api/v1/holders/{wallet}Positions across baskets, launches, dividends and withdrawals
GET/api/launch/pricing?quoteMint=Live curve sizing for a quote xStock
POST/api/launch/prepareBuild a launch (joining or founding a basket) for your wallet to sign
POST/api/launch/confirmMark a launch live once its pool exists
POST/api/withdrawSubmit a wallet-signed withdrawal to SOL
GET/api/metadata/{mint}Token metadata JSON (the on-chain URI)