BaseLaunchBondingCurve
One per coin. Sells the coin against the pair asset on a constant-product curve with a virtual reserve, charges every fee in the pair asset, and hands its reserves to the factory at graduation.
Constant-product bonding curve for one launch. The curve trades against the same quote asset its graduated Uniswap V4 pool will use: native ETH when pairToken is the zero address, otherwise that ERC-20. Collecting the eventual pool asset from the very first trade is what lets graduation seed the pool directly, with no swap and therefore no price oracle anywhere in the system. Every trade fee is charged against the quote leg regardless of trade direction, so the curve never accrues fees denominated in the memecoin: protocol and creator revenue is quote-denominated from the first trade, before graduation ever happens. Fees are split and swept through the same protocol/creator/buyback-and-lock policy the post-graduation hook uses, read from feePolicy so both phases behave identically.
Part of the contract reference.
Deployed at
One per coin, created in the launch transaction. Read it from the factory that launched the coin: getLaunchedToken(token).curve, or the curve field of TokenLaunched.
Read functions (37)
| Function | What it does |
|---|---|
buybackBurnBpsbuybackBurnBps() view returns (uint16)selector 0x49127e2aAnyone | Share of the creator part of the base fee earmarked for buyback-and-lock while buyback is on, in basis points. Frozen at launch. |
buybackCreatorRecipientbuybackCreatorRecipient() view returns (address)selector 0x3cd1fb8fAnyone | The creator recipient the curve was created with; buybacks it locks name this account in the vault. |
buybackEnabledbuybackEnabled() view returns (bool)selector 0x160d0da5Anyone | Whether buyback-and-lock is on for fees charged from now on. |
buybackQuoteBalancebuybackQuoteBalance() view returns (uint256)selector 0x7809452aAnyone | The slice of |
buybackVaultbuybackVault() view returns (address)selector 0xf1f5c993Anyone | The shared buyback vault the curve locks bought-back coins into. |
creatorFeeBalancecreatorFeeBalance() view returns (uint256)selector 0xdd22678fAnyone | Pending creator side: the creator part of the base fee, its part of the launch tax and the creator fee. Swept to the fee escrow. |
creatorTaxBpscreatorTaxBps() view returns (uint256)selector 0xc1bb8901Anyone | Creator-chosen at launch, capped by the protocol at launch time. Kept entirely separate from feeBps: it is layered on top of the base trade fee, not part of the protocol/buyback/creator split, and is paid to the creator in full. |
currentSnipeTaxBpscurrentSnipeTaxBps(address recipient) view returns (uint256)selector 0xd7e1ef39Anyone | Snipe tax The decay is fourteen successive halvings spread evenly across the window, done with right shifts so it stays in integer arithmetic. Fourteen because 2^14 exceeds the maximum 9,900 starting tax, so the tax always reaches zero inside the window rather than cutting off at a still-meaningful rate. The decay anchors to |
deployerdeployer() view returns (address)selector 0xd5f39488Anyone | The coin's current creator fee recipient (despite the name); the factory updates it when the recipient changes. |
factoryfactory() view returns (address)selector 0xc45a0155Anyone | The launch factory; the only caller allowed through onlyFactory. |
feeBpsfeeBps() view returns (uint256)selector 0x24a9d853Anyone | The curve's base trading fee in basis points, charged on the pair asset side of every buy and sell. Frozen at launch. |
feeEscrowfeeEscrow() view returns (address)selector 0xc4b7de97Anyone | The fee escrow every curve payout is credited to. |
feePolicyfeePolicy() view returns (address)selector 0x82589038Anyone | The hook, read live for the fee sweep operator, the protocol fee recipient and the interface registry. |
getReservesgetReserves() view returns (uint256 quoteReserve_, uint256 tokenReserve_)selector 0x0902f1acAnyone | Returns the curve's current tradeable reserves, excluding fees pending sweep. |
graduatedgraduated() view returns (bool)selector 0xe7c2b772Anyone | True once the curve has handed its reserves to the factory; trading on the curve is closed for good. |
graduationThresholdgraduationThreshold() view returns (uint256)selector 0x8b0bc501Anyone | The real pair asset reserve at which the curve has sold its whole sellable allocation and graduates. |
isNativeQuoteisNativeQuote() view returns (bool)selector 0xdc08e094Anyone | True when this launch trades and graduates against native ETH. |
launchedAtlaunchedAt() view returns (uint256)selector 0xbf56b371Anyone | Timestamp trading opened, anchoring the snipe tax decay. Set once at initialize, which the factory calls in the launch transaction itself, so second zero of the decay is the launch second. |
launchSupplylaunchSupply() view returns (uint256)selector 0x3f7ed6b7Anyone | Total supply this launch was created with, snapshotted at initialize and exposed for off-chain consumers. Held here rather than read live from the token because the token is burnable, so its own totalSupply stops describing the supply the launch was configured around. |
maxInternalPriceImpactBpsmaxInternalPriceImpactBps() view returns (uint16)selector 0x90addc1eAnyone | Cap on how far the fee buyback may move the curve's reserves, in basis points. Frozen at launch. |
pairTokenpairToken() view returns (address)selector 0x3de35b79Anyone | The pair asset the curve trades and graduates against; the zero address means native ETH. |
phantomQuotephantomQuote() view returns (uint256)selector 0xc57eadfcAnyone | Virtual quote reserve seeded at deploy, denominated in the quote asset's own decimals rather than always in wei. |
protocolFeeBalanceprotocolFeeBalance() view returns (uint256)selector 0x0a22d68cAnyone | Pending protocol part of the base fee and of the launch tax, net of referrer payments. Swept to the fee escrow. |
protocolFeeRecipientprotocolFeeRecipient() view returns (address)selector 0x64df049eAnyone | The protocol's fee recipient, read live from the fee policy on every payout. It is deliberately not snapshotted (unlike every fee rate): the protocol may move its own revenue address, and that move must reach launches already trading. |
protocolFeeShareBpsprotocolFeeShareBps() view returns (uint16)selector 0x9040f866Anyone | Protocol share of the base fee and of the launch tax, in basis points. Frozen at launch. |
quoteReservequoteReserve() view returns (uint256 quoteReserve_)selector 0x9da771f4Anyone | Tradeable quote reserve only, matching IBondingCurve. |
readyToGraduatereadyToGraduate() view returns (bool)selector 0xc68360a5Anyone | True once the curve's sellable allocation has been bought out. Equivalent to the real quote reserve reaching |
realQuoteReserverealQuoteReserve() view returns (uint256)selector 0x4f1f58fdAnyone | Returns physically held tradeable quote asset, excluding virtual liquidity and balances already earmarked as fees or creator tax. |
reservedTokensreservedTokens() view returns (uint256)selector 0x15a55347Anyone | Token balance the curve will never sell below, set once at initialize and handed to the graduated pool intact. Everything above it is the sellable allocation, and graduation is exactly its exhaustion. |
sellableTokenssellableTokens() view returns (uint256)selector 0x808bcddcAnyone | Tokens still available to buy before the curve graduates. |
snipeTaxExemptsnipeTaxExempt(address account) view returns (bool exempt)selector 0xd44bdfe7Anyone | Wallets the creator declared at launch, exempt from the snipe tax so a team's own bundled buys are not eaten by the launch window's anti-bot pricing. Written only by the factory during the launch transaction. |
snipeTaxSecondssnipeTaxSeconds() view returns (uint256)selector 0x6783774bAnyone | Seconds over which this coin's launch tax decays to zero, snapshotted from the factory at launch. |
snipeTaxStartBpssnipeTaxStartBps() view returns (uint256)selector 0x50e25ac2Anyone | This coin's launch tax in the launch second, in basis points, snapshotted from the factory at launch. Zero means no launch tax. |
tokentoken() view returns (address)selector 0xfc0c546aAnyone | The coin this curve sells. Set once by the factory in the launch transaction. |
tokenReservetokenReserve() view returns (uint256 tokenReserve_)selector 0xcbcb3171Anyone | Tradeable token reserve only, matching IBondingCurve. |
trackedQuotetrackedQuote() view returns (uint256)selector 0xca52b0b7Anyone | Net real quote asset held from curve trading: buys add their value, sell payouts, referrer credits and swept protocol/creator fees subtract theirs. Tracked explicitly instead of reading a live balance, so a forced transfer in (an ERC-20 airdrop, or ETH from a selfdestruct) can neither inflate curve pricing nor push a launch past its graduation threshold with no tokens actually sold. |
trackedTokenstrackedTokens() view returns (uint256)selector 0x4c37ef23Anyone | Launch tokens this curve holds as tradeable reserve: set to the minted allocation at initialize, reduced by buys and the internal buyback, increased by sells. The token side needs the same treatment as the quote side because both feed the constant-product price. Reading a live balance would let any holder transfer tokens straight in to move the curve's pricing, delay graduation past the point the launch's economics were quoted at, and shift what the graduated pool opens at. |
Write functions (11)
| Function | What it does |
|---|---|
buybuy(uint256 quoteIn, uint256 minTokensOut, address recipient, address referrer) payable returns (uint256 tokensOut)selector 0x82b2a559Anyone (pays from the caller, coins go to recipient) |
|
buybuy(uint256 quoteIn, uint256 minTokensOut, address recipient) payable returns (uint256 tokensOut)selector 0x59a87bc1Anyone (pays from the caller, coins go to recipient) | Buys the launch token with this launch's quote asset. The fee is always taken from the quote leg, so this curve never holds a memecoin-denominated fee.
|
exemptFromSnipeTaxexemptFromSnipeTax(address account)selector 0x31ff7f22Factory only | Marks |
graduategraduate(address recipient) returns (uint256 quoteOut, uint256 tokenOut)selector 0xff6d8d05Factory only | Sweeps fees, halts trading, and hands the remaining tradeable reserves to the factory so it can seed the graduated Uniswap V4 pool. Because the curve already holds the pool's quote asset, the factory receives exactly what it needs to seed with, and no conversion step sits between the two. Restricted to the factory; deliberately not |
initializeinitialize(address token_)selector 0xc4d66de8Factory only | Wires the launch token this curve dispenses. Called once by the factory immediately after deploying the token with this curve's (now known) address, before either contract is reachable by anyone else. Also fixes the pool's token allocation, which is why this cannot happen in the constructor: the supply is only known once the token exists. Holding |
rescueFeesrescueFees() returns (uint256 protocolAmount, uint256 creatorAmount)selector 0x52920587Factory only | Pays this curve's pending fees straight to the protocol and creator recipients, bypassing the escrow. Restricted to the factory, which gates it on the protocol owner. Exists because an ordinary sweep routes every payout through BaseLaunchFeeEscrow, and a permissioned quote asset can stop delivering to that one address while still permitting transfers between traders and this curve. Trading then continues normally, but the fees are unreachable, and graduation is unreachable with them: |
sellsell(uint256 tokensIn, uint256 minQuoteOut, address recipient, address referrer) returns (uint256 quoteOut)selector 0x4f8f0218Anyone (coins taken from the caller, pair asset goes to recipient) |
|
sellsell(uint256 tokensIn, uint256 minQuoteOut, address recipient) returns (uint256 quoteOut)selector 0xd04c6983Anyone (coins taken from the caller, pair asset goes to recipient) | Sells the launch token back to the curve for the quote asset. The fee is taken from the quote output, so it is always quote-denominated here too. Closed once the sellable allocation is exhausted, not merely once |
setBuybackEnabledsetBuybackEnabled(bool enabled)selector 0x9a9b567dFactory only | Enables or disables this launch's buyback-and-lock fee route. The factory authorizes both the current creator recipient and protocol owner before forwarding the setting here. Applies to fees charged from here on, not to fees already pending. Each trade earmarks its buyback slice as it is charged, so a toggle cannot reach back and reroute value that accrued under the opposite setting. Without that, a disable landing before a sweep would divert a buyback the creator had already earned into their own payout, and an enable would sweep fees earned under a plain split into the vest. |
setCreatorFeeRecipientsetCreatorFeeRecipient(address newRecipient)selector 0x7b04ea62Factory only | Updates who receives creator fees from future sweeps. Restricted to the factory, which gates both self-service creator transfers and protocol-owner overrides before forwarding here, so this contract only needs to trust one caller. |
sweepFeessweepFees(uint256 minBuybackTokensOut)selector 0x3729bb9aFee sweep operator, or the coin's creator fee recipient when no buyback is pending | Distributes pending quote fees across protocol, buyback-and-lock, and the creator using this launch's frozen policy. The trusted sweep operator is required when the sweep would execute an internal buyback. The creator may still distribute fees when no swap is required. Reverts once graduated rather than silently no-op'ing. |
Events (14)
| Event | What it means |
|---|---|
AutoGraduationFailedAutoGraduationFailed(address indexed token, uint256 gasRemaining)topic0 0xe2cd2f31ebc05ec28640102987f4c8fc5f20e269e1b3aa82577f3f2f0e35c7c6 | The buy that sold out the curve could not graduate it in the same call; anyone can call the factory's graduate. gasRemaining helps spot a starved call. Emitted by buy, buy (4 args) |
BuybackEnabledUpdatedBuybackEnabledUpdated(bool enabled)topic0 0xbfe799fb5e0148a5f2590ff531306d42a5d512b74a5029ceb805abb808b0f1a0 | Buyback-and-lock was turned on or off for fees charged from now on. Emitted by setBuybackEnabled |
BuybackLockedBuybackLocked(uint256 quoteSpent, uint256 tokensLocked)topic0 0x5feba9b0d52c92ada4b9c571c2bee52390c54f2947208ab250221e6ee32f12ff | |
CreatorFeeRecipientUpdatedCreatorFeeRecipientUpdated(address indexed previousRecipient, address indexed newRecipient)topic0 0x2cc664e1ac1e2d05c0d4637bb63ec8189113b6ac39276be8977e26216a8cdd19 | The creator fee recipient of this curve changed. Emitted by setCreatorFeeRecipient |
CurveBuyCurveBuy(address indexed buyer, address indexed recipient, uint256 quoteIn, uint256 tokensOut, uint256 fee, uint256 tax, address indexed referrer, uint256 referrerAmount)topic0 0x9ee9e99e75b0adbf369b55047505ace25678f4f41eed4d2122c350c657395ef1 |
Emitted by buy, buy (4 args) |
CurveBuyRefundedCurveBuyRefunded(address indexed buyer, uint256 refund)topic0 0xa69e8258ccc7b9bbb70ab953fc2d1062b4ee28b8ca827534097e1732e87b0262 | A buy was clamped at the end of the curve and the unspent pair asset was returned to the buyer. Emitted by buy, buy (4 args) |
CurveCompletedCurveCompleted(address recipient, uint256 quoteOut, uint256 tokenOut)topic0 0xf8d37a90738ae063b8b8058b66f5880cf3cf7ab0c5d4fa78219696591dfbfb67 | Graduation: the curve sent its reserves to the factory and closed. Emitted by graduate |
CurveSellCurveSell(address indexed seller, address indexed recipient, uint256 tokensIn, uint256 quoteOut, uint256 fee, uint256 tax, address indexed referrer, uint256 referrerAmount)topic0 0xffed2de01e98e02aa5962c3a7fe57426258869ae0f56fde79ddd9e5a1f1f54de | A sell on the curve. fee is the base fee, tax the creator fee, referrerAmount the part of fee paid to referrer in the same trade. Emitted by sell, sell (4 args) |
FeesRescuedFeesRescued(address indexed protocolRecipient, address indexed creatorRecipient, uint256 protocolAmount, uint256 creatorAmount, uint256 interfaceAmount)topic0 0x7b590606d50393db8a54fdcb86344c38d12519c7b67050317f67ccb5ee290af1 | The owner, through the factory, paid pending curve fees straight to the protocol and creator recipients (and the launch interface). Emitted by rescueFees |
FeesSweptFeesSwept(uint256 protocolAmount, uint256 buybackAmount, uint256 creatorAmount, uint256 interfaceAmount)topic0 0xb22445664afe8361230e1a54f2612867a7f30ab6fb577ba1bb7945146fb302b8 | |
InitializedInitialized(address token)topic0 0x908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e6 | The factory wired the coin to the curve and trading opened. Emitted by initialize |
InterfaceRescuePaymentFailedInterfaceRescuePaymentFailed(address indexed launchInterface, uint256 amount)topic0 0x13fc474d451710c03b0943644cb956c06ad9b11f3a8c65ce25e81b53938145ff | During a fee rescue on an ERC-20 pair, the launch interface's share could not be sent and went to the creator instead. Emitted by rescueFees |
SnipeTaxChargedSnipeTaxCharged(address indexed recipient, uint256 amount)topic0 0x3bc39a5562b28f5fe8f36cecabfbaa12bb969acf05717994709225fc412a9934 | Separate from CurveBuy so indexers can tell an ordinary fee from a launch-window penalty and surface which wallets sniped the launch. Emitted by buy, buy (4 args) |
SnipeTaxExemptedSnipeTaxExempted(address indexed account)topic0 0xe4b7e48fbd47c2f602bacadee76ad33b16542ddb4997cfc0de04c311adcfa8c7 | An account was exempted from the launch tax during the launch transaction. Emitted by exemptFromSnipeTax |
Addresses are listed for launcher 2.1.0, where new coins launch, and for launcher 2.0, which keeps serving the coins launched before the cutover. A coin stays on the set that launched it. The functions and events are the 2.1.0 contracts'; the 2.0 contracts are an earlier version of the same code and have no interface registry, so check a 2.0 contract's verified source on Basescan before relying on a detail listed here.