Contract Addresses

Launchpad

0xE028dF0E61E49ef71F8Cb1DAB55Fa679124044a6

ReferralRouter

0x8D43C135b7040C27542A4f33c34c874c94e1B437

ReferralHandlerV2

0x8F419e07aF59327aDa7640B917B2122De701Ed9F

AccessRegistry

0x65fE85193C7e791d0E94eD0632500B8fEf34383c

Launchpad Contract

The Launchpad contract manages token creation and bonding curve mechanics for new token launches on MuchFi.

Constructor Parameters

ParameterTypeDescription
_tokenImplementationaddressToken implementation contract
_accessRegistryaddressAccess registry contract
_curveaddressBonding curve contract
_treasuryaddressTreasury address for fees
_lpReceiveraddressLP token receiver address
_creationCostuint64Cost to create a new token
_boosterFractionuint64Booster fraction parameter

Core Functions

Token Creation

FunctionDescription
createLaunchpadToken(tokenConfig, metadataConfig, snipeConfig, curveParameters)Create a new launchpad token with configuration
TokenConfig struct:
  • name - Token name
  • symbol - Token symbol
  • initialSupply - Initial token supply
MetadataConfig struct:
  • ipfsHash - IPFS hash for token image
  • website - Project website URL
  • twitter - Twitter handle
  • telegram - Telegram group
  • description - Token description
  • metadata - Additional metadata

Trading Operations

FunctionDescription
buyExactEth(token, minAmountOut)Buy tokens with exact ETH amount (payable)
buyExactTokens(token, amountOut)Buy exact amount of tokens (payable)
sellExactTokens(token, amountIn, minAmountOut)Sell exact amount of tokens
sellExactEth(token, amountOut, maxInput)Sell tokens for exact ETH amount

Price Calculations

FunctionReturnsDescription
quote(token, amount, quoteType)QuoteGet comprehensive quote for trade
quoteBuyExactEth(token, amount)(uint256, uint256)Quote for buying with exact ETH
quoteBuyExactTokens(token, amount)(uint256, uint256)Quote for buying exact tokens
quoteSellExactTokens(token, amount)(uint256, uint256)Quote for selling exact tokens
quoteSellExactEth(token, amount)(uint256, uint256)Quote for selling to get exact ETH

Token Information

FunctionReturnsDescription
getTokenInfo(token)TokenInfoGet detailed info for a token
getAllTokens()address[]Get all launched token addresses
getAllTokensInfo()TokenInfo[]Get info for all tokens
getTokens(start, end)address[]Get tokens in range
getTokensInfo(start, end)TokenInfo[]Get token info in range
getMostRecentTokens(num)address[]Get most recent tokens
getMostRecentTokensInfo(num)TokenInfo[]Get most recent token info
getTokensCount()uint256Total number of launched tokens
getTokensByCreator(creator)address[]Get tokens by creator address
getTokensInfoByCreator(creator)TokenInfo[]Get token info by creator
getTokensCountByCreator(creator)uint256Count of tokens by creator
tokenToGauge(token)addressGet gauge address for token
tokenToCreator(token)addressGet creator address for token

Admin Functions

FunctionDescription
setAccessRegistry(address)Update access registry
setBondingCurveFraction(uint64)Set bonding curve fraction
setBoosterFraction(uint64)Set booster fraction
setCreationCost(uint64)Set token creation cost
setCurve(address)Set bonding curve contract
setGaugeFees(feeParams)Set gauge buy/sell fees
setGaugeImplementation(address)Set gauge implementation
setLpReceiver(address)Set LP receiver address
setTokenImplementation(address)Set token implementation
setTreasury(address)Set treasury address

State Variables

VariableTypeDescription
accessRegistryaddressAccess registry contract
bondingCurveFractionuint64Bonding curve fraction
boosterFractionuint64Booster fraction
creationCostuint64Cost to create token
curveaddressBonding curve contract
gaugeFees(uint128, uint128)Buy and sell fees
gaugeImplementationaddressGauge implementation
lpReceiveraddressLP receiver address
tokenImplementationaddressToken implementation
treasuryaddressTreasury address

Constants

ConstantDescription
FRACTION_DENOMINATORDenominator for fraction calculations
MAX_BONDING_FRACTIONMaximum bonding fraction
MAX_BOOSTER_FRACTIONMaximum booster fraction
MAX_CREATION_COSTMaximum creation cost
MAX_GAUGE_FEEMaximum gauge fee
MIN_INITIAL_SUPPLYMinimum initial supply

Events

EventDescription
NewToken(creator, token, gauge, curve)Emitted when new token is created
AccessRegistrySet(newRegistry, oldRegistry)Access registry updated
BondingCurveFractionSet(newFraction, oldFraction)Bonding fraction updated
BoosterFractionSet(newFraction, oldFraction)Booster fraction updated
CreationCostSet(newAmount, oldAmount)Creation cost updated
CurveSet(newCurve, oldCurve)Bonding curve updated
GaugeFeesSet(newBuyFee, oldBuyFee, newSellFee, oldSellFee)Gauge fees updated
GaugeImplementationSet(newImpl, oldImpl)Gauge implementation updated
LpReceiverSet(newReceiver, oldReceiver)LP receiver updated
TokenImplementationSet(newImpl, oldImpl)Token implementation updated
TreasurySet(newTreasury, oldTreasury)Treasury updated

Error Types

ErrorDescription
Launchpad__ExcessiveBondingFractionBonding fraction too high
Launchpad__ExcessiveBoosterFractionBooster fraction too high
Launchpad__ExcessiveCreationCostCreation cost too high
Launchpad__ExcessiveGaugeFeeGauge fee too high
Launchpad__InsufficientValueInsufficient ETH sent
Launchpad__InvalidIndexInvalid token index
Launchpad__InvalidTokenInvalid token address
Launchpad__InvalidTotalSupplyInvalid total supply
Launchpad__TransferFailureToken transfer failed
Launchpad__UnauthorizedCaller not authorized
Launchpad__ZeroAddressZero address provided