Model V1 mechanics

One transaction, no phases: when it returns, the token and the pool exist, the liquidity is locked and the creator's opening buy is done.

What launchToken does, in order

  • Checks the caller can launch, that msg.value ≥ launchFee, and that the config and DEX ids are valid and enabled.
  • Computes the token's CREATE2 address and refuses if a pool for that pair and fee tier already exists.
  • Sends the launch fee to the locker's protocol fee recipient, then deploys the token with the whole supply minted to the factory.
  • Creates the V3 pool at initialTick and mints one single-sided position: the entire supply on the token side, from the opening tick to the maximum usable tick. The quote asset only enters as people buy.
  • Transfers the position NFT to AgiLaunchLocker and calls lockPosition, which records the protocol fee share for that token.
  • If a fee wallet was given, registers it as the creator's fee redirect.
  • If ETH remains above the launch fee, executes the opening buy through the DEX router, delivered to the fee wallet.

Launch limits live in the token

AgiLauncherToken enforces maxWalletLimit() and maxTxLimit() for restrictionBlocks blocks after deployment, only on transfers out of the pool, that is, on buys. After restrictionEndBlock it is a plain fixed-supply ERC-20 with no owner, no mint and no pause. The factory sets maxTxBps = maxWalletBps × 1.1.

In the launch block itself, a buy out of the pool reverts with LaunchBlockBuyBlocked for everyone except the recipient of the factory's opening buy.

LP fees

  • A V1 pool charges the Uniswap V3 LP fee of 1% and nothing else. AgiLaunchLocker.collectFees(token) pays 30% of it to the protocol wallet and 70% to the creator's fee wallet.
  • The 30% is fixed per token when its position is locked and can never be set above 50%.
  • Only the locker owner, the token's deployer, the current fee recipient or an address whitelisted with setFeeCollector can call it. Whoever calls, the money goes to the same two recipients.
  • The creator's share goes to the fee redirect if one is set, otherwise to the deployer. Only the deployer or the factory can change the redirect.
  • A change to protocolFeeShare applies to future launches only. A change to protocolFeeRecipient applies immediately, since the locker reads it at collection time.
Graduation does not exist in V1

graduationStatus(token) compares the paired principal in the locked position against a threshold, for display. Nothing happens when it is crossed: no migration, no second pool, no unlock.