Presales
The terminal can deposit into a Koine launch's presale from your Koine wallet, claim the tokens as a normal position, and set a buy for when trading opens.
Presales are off unless the trading service has LAUNCHPAD_URL set. The presale checks have unit tests (trade/server/presale.test.ts, approver/src/presales.test.ts). Privy's side of the presale rules hasn't been exercised with a real presale yet.
Source: trade/server/config.ts (launchpadUrl), trade/server/presale.ts (presalesOn), trade/server/presale.test.ts, approver/src/presales.test.ts, README.md
How a Koine presale works #
Every depositor gets the same price: the launch's vault (a Meteora Alpha Vault) buys once before trading opens, and that sets everyone's price. You can withdraw during the presale. After trading opens, a launch fee starts at 99% and falls to about 1%, and presale tokens unlock over a period after that. If the vault never bought, depositors can take a refund. The launchpad's own rules are outside these docs.
Source: trade/server/presale.ts (sendAlerts, Market), trade/server/bot.ts (presaleScreen)
Where you find them #
- Bot:
/presaleslists up to 10 open presales, closing soonest first. Pasting a Koine launch's address opens its presale screen while the presale is open or closed-but-not-trading, or while you have something to claim or refund. 🟢 Trade opens the normal card. - Web: the token page of a Koine launch shows a presale panel, and the terminal lists open presales. The launchpad's trade drawer (on any koine.markets coin page) deposits, withdraws, claims and refunds through the same calls, from the same Koine wallet.
Source: trade/server/bot.ts (presalesScreen, presaleScreen, showCard), trade/server/web.ts (presalesState, presaleState), app/web/src/terminal/components/terminal/Presale.tsx, app/web/src/Trade.tsx
Depositing #
- Bot buttons: 0.1, 0.25, 0.5 or 1 SOL, each with a confirm. The web takes any amount.
- No Koine fee.
- A deposit is checked like a buy: a buys halt, an account that isn't active, the balance (the amount plus 0.006 SOL for the network fee, escrow rent and a temporary wrapped-SOL account), and your knots. SOL you already have in presales counts as held for the size knots.
Source: trade/server/presale.ts (checkDeposit, NEEDS, act), trade/server/bot.ts (PRESALE_SOL)
What Koine signs #
The launchpad builds each presale transaction. Before asking Privy to sign, Koine checks every instruction: it must be paid by your wallet, and may only be compute budget, a token account, SOL into your own wrapped-SOL account, wrapping SOL, closing a token account back to you, or the Alpha Vault instructions that action needs, on that launch's vault, with your wallet as the escrow owner, to or from your own accounts, and for a deposit or withdrawal exactly the amount you asked. Anything else and nothing is signed. The swap policy also allows these Alpha Vault instructions only with your wallet's own escrow and wrapped-SOL account.
One presale action per trader runs at a time. A send that isn't confirmed within 60 seconds is settled from chain by a once-a-minute check, once it's 90 seconds old; one that never lands is marked failed after 10 minutes.
With swap co-signing on, the withdrawal approver checks each presale transaction again on its own, from the chain: your escrow, your own accounts, and a vault whose pool Koine's launchpad keeper created. See security.md.
Source: trade/server/presale.ts (checkPresaleTx, presaleAction, settlePending), trade/server/policy.ts (swapRules), trade/server/presale.test.ts, approver/src/swaps.ts (checkPresale)
Withdrawing, claiming and refunds #
- Withdraw: during the presale. The bot offers ↩️ Withdraw all, and the web Withdraw all. No more than you deposited.
- Claim: as tokens unlock, 🎁 Claim moves them to your wallet. Claimed tokens become a normal position at the presale price, so exits, knots and profit and loss work as for any buy.
- Refund: if the vault never bought, ↩️ Refund (web: Get my SOL back) returns your deposit.
A sells halt refuses withdrawals and refunds. A buys halt refuses deposits and claims.
Source: trade/server/presale.ts (act, settle), trade/server/bot.ts (presaleScreen), app/web/src/terminal/components/terminal/Presale.tsx
Buy at open #
Before trading opens you can set a buy for when it does: 0.1, 0.25 or 0.5 SOL in the bot, any amount above 0 on the web. You can have 10 waiting.
It goes at the launch's unlock start time plus a random 0 to 20 seconds, so Koine's own traders don't all land together, and only once the launch fee is 2% or less. It then runs as a normal buy: Koine's checks, your knots (judged at that moment), a route and a send. It gets one try. If Jupiter doesn't list the new pool yet, it's refused with a message.
You can cancel it until it starts buying. A buys halt makes it wait. ⛔ Stop all buying, like any knot, refuses it when it fires, and it doesn't come back.
Source: trade/server/presale.ts (placeOpenBuy, checkOpenBuys, fireOpenBuy, FEE_OK, SPREAD_MS, MAX_OPEN_BUYS), trade/server/bot.ts (OPEN_BUY_SOL)
Follows #
Follow a launch, a creator or a ticker. Following a creator or ticker follows each new launch from it. Each message goes once per trader and launch:
- a new launch from a creator or ticker you follow, within 24 hours of creation;
- an hour before a followed presale closes;
- when a followed launch starts trading.
Source: trade/server/presale.ts (follow, sendAlerts)