Koine docs

Fees: who pays what, and who gets it

There are three fees: a launch fee paid by the creator, the pool's trading fee, and Koine's fee on trades made from a Koine wallet. This page lists each one, where it goes, and the math from one to the other.

All amounts are in SOL.

What does it cost to launch a coin? #

The creator pays a launch fee to the Koine treasury in a transaction they sign. The default in the code is 0.25 SOL. The operator can change it with LAUNCH_FEE_SOL.

The keeper pays the rent and network fees for creating the token, pool and vault. The creator doesn't pay those.

Source: app/server/config.ts (RULES.launchFeeSol), app/server/launch.ts (prepareLaunch, checkFee, createLaunch).

Does depositing in the presale cost anything? #

No Koine fee. The vault has no escrow fee (escrowFee: 0). You pay Solana network fees and, for a first deposit, rent for your escrow account.

Your SOL then pays the pool's fee floor (about 1%) when the vault makes its one buy. See how-it-works.md.

Source: app/server/launch.ts (vault creation), app/scripts/launch-check.ts (vault-buy).

What is the trading fee? #

Every swap in the pool pays a fee in SOL, on buys and sells. The pool takes it in SOL only (CollectFeeMode.OnlyB).

  • At open: 99%, falling by about 4.49% of its value each second.
  • From 100 s after open: about 1%, for the life of the pool.

The full schedule is in how-it-works.md.

Source: app/server/config.ts (RULES.fee), app/server/launch.ts (poolFees, collectFeeMode).

How does Meteora split the trading fee? #

Meteora's DAMM v2 program splits every trading fee before Koine touches it:

  • 20% is Meteora's protocol fee;
  • if the swap names a referral account, 20% of that protocol fee (4% of the whole fee) goes to the referral account instead;
  • 80% goes to the pool's liquidity position.

Koine holds the liquidity position, so Koine's keeper claims that 80%. These percentages are in each pool's state (protocolFeePercent: 20, referralFeePercent: 20). They are set by Meteora's program, not by Koine's code. launch-check.ts prints the protocol share it reads from the pool (pool-config).

Every swap's fee parts are stored by Koine's swap indexer, and each coin's receipt adds them up.

Source: Meteora DAMM v2 pool state (poolFees.protocolFeePercent, poolFees.referralFeePercent), app/server/damm.ts (swapsIn), app/server/indexer.ts, app/scripts/launch-check.ts (pool-config).

Where do the fees from the first 100 seconds go? #

The position's fees earned up to the spike claim are split:

Share of the spike fees Goes to
75% buyback and burn of that coin
25% the Koine treasury

That includes the vault buy's ~1% fee and every fee from the 99%-to-1% window.

The keeper claims them on its first tick at or after open + 100 s, into the buyback wallet, and pays the platform's 25% from there to the treasury. The steward gets none of it. If they come to less than 0.0001 SOL, the keeper doesn't claim them then: they stay in the pool and are split 40/20/40 with the first hourly claim.

Meteora's 20% and any referral share are taken from these fees too, as from every fee. So of the whole spike trading fee, buyback gets 80% × 75% = 60% and the platform 80% × 25% = 20%.

Launches whose spike claim ran before this split sent all of the spike fees to buyback.

Source: app/server/keeper.ts (claimSpike, spikeSplit, claimToBuyback, payOut), app/server/config.ts (RULES.spikeSeconds, FEES.spikePlatformPct).

Where do the fees after that go? #

Every hour (3,600 s after the last claim), the keeper claims the position's fees and splits them:

Share of the claimed fees Goes to
40% the coin's steward (the creator to start with), if they pass the steward checks that hour; otherwise buyback and burn
20% buyback and burn of that coin
40% the Koine treasury

Because the claimed fees are 80% of the trading fee, each share of the whole trading fee is:

  • steward: 80% × 40% = 32%;
  • buyback: 80% × 20% = 16% (48% in an hour the steward fails the checks);
  • platform: 80% × 40% = 32%;
  • Meteora: 20%.

Example: 1 SOL of buys at the 1% floor pays 0.01 SOL in fees. Meteora gets 0.002 SOL, the steward 0.0032 SOL, buyback 0.0016 SOL and the platform 0.0032 SOL.

Claims made before this split were split 40% steward, 30% buyback, 30% platform.

Before each claim, the keeper simulates it (nothing is sent) and reads how much SOL the pool program says it would move. Claims under 0.0001 SOL wait for the next hour. Payouts to the treasury under 0.001 SOL also wait and add up, and a steward can claim once at least 0.001 SOL is owed.

The split uses the SOL each claim actually took from the pool, read from the pool program's claim event in the claim transaction. That includes fees earned between the simulation and the claim. If the event can't be read, the keeper records the amount the simulation reported.

Source: app/server/keeper.ts (claimFees, feeSplit, claimToBuyback, simulatedClaim, claimedSol, payOut, MIN_CLAIM_LAMPORTS), app/server/config.ts (FEES.claimSeconds, FEES.creatorPct, FEES.buybackPct, FEES.platformPct, FEES.minPayoutSol).

How is the steward paid? #

In SOL, from the buyback wallet, when they claim it: the steward presses Claim on the coin page, signed in as the steward account, and Koine pays the steward wallet everything they're owed if their latest update is less than 24 hours old. Each share is owed to the wallet that was steward at the hourly claim it came from. On a handover or a vote, the old steward is paid what they're owed automatically. The split and the payout are done by Koine's server. No on-chain program enforces them. See trust.md.

Source: app/server/keeper.ts (claimFees, claimShare, payOut), app/server/steward.ts (claimCheck), app/server/store.ts (creator_shares, creditCreator).

How does the buyback work? #

The buyback budget for a coin is:

75% of the spike fees + the 20% buyback share + any steward share forfeited − SOL already spent

Every hour (BUYBACK_SLICE_SECONDS, default 3,600 s), if at least 0.0005 SOL is left, the keeper buys the coin with one slice and burns every token the buyback wallet then holds. The slice size spreads the budget evenly until 7 days (168 h) after the fee floor:

slice = budget left ÷ hours left until open + 100 s + 168 h (at least 0.0005 SOL)

After those 7 days, any new budget is spent in full at the next hourly slice. Burned tokens are gone from the supply for good. Each buy and burn is in the coin's log with its transaction.

Buybacks are swaps in the pool, so they also pay the ~1% fee, which goes back into the fee pot like any other.

Each buyback sets a minimum output: a fresh quote less 1% (BUYBACK_SLIPPAGE_BPS, default 100). Buybacks only start after the spike claim, when the fee is at its 1% floor, so the quote is close to the fill. If the price moves more than that, the swap fails, the error is logged, and the keeper tries again on its next pass.

Source: app/server/keeper.ts (buyback, buybackLeft, SLICE_SECONDS), app/server/tx.ts (minOut), app/server/config.ts (RULES.buybackHours, SLIPPAGE.buybackBps).

What does Koine charge on trades from a Koine wallet? #

Trades on Koine's site (the coin page's trade panel and the terminal) run from the trader's Koine wallet through Koine's trading service. Each pays Koine's fee in the same transaction, to Koine's fee wallet:

  • Buys: 1% of the SOL spent.
  • Sells: 1% of the least SOL the sale can return (its minimum after slippage).
  • Referred traders pay 10% less: 0.9%.

This is on top of the pool's trading fee, which every trade pays wherever it's made. Swaps made elsewhere (an aggregator, another wallet app) pay Koine nothing.

The launchpad's API also has a direct swap route (POST /api/tx/swap) that adds a 0.5% fee on buys and names the treasury as Meteora's referral; Koine's site doesn't use it.

Source: trade/server/config.ts (feeBps), trade/server/orders.ts (fee), trade/server/referrals.ts (DISCOUNT_BPS, feeBpsFor), app/web/src/Trade.tsx, app/server/tx.ts (swapTx), app/server/config.ts (RULES.frontendFeeBps).

How does Koine make money, in total? #

  • the launch fee;
  • 25% of the spike fees (20% of the trading fee in the first 100 seconds);
  • 40% of the position's fees after that (32% of the trading fee);
  • 1% of trades made from Koine wallets (0.9% for referred traders).

Koine has no other income in this code.

Source: app/server/config.ts, app/server/keeper.ts, trade/server/config.ts, trade/server/orders.ts.

What happens to fees when Squads custody is on? #

Squads custody is off unless the operator sets SQUADS_MULTISIG and SQUADS_SPENDING_LIMIT. When it's on:

  • after the spike claim, the position moves to a Squads multisig vault;
  • hourly claims land in that vault; the platform's 40% stays there;
  • the steward and buyback shares (60%) move to the buyback wallet through a Squads spending limit, and the steward's claims are paid from there;
  • the treasury defaults to the multisig vault, unless TREASURY is set.

The split itself doesn't change. See trust.md.

Source: app/server/config.ts (SQUADS, TREASURY), app/server/keeper.ts (custody, drainMultisig, msOwed), app/server/squads.ts.