Airdrop

Developers

Copy as text for an AI

Function reference

Each public function on Kairo's contracts: who can call it, what it checks, how it reverts, the structs it returns and the maths behind the figures the app displays.

Conventions#

ABIs are generated by the contracts build into web/src/contracts/abis.ts (see Integration guide). Types in the tables are ABI types: pools are bytes32 ids, enums are uint8, and structs are tuples whose fields are listed under Stage codes and structs. All reverts use custom errors, listed next to each contract. For events, see Indexing events.

Units and encodings
QuantityEncodingNotes
Fees in pips1,000,000= 100%. Always applied to the quote side of a trade.
Supply1e9 · 1e10 · 1e11 · 1e12Whole tokens; any integer from 1e9 to 1e15 is allowed. 18 decimals. The full supply is minted to the hook and seeded at launch.
PricessqrtPriceX96 · tickStandard Uniswap v4. spotPriceX96(poolId) and the TWAP are Q96 values: quote units per token unit.
Poolsbytes32 poolIdkeccak256 of the PoolKey: currency0, currency1, fee 0x800000, tickSpacing 200, hook.
Native HYPEaddress(0)Used anywhere a quote or asset address is expected.
Holders slotaddress(1)As a fee recipient: pay the token's holders.

Owner and guardian powers#

One wallet owns Kairo's contracts: the Kairo Owner wallet (0xd3BC96a1A0Bec772893698CC9de4cf5c1B5c39ab). It has accepted ownership (Ownable2Step) of the v4 factory, the fee vault, the quote registry and the airdrop, and it is also the guardian of each. There is no multisig or timelock today, so an owner call takes effect as soon as its transaction lands. The rows marked “Owner” or “Guardian” in the tables below are everything it can do. Ownership moves in two steps: transferOwnership(next) nominates, acceptOwnership() (calldata 0x79ba5097) completes, and pendingOwner() shows the nominee. The hook, router, lens, tokens, splitters and buyback adapters have no owner at all.

KairoV4Factory#

Creates tokens and their pools, holds the fee rows and line settings, and names every other contract.

KairoV4Factory.launch
function launch(V4LaunchParams p) external payable returns (address token, bytes32 poolId);

struct V4LaunchParams {       // field order = ABI order
  string   name;              // 1–48 bytes
  string   symbol;            // 1–16 bytes
  string   metadataURI;       // 0–256 bytes
  uint256  rowId;             // an enabled fee row
  address  quote;             // address(0) = native HYPE; else a listed, enabled quote
  uint256  supply;            // whole tokens, 1e9..1e15 (0 = 1e9)
  bytes32  salt;              // token address = f(msg.sender, salt): predictTokenAddress
  address[] feeRecipients;    // [] = you · [a] = wallet a · [address(1)] = holders · 2–4 = a split
  uint16[] feeShares;         // bps, summing to 10,000 ([10000] for one recipient)
  uint32   earlyBuyFeeWindow; // 0 (off) or 5, 10, 30, 60, 300, 900, 1800 s
  uint24   earlyBuyFeeStartPips; // the anti-snipe start rate, above the total, at most 990,000
  uint256  firstBuyAmount;    // optional first buy, in the quote
  uint256  firstBuyMinOut;    // required with a first buy; the site sends 99% of lens.previewFirstBuy
  address  firstBuyRecipient; // 0 = you
  bytes32  builderCode;       // a builder's code, or 0
  bool     acknowledgeRisk;   // required for quotes flagged as needing it
}
// msg.value = launchFee() + (firstBuyAmount when the quote is native)
KairoV4Factory functions
FunctionCallerEffect
launch(V4LaunchParams p) payable returns (address token, bytes32 poolId)Anyone (not while paused)Token, terms, pool, seed and optional first buy in one transaction.
predictTokenAddress(address sender, bytes32 salt) view returns (address)AnyoneThe token address a launch from sender with salt will get.
poolIdOf(address token) · tokenOf(bytes32 poolId) · isKnownToken(address) · isKnownPool(address)AnyoneKairo's address book. isKnownPool answers for blessed buyback adapters.
allTokens(uint256) · allTokensLength()AnyoneEvery token launched, in order.
rows(uint256 id) · rowCount() · lines() · launchFee() · maxLaunchFee() · protocolPipsCap() · virtualReserve()AnyoneThe fee rows, the two lines (graduationTicks, lpLineTicks, lpLineHold), the launch fee and its cap.
openingTick(uint256 vReserve, uint256 supplyUnits, bool quoteIs0) view returns (int24)AnyoneThe opening tick: price = V / supply, rounded to a multiple of 200.
deploySplitter(bytes32 poolId, bytes32 salt, address[] recipients, uint16[] shares) returns (address)The pool's current recipientA splitter for a later hand-on to a split.
sweepLaunchFees()AnyoneLaunch fees to the vault.
hook() · poolManager() · quoteRegistry() · protocolFeeVault() · guardian() · launchesPaused() · tokenImplementation() · splitterImplementation() · splitterPool(address) · isProtocolContract(address) · isVault(address) · isRefusedTarget(address)AnyoneWhere everything lives, and the addresses a creator side can never be handed to.
publishRow(TierRow) · setRowEnabled(uint256 id, bool)OwnerAppend a row (protocol + LP ≤ floor ≤ total ≤ 10%, protocol ≤ protocolPipsCap) or switch one on or off. Live pools keep their row's rates.
setLines(uint24 graduationTicks, uint24 lpLineTicks, uint32 lpLineHold) · setLaunchFee(uint256)OwnerNew launches only. Lines on the tick spacing, 13,800–69,000 ticks (graduation may be 0), LP line above graduation, hold 600 s – 1 day; launch fee ≤ maxLaunchFee.
lowerProtocolPipsCap(uint24) · lowerPoolProtocolFee(bytes32 poolId, uint24)OwnerLower-only. The difference goes to the creator side.
setProtocolFeeVault(address) · registerBuybackAdapter(address) · registerProtocolContract(address)OwnerWhere protocol fees go; bless a KairoV4BuybackPool; refuse a contract as a fee recipient.
pauseLaunches() · unpauseLaunches()Guardian or owner · ownerNew launches only. Trading never pauses.
setHook(address)Owner, onceWires the hook at deployment (done); HookAlreadySet afterwards.
setGuardian(address) · transferOwnership(address) · acceptOwnership()Owner · pending ownerTwo-step ownership (Ownable2Step).
KairoV4Factory errors
ErrorReverts when
LaunchesArePaused()New launches are paused.
InvalidName() · InvalidSymbol() · InvalidMetadataURI() · InvalidSupply(uint256 supply)A field outside its bounds.
UnknownRow(uint256 rowId) · RowDisabled(uint256 rowId) · QuoteNotEnabled(address quote) · RiskNotAcknowledged(address quote)The row or the quote can't be used for a new launch.
InvalidAntiSnipe(uint32 window, uint24 startPips) · InvalidFeeRoute() · InvalidFeeRecipient(address recipient)A window or start rate outside the rules; a malformed route; a refused recipient.
IncorrectValue(uint256 sent, uint256 expected) · BadQuoteAmount(uint256 expected, uint256 received) · FirstBuyMinOutRequired() · FirstBuySlippage(uint256 out, uint256 minOut)msg.value isn't the launch fee (+ a native first buy); an ERC-20 first buy arrived short; a first buy without a floor, or under it.
NotRecipient() · NotGuardian() · OutOfBounds() · InvalidRow() · UnknownPool(bytes32 poolId) · ZeroAddress() · ZeroAmount()Wrong caller, a setting outside its bounds, an unknown pool, or nothing to sweep.
HookNotSet() · HookAlreadySet() · BadHook() · NotPoolManager()Deployment wiring; callbacks only from the PoolManager.

KairoLaunchHook#

A single hook is attached to every Kairo pool and rejects any pool the factory didn't register. It owns each seed position, charges the fee inside the swap through return deltas (so all quoters agree), records who is owed what, tracks each pool's stage, and keeps its price history.

Fee maths (h = current rate − current LP fee)
exact-in buy    fee = ceil(in · h / 1e6)            taken off the quote paid in
exact-in sell   fee = ceil(gross · h / 1e6)         taken off the quote paid out
exact-out buy   fee = ceil(net · h / (1e6 − h))     added to the quote paid in
exact-out sell  fee = ceil(out · h / (1e6 − h))     added to what the pool pays out
protocol        = floor(leg · protocolPips / 1e6)    creator side = fee − protocol
all-in          = h + lp − h·lp/1e6                  (lens effectiveTotalFee)
KairoLaunchHook functions
FunctionCallerEffect
claim(bytes32 poolId, address to) returns (uint256)Recipient or its claim operatorCollects the seed's LP fee, then pays the whole creator tab in the quote.
claimTab(bytes32 poolId, address to, uint256 amount) returns (uint256)Recipient or its claim operatorPays part or all of the tab alone.
setClaimOperator(address operator, bool approved)Anyone, for itselfLets another address claim (only claim) for you.
updateRecipient(bytes32 poolId, address next)The recipientHands the creator side on, tab and lever included. address(1) or the token = the holders; a splitter the factory made for the pool = a split.
lowerTotalFee(bytes32 poolId, uint24 newTotal) · lockFee(bytes32 poolId)The recipient (wallet routes)Down to the row's floor, never up; or fixed for good.
lowerProtocolFee(bytes32 poolId, uint24)The factory (owner's lowerPoolProtocolFee)Lower-only.
sweep(bytes32 poolId) · collectProtocol(address currency)AnyoneBook the protocol's share, then pay it to the vault.
harvestSeed(bytes32 poolId) returns (uint256 quoteToCreator, uint256 tokensBurned)AnyoneThe seed's LP fee: quote to the creator tab, token side burned.
poke(bytes32 poolId)AnyoneWrites a price observation (at most one per 300 s).
poolConfig(bytes32) · poolKey(bytes32) · recipientOf · tabOf · pendingProtocol · protocolTab(address)AnyoneA pool's terms, stage and lines; its key; who is paid; what waits.
currentBuyFeeRate(bytes32) · currentFeeRate(bytes32, address) · totalFee(bytes32) · nextSwapTerms(bytes32)AnyoneThe rate a buy pays now (anti-snipe included), the total, and the next swap's buy/sell/LP rates.
spotPriceX96(bytes32) · priceCumulative(bytes32) · observation(bytes32, uint256)AnyoneThe price, its running total and the observation ring.
isClaimOperator(address account, address operator)Anyone
KairoLaunchHook errors
ErrorReverts when
PartialFillRejected()A swap would stop short at a price limit or the end of the seed. Nothing fills.
NotRecipient() · FeeIsLocked() · InvalidFee(uint24 fee) · InvalidRecipient(address recipient)Wrong caller (claims, hand-ons, the lever); a locked fee; a rate outside floor..current, or a bad claimTab amount; a refused hand-on or payee.
PoolNotReady()Adding liquidity before the pool's stage is LpActive (4), or poking, harvesting or donating to a pool that isn't seeded.
NotRegistered() · AlreadyRegistered() · AlreadySeeded() · InvalidTerms() · InvalidPoolKey() · WrongOpeningPrice()Registration and opening: a pool this hook doesn't run, set up twice, terms outside the bounds, or the wrong key or price.
NotFactory() · NotPoolManager() · HookNotImplemented() · InvalidHookAddress()Callbacks and registration only from the factory and the PoolManager; unused callbacks; a hook deployed at the wrong address.

KairoV4Router#

Kairo's exact-input router. Optional: any Uniswap v4 router trades the same pools.

KairoV4Router functions
FunctionCallerEffect
buy(address token, uint128 amountIn, uint128 minAmountOut, address recipient, uint256 deadline) payable returns (uint256)AnyoneExact-in buy with the pool's quote: HYPE as value, or an ERC-20 approved to the router.
sell(address token, uint128 amountIn, uint128 minAmountOut, address recipient, uint256 deadline) returns (uint256)Anyone (approve the router)Exact-in sale, paid in the quote.
swapExactIn(ExactIn s) payable · swapExactInRoute(address currencyIn, PoolKey[] path, uint128 amountIn, uint128 minAmountOut, address recipient, uint256 deadline) payableAnyoneOne pool by its key (ExactIn = key, zeroForOne, amountIn, minAmountOut, recipient, deadline), or a route of up to four pools (MAX_HOPS).
quoteExactIn(PoolKey key, bool zeroForOne, uint128 amountIn) · quoteExactInRoute(...)Anyone (call, don't send)Runs the swap in the PoolManager and reverts it with the result.
KairoV4Router errors
ErrorReverts when
TooLittleReceived(uint256 amountOut, uint256 minAmountOut) · Expired()Output under minAmountOut; past the deadline (chain time).
IncorrectValue() · InvalidPath() · InvalidRecipient() · ZeroAddress()Value doesn't match a native input; a bad route; a refused recipient.
QuoteResult(uint256 amountOut) · UnexpectedRevert(bytes reason)Used inside quoteExactIn to carry the result out of the reverted swap; you see the return value, not the error.

KairoV4Lens#

Read-only helpers. Nothing here writes state, so every call is free.

KairoV4Lens functions (all view)
FunctionCallerEffect
tokenView(address token) · poolView(bytes32 poolId)AnyoneKey, config, price, tick, LP fee, active liquidity, fee breakdown, all-in rates, tab, harvestable seed fees, pending protocol, progress to both lines, LP-line hold, spot price, market cap.
quoteBuy(address token, uint256 amountIn) · quoteSell(address token, uint256 tokensIn)AnyoneExact out and the hook's fee now, anti-snipe included.
quoteExactIn(bytes32, bool isBuy, uint256) · quoteExactOut(bytes32, bool isBuy, uint256)AnyoneFull quote: in, out, hook fee, protocol part, LP pips, price after.
previewFirstBuy(creator, salt, quote, rowId, supply, amountIn) · seedPreview(creator, salt, quote, supply)AnyoneA launch's first buy and seed before it exists (exact).
feeBreakdown(bytes32) · buyFeeSchedule(bytes32)Anyonetotal, lp, protocol, creator, effective all-in; the anti-snipe line (start, end, from, until, now).
graduationProgress(bytes32) · lpLineProgress(bytes32) · lpLineHeld(bytes32)AnyoneProgress to each line in bps: the share of the quote needed to reach it that the seed has already taken in (10,000 once crossed); and seconds held out of 600.
creatorClaimable(bytes32) · seedFeesOwed(bytes32) · rewardView(token, holder) · earnedMany(token, holders[])AnyoneWhat a claim would pay; the seed's LP fees; holder rewards.
consult(bytes32 poolId, uint32 minAge) returns (uint256 twapX96, uint256 window)AnyoneTWAP from the newest observation at least minAge old (TwapUnavailable if none).
errors: PartialFill() · NotALaunch()—A quote that would stop short; a token the factory didn't launch.

KairoV4Token#

Each launch is a clone of the token master: an ordinary ERC-20 without an owner, later minting, transfer tax or pause. The hook receives the entire supply at launch. Holder rewards are tracked by a ledger inside the token, and the PoolManager and hook never earn from it.

KairoV4Token functions
FunctionCallerEffect
transfer · transferFrom · approve · burn(uint256)HoldersStandard ERC-20; anyone may burn their own.
distribute() returns (uint256)AnyonePulls what the hook owes a holders-route token and starts it streaming over 60 minutes.
claimRewards() · claimRewards(address to)A holderTakes what it has earned. to can't be 0, 0x…0001, 0x…dEaD, the token, the hook or the PoolManager (RefusedTarget).
pushRewards(address[] holders) returns (uint256 paid, uint256 tip)AnyonePays listed codeless holders; the caller keeps 0.25% of each payout.
earned(address) · withdrawnRewards(address) · streaming() · rewardsEnabled() · earningSupply() · minEarningSupply() · isExcluded(address) · totalRewardsDeposited() · totalRewardsPaid()AnyoneReward state: claimable now, paid so far, the stream, who can't earn.
poolId() · hook() · quote() · creator() · metadataURI() · contractURI()AnyoneWhere it trades and its metadata (contractURI is the same link).
buyTaxRate() · sellTaxRate() · taxBps() · taxRatePips()AnyoneScanner getters, never a transfer tax: what a buy pays now (anti-snipe included) and the pool's fee, in bps rounded up; taxBps equals sellTaxRate; taxRatePips is the fee in pips. A transfer between wallets pays nothing.

KairoFeeSplitter#

Deployed per pool when the creator side is shared between 2 to 4 recipients.

KairoFeeSplitter functions
FunctionCallerEffect
distribute() returns (uint256)AnyoneClaims the pool's creator side from the hook and books each slot's share (the holders slot goes to the token).
collect(address to, uint256 amount)A slot's recipientTakes its own share.
rotate(address to)A slot's recipientHands its own slot on.
recipients() · shares() · owed(address) · totalOwed() · hasHoldersSlot()AnyoneThe slots and what each is owed.

KairoV4BuybackPool#

An adapter that lets the fee vault buy KAIRO from KAIRO's v4 pool. One per platform pool.

KairoV4BuybackPool functions (one per platform pool)
FunctionCallerEffect
reserves() · virtualReserve() · realReserve() · spotPriceX96() · consult(uint32 minAge)Anyone (the vault)KAIRO's v4 pool as the vault's IKairoPoolForBuyback: the locked seed's curve only, the hook's price and TWAP.
quoteBuy(uint256 amountIn) viewAnyoneExact tokens out and fee, as a pure view.
buyFor(address recipient, uint256 minTokensOut, uint256 deadline) payableAnyone (the vault)Exact-in buy through the PoolManager at the pool's normal fee.
poolId() · hook() · token() · factory() · poolManager()AnyoneWhat it presents.

ProtocolFeeVault#

Every pool’s protocol share reaches the vault through the hook’s sweep(poolId) and collectProtocol(currency). Native coin and KAIRO are split into a buyback lane and a treasury lane while the buyback is on (wholly treasury while it’s off); every other ERC-20 goes wholly to treasury, for the owner to convert by hand. The vault never swaps anything but HYPE for KAIRO. What it buys is burned at 0x…dEaD unless the owner sets a list of buyback wallets; then the wallets are filled in order, each up to recipientCapBps (2%) of KAIRO’s total supply by balance, and a buy they can’t take whole reverts with RecipientsFull. The owner (the Kairo Owner wallet, which is also the guardian) switches the buyback on and off; it can only be switched on once KAIRO's pool is set.

ProtocolFeeVault functions
FunctionCallerEffect
receiveProtocol() payableAnyone (the hook, the factory)Native deposit, split into the lanes at once.
sync(address asset)AnyoneAttributes an asset that arrived another way (ERC-20 sweeps, donations).
lanes(address asset) view returns (uint256 buyback, uint256 treasury) · buybackBalance() · treasuryBalance()AnyoneLane balances, unsynced amounts included.
executeBuyback(uint256 minTokensOut) returns (uint256 spent, uint256 burned)Keeper or ownerBuys KAIRO in its pool within the guards below and hands it out in the same call: to 0x…dEaD with no wallets set, else into the buyback wallets in order (one BuybackDelivered per wallet). burned is the amount bought either way. RecipientsFull if the wallets can’t take it all.
releasePlatformLane() returns (uint256 amount)AnyoneSends the KAIRO buyback lane (KAIRO received as fees) the same way: burned at 0x…dEaD with no wallets, else filled into the buyback wallets in order (one PlatformLaneReleased per wallet).
withdrawTreasury(address to, uint256 amount) · withdrawTreasuryToken(address asset, address to, uint256 amount)OwnerTreasury lane only, never the buyback lane. InsufficientTreasury past it.
releaseBuybackToTreasury(address asset, uint256 amount)OwnerMoves unspent buyback money of any asset (address(0) = native) to the treasury lane. InsufficientBuyback past it.
addFactory(address) · setPlatformPool(address factory, address pool)OwnerAppend a factory; name KAIRO’s pool (on v4, its KairoV4BuybackPool adapter), which that factory must know.
enableBuyback() · disableBuyback()Guardian or ownerSwitch the buyback on or off, instantly, any number of times. Needs a KAIRO pool to switch on. While off, new fees go 100% to treasury; the buyback lane keeps what it holds.
setGuardian(address)OwnerWho may flip the switch besides the owner (the Kairo Owner wallet itself).
setBuybackRecipients(address[] list)OwnerReplaces the list of buyback wallets, in fill order. Empty (the default) = burn at 0x…dEaD. At most 50 (MAX_RECIPIENTS); each not 0, not the vault, not 0x…dEaD, no repeats (BadRecipient).
setRecipientCapBps(uint16 bps)OwnerMost each wallet is filled to, in bps of KAIRO’s total supply: 1 – 10,000, default 200 (2%).
buybackRecipients() view returns (address[]) · buybackRecipient() view returns (address) · recipientRoom() view returns (uint256) · recipientCapBps()AnyoneThe list; where the next buy goes (0x…dEaD when burning, the first wallet with room, 0 when every wallet is full); KAIRO the wallets can still take (max uint256 with no list or no KAIRO pool); the cap.
setBuybackShareBps(uint16) · raiseBuybackFloor(uint16)OwnerShare between the floor (starts at 0%, only rises) and 90%. Set to 50%.
setLimits(Limits) · setKeeper(address)OwnerGuards within their bounds; the keeper.
buybackEnabled() · buybackShareBps() · buybackFloorBps() · limits() · keeper() · guardian() · platformPool() · platformToken() · isFactory(address) · totalProtocolReceived() · buybackDay() · lastBuybackAt() · dayBaseReserve() · spentToday()AnyoneState reads.
Buyback guards
GuardDefaultBound
Per call0.5% of min(R now, R at the TWAP)perCallBps ≤ 50
Per UTC day5% of min(R now, R at the TWAP, R at the day’s first buyback)dailyBps ≤ 500
TWAP band|spot / TWAP − 1| ≤ 2%bandBps ≤ 200
TWAP window30 minutes30 min – 2 h
Cool-down10 minutes between calls10 min – 1 day
Minimum outthe larger of the caller’s and 99% of quoteBuy in the same callfixed
ProtocolFeeVault errors
ErrorReverts when
NotKeeper() · BuybackDisabled() · PlatformPoolNotSet()Wrong caller, buyback off, or no KAIRO pool named.
NotOwnerOrGuardian()Someone other than the owner or guardian tried to switch the buyback.
CoolingDown(uint256 readyAt)Called inside the cool-down.
PriceOffTwap(uint256 spotX96, uint256 twapX96)The price is outside the TWAP band.
NothingToBuyBack()Nothing left under the caps, or the lane is empty.
RecipientsFull(uint256 undelivered)Every buyback wallet is at its cap and undelivered KAIRO had nowhere to go: the whole buy (or lane release) reverts. Add wallets.
BadRecipient(address recipient)A buyback wallet that is 0, the vault, 0x…dEaD, or listed twice.
UnknownFactory(address) · UnknownPool(address) · OutOfBounds()Settings outside their rules (OutOfBounds also for more than 50 wallets or a cap outside 1 – 10,000).
InsufficientTreasury(uint256 requested, uint256 available) · InsufficientBuyback(uint256 requested, uint256 available) · ZeroAddress() · ZeroAmount() · NativeTransferFailed()Withdrawals or releases that can’t be paid.

KairoQuoteRegistry#

The list of assets a new token can be paired with, and each one's settings.

KairoQuoteRegistry functions
FunctionCallerEffect
config(address quote) view returns (QuoteConfig)Anyonelisted, enabled, requiresAck, kind, decimals and the virtual reserve with its bounds.
quoteCount() · quoteList(uint256) · NATIVE()AnyoneEvery listed quote, in order; NATIVE is address(0), listed at construction.
addQuote(address token, uint8 kind, bool requiresAck, uint256 virtualReserve, uint256 minVirtualReserve, uint256 maxVirtualReserve)OwnerLists an ERC-20, append-only: 6–18 decimals, leveraged quotes must require an acknowledgement. InvalidQuote / AlreadyListed otherwise.
setEnabled(address quote, bool enabled)Owner either way; guardian only to disableStops or resumes new launches in the quote. Live pools keep trading.
setVirtualReserve(address quote, uint256 v)OwnerNew launches only, within the bounds fixed at listing (native: 10–500).
setGuardian(address) · guardian()OwnerThe registry’s guardian.

KairoAirdrop#

Merkle-root seasons, funded in native HYPE or an ERC-20, claimable by anyone on an account's behalf.

KairoAirdrop functions
FunctionCallerEffect
proposeSeason(uint256 seasonId, bytes32 merkleRoot, address token, uint64 claimWindow)OwnerSets a season’s root; claims open rootDelay later (24 h in production, at most 7 days) and run for the window (90–730 days). A root can be replaced only before it opens.
extendClaimWindow(uint256 seasonId, uint64 newDeadline)OwnerLater only, within 730 days of opening.
fund(uint256 seasonId, uint256 amount) payableAnyoneFunds a season in native coin (value = amount) or its ERC-20 (approve first; measured by balance).
claim(uint256 seasonId, address account, uint256 amount, bytes32[] proof)Anyone, for any accountPays account. Leaf: keccak256(bytes.concat(keccak256(abi.encode(account, amount)))). Never pays past what the season was funded with.
withdrawUnclaimed(uint256 seasonId, address to)OwnerAfter the deadline, once.
recoverExcess(address token, address to) returns (uint256)OwnerOnly what no season owes.
seasons(uint256) view returns (bytes32 merkleRoot, address token, uint64 activatesAt, uint64 claimDeadline, uint128 funded, uint128 claimed, bool withdrawn) · isClaimed(uint256, address) · outstanding(address) · rootDelay()AnyoneState reads.
KairoAirdrop errors
ErrorReverts when
SeasonNotFound · SeasonActive · NotActive · ClaimWindowClosed · ClaimWindowOpenThe season doesn’t exist, has already opened, hasn’t opened yet, is closed, or is still open.
AlreadyClaimed(uint256, address) · AlreadyWithdrawn(uint256) · InsufficientFunding(uint256)Second claim, second withdrawal, or a claim past the funding.
InvalidProof() · InvalidWindow() · ZeroAddress() · ZeroAmount() · NativeTransferFailed()Bad proof or root, a window out of bounds, and payment failures.

Stage codes and structs#

Each pool carries a single stage code in hook.poolConfig(poolId).stage, mirrored in lens.tokenView(token).config.stage. Every transition emits StageChanged.

Stage codes
CodeNameMeaning
0BelowPrice has not reached the graduation line.
1CrossedA swap pushed the price over the graduation line. Any swap in a later transaction makes graduation final; a sale inside that same transaction is the only way back to 0.
2GraduatedPermanent. Emits Graduated(poolId, timestamp) one time. A launch with graduationTicks = 0 starts at 2 and emits nothing.
3Past the LP lineThe hold clock runs: lpHeldSeconds + (now − lpCrossedAt). Dropping back below returns the pool to 2 without resetting the time already held.
4LP fee onPermanent. Emits LpFeeActivated(poolId, lpFee). The swap that completes the hold already pays the LP fee.

TierRow

TierRow (factory.rows)
FieldTypeMeaning
totalPipsuint24The tier.
floorPipsuint24How low a wallet recipient may lower it.
protocolPipsuint24Protocol share (3,000 = 0.3%; 4,000 = 0.4%).
lpPipsuint24LP fee, charged once the LP line is reached.
enabledboolLaunchable.

PoolConfig

PoolConfig (hook.poolConfig, lens tokenView.config)
FieldTypeMeaning
totalFeePips · totalFeeMinPips · totalFeeMaxPipsuint24Total now (lower-only), its floor, and the total at launch.
lpFeePips · protocolFeePipsuint24LP fee (charged after the LP line); current protocol share (can only fall).
earlyBuyFeeStartPips · earlyBuyFeeWindow · earlyBuyFeeUntiluint24 · uint32 · uint40Anti-snipe start rate, window and end time (0 = off).
exists · seeded · feeLocked · quoteIsCurrency0boolRegistered; seed placed; fee fixed; which side the quote is.
stageuint80–4, above.
openingTick · graduationTick · lpLineTick · seedTickLower · seedTickUpperint24The opening price, the two lines and the seed's range, as ticks.
lpCrossedAt · lpHeldSeconds · lpLineHolduint32LP-line clock: when it last crossed, seconds held so far, seconds needed (600).
launchedAtuint40t0 for the anti-snipe line.
seedLiquidityuint128The locked seed's liquidity.
recipient · tokenaddressPayee of the creator side, and the token address.

LaunchRecord

LaunchRecord (TokenLaunched.record)
FieldTypeMeaning
rowId · quote · quoteIsCurrency0uint256 · address · boolThe row; paired with (0 = native) and its side.
supply · startTickuint256 · int24Token units (18 decimals); the opening tick.
feeRecipient · feeLockedaddress · boolWho is paid (the token for holders, a splitter for a split); fixed from launch?
totalPips · floorPips · protocolPips · lpPipsuint24The row's rates.
earlyBuyFeeStartPips · earlyBuyFeeWindowuint24 · uint32Anti-snipe terms.
graduationTicks · lpLineTicks · lpLineHolduint24 · uint24 · uint32The two lines as tick offsets from the opening (0 = graduated from birth), and the hold.
firstBuyIn · firstBuyOut · firstBuyRecipientuint256 · uint256 · addressThe first buy.
builderCode · saltbytes32The builder's code (or zero); the salt.

Enums

Enums
EnumValues
KairoQuoteRegistry.QuoteKind0 Native · 1 Platform · 2 Ecosystem · 3 Stock · 4 Index · 5 Leveraged

QuoteConfig, Limits, Season

Other structs
FieldTypeMeaning
QuoteConfig(bool listed, bool enabled, bool requiresAck, uint8 kind, uint8 decimals, uint128 virtualReserve, uint128 minVirtualReserve, uint128 maxVirtualReserve)KairoQuoteRegistry.config.
Limits(uint16 perCallBps, uint16 dailyBps, uint16 bandBps, uint32 cooldown, uint32 twapWindow)ProtocolFeeVault.limits.
Season(bytes32 merkleRoot, address token, uint64 activatesAt, uint64 claimDeadline, uint128 funded, uint128 claimed, bool withdrawn)KairoAirdrop.seasons.