Addresses
One FLOOR per chain. On EVM it is FloorAmm, an upgradeable proxy at one address on every chain. On Solana it is the floor_amm program.
EVM
FloorAmm on Ethereum, BSC, HyperEVM, Robinhood Chain, Arc, Base, Arbitrum: not deployed yet.
Solana
- floor_amm
7TFse4fPC383KWiSTHXfdRrNBSzLWpsB8VNF9TJFLooR
Launches
Each launch has a numeric id. launchCount() counts them, and launchOf(id) and launchToken(id) read one. LaunchCreated marks a new launch, Graduated the buy that sold its window out, and ScheduleDone the end of its Stack.
Calls
function launchCount() view returns (uint256)function launchOf(address token) view returns (uint256 launchId)function launchToken(uint256 launchId) view returns (address)function launchQuote(uint256 launchId) view returns (address)Events
event LaunchCreated(uint256 indexed launchId, address indexed token, address indexed quote, address creator, uint8 presetId, uint32 presetVersion, bytes32 presetHash, uint256 p0X64, uint256 raise, uint256 windowTokens, uint256 creatorBuyTokens, uint256 createFee, string name, string symbol, string uri, bool listed, uint256 quoteUsdCentsX64, uint256 nativeCreateFee)event Graduated(uint256 indexed launchId, uint256 windowPriceX64, uint256 priceX64, uint256 windowRaised, uint256 windowTokens)event ScheduleDone(uint256 indexed launchId, uint256 priceX64, uint256 tailTokens, uint256 lotTokens, uint256 tailLiq, uint256 tailSqrtEndX64)State
function launchState(uint256 launchId) view returns ((address token, address quote, address creator, uint8 presetId, uint32 presetVersion, bytes32 presetHash, bool graduated, bool ended, uint64 createdAt, uint64 createdBlock, uint64 creatorUnlockAt, uint64 graduatedBlock, uint256 supply, uint256 sOut, uint256 windowLeft, uint256 inventory, uint256 lotTokens, uint256 lotCost, uint256 tailTokens, uint256 creatorLocked, uint256 floor, uint256 cushion, uint256 p0X64, uint256 priceX64, uint256 floorX64, uint256 raise, uint256 windowTokens, uint256 windowRaised, uint16 slotRateBps, uint32 slotBoughtPpm))function launchPots(uint256 launchId) view returns (address quote, uint256 floor, uint256 cushion)function launchLivePrice(uint256 launchId) view returns (uint256 mathX64, uint256 chainX64)function launchSpec(uint256 launchId) view returns (bytes)function launchTail(uint256 launchId) view returns (uint256 liq, uint256 sqrtX64, uint256 sqrtEndX64, uint256 money, uint256 tokens, uint256 priceX64)Trade
A launch trades against FloorAmm from its first block. quoteBuy and quoteSell answer what a trade would do now, fees included. A buy pays in the native coin with the call, or in a token after approve. A sell needs the token’s approve or a permit. A minimum out is required.
Every trade emits Trade: the money, the tokens, the fee legs, the price before and after, the floor after, both pots and the tokens outside the program.
Quote
function quoteBuy(uint256 launchId, uint256 amountIn, address to) view returns ((uint256 tokensOut, uint256 spent, uint256 refund, uint256 priceAfterX64, bool graduatedNow, bool endedNow, bool budgetHit) r)function quoteSell(uint256 launchId, uint256 tokensIn, address to) view returns (uint256 quoteOut)Trade
function buy(uint256 launchId, uint256 amountIn, uint256 minTokensOut, address to, uint256 deadline) payable returns ((uint256 tokensOut, uint256 spent, uint256 refund, uint256 priceAfterX64, bool graduatedNow, bool endedNow, bool budgetHit) r)function sell(uint256 launchId, uint256 tokensIn, uint256 minQuoteOut, address to, uint256 deadline) returns (uint256 quoteOut)function sellWithPermit(uint256 launchId, uint256 tokensIn, uint256 minQuoteOut, address to, uint256 deadline, uint256 permitDeadline, uint8 v, bytes32 r, bytes32 s) returns (uint256 quoteOut)function buyFromBalance(uint256 launchId, uint256 minTokensOut, address to, address refundTo, uint256 deadline) returns ((uint256 tokensOut, uint256 spent, uint256 refund, uint256 priceAfterX64, bool graduatedNow, bool endedNow, bool budgetHit) r)function sellFromBalance(uint256 launchId, uint256 minQuoteOut, address to, uint256 deadline) returns (uint256 quoteOut)Events
event Trade(uint256 indexed launchId, address indexed trader, address indexed recipient, bool isBuy, uint256 quoteGross, uint256 quoteNet, uint256 refund, uint256 tokens, uint256[7] fees, uint256 traderRef, uint256[4] split, uint256[5] credits, uint256 priceBeforeX64, uint256 priceAfterX64, uint256 floorAfterX64, uint256 floor, uint256 cushion, uint256 reserveTokens, uint256 sOut, uint256 floorToken, uint256 msPlatform, uint256 msFloor, uint256 tailPay, uint256 tailToFloor, uint256 tailTokens, uint256 tailFromFloor, uint256 tailFromMoney, uint256 msHolder, uint256 polOut, uint256 polPay, uint256 polTokens, uint256 polGross, uint256 holderFee, uint256 liveBuyPriceX64, uint256 polMoney)event PotsMoved(uint256 indexed launchId, uint256 floor, uint256 cushion, uint256 bidSqrtX64, uint256 bidLiq, uint256 lotTokens, uint256 lotCost, uint256 tailSqrtX64, uint256 tailMoney)Zap (any token in)
function buyWithEth(uint256 launchId, bytes swapData, uint256 minQuoteIn, uint256 minTokensOut, address to, uint256 deadline) payable returns (uint256 tokensOut, uint256 quoteIn)function buyWithToken(uint256 launchId, address tokenIn, uint256 amountIn, bytes swapData, uint256 minQuoteIn, uint256 minTokensOut, address to, uint256 deadline) returns (uint256 tokensOut, uint256 quoteIn)Claims
One claim(wallet, types, launchIds, quotes) pays what a wallet is owed, chosen by type bits: 1 creator, 2 creator referrals, 4 Team Slot, 8 trader referrals, 32 extra legs, 64 a failed payout and 128 the Team Buy. owedOf reads it first.
Calls
function owedOf(address wallet, address quote) view returns ((uint128 creator, uint128 creatorRef, uint128 teamSlot, uint128 traderRef, uint128 holder, uint128 extra))function owedOfMany(address wallet, address[] quotes_) view returns ((uint128 creator, uint128 creatorRef, uint128 teamSlot, uint128 traderRef, uint128 holder, uint128 extra)[])function claim(address wallet, uint256 types, uint256[] launchIds, address[] quotes_) returns (uint256[] paid)Events
event Claimed(address indexed wallet, address indexed sender, address indexed quote, uint8 types, uint256 creator, uint256 creatorRef, uint256 teamSlot, uint256 traderRef, uint256 holder, uint256 extra, uint256 amount)Token
ERC-20, 18 decimals, 1B minted to the program at create. No owner and no mint. Anyone can burn their own tokens.
Calls
function name() view returns (string)function symbol() view returns (string)function decimals() view returns (uint8)function totalSupply() view returns (uint256)function balanceOf(address account) view returns (uint256)function approve(address spender, uint256 value) returns (bool)function transfer(address to, uint256 value) returns (bool)function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s)function burn(uint256 value)function program() view returns (address)function launchId() view returns (uint256)Solana
An Anchor program. A launch is a Launch account, and its trades are buy, sell and buy_from_balance. Events are Anchor CPI events signed by the program’s event authority.
floor_amm events
LaunchCreatedTradePotsMovedGraduatedScheduleDonePotsSweptClaimedTeamShareBoughtPlatformWithdrawnHolderWithdrawnPresetWrittenQuoteWrittenConfigWrittenMetadataBaseSetMilestonesHeldMilestonesRefundedMilestonesReleasedTeamSlotOpenedTeamSlotMemberTraderRefOpenedTraderLinkOpenedTraderRefClearedCreatorBuyUnlockedRefOwedOpenedRefsRolledGenesisAcceptedHandleBoundQuoteShortBackingCreditedCutWithdrawnRoleRegisteredClaimsLutSetNativeFeesWithdrawnGenesisContributedGenesisMigratedRefundedGenesisOpenedGenesisClaimedGenesisRefundOwedGenesisRefundPaidGenesisDustSweptGenesisSolConvertedGenesisWagmiBoughtGenesisWagmiOpenedGenesisWagmiClaimedGenesisWagmiDustSweptGenesisListedContributedGenesisListRootSetBurnsSyncedTokensBurned