Model V1 mechanics
One transaction, no phases. The token exists, the pool exists, the liquidity is locked, and the creator has bought whatever their surplus ETH bought — all before the transaction returns.
What launchToken does, in order
- Checks the caller may 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.
- Forwards the launch fee to the locker's protocol fee recipient, then deploys the token with the whole supply minted to the factory.
- Creates and initializes the V3 pool at
initialTickand mints one single-sided position — the entire supply on the token side, nothing on the quote side, spanning from the opening tick out to the maximum usable tick. The creator provides no counter-capital; quote asset enters only as people buy. - Transfers the position NFT to
AgiLaunchLockerand callslockPosition, which snapshots the protocol fee share for that token. - If a fee wallet was given, registers it as the creator's fee redirect.
- If any ETH remains above the launch fee, executes the opening buy through the DEX router to the fee wallet.
Launch restrictions live in the token
AgiLauncherToken enforces maxWalletLimit() and maxTxLimit() in
_update for restrictionBlocks blocks after deployment, and only on transfers out
of the pair pool — that is, on buys, not on ordinary wallet-to-wallet transfers. After
restrictionEndBlock the checks are dead code and the token is an ordinary fixed-supply ERC-20
with no owner, no mint and no pause. The factory forces maxTxBps = maxWalletBps × 1.1, so
the two limits cannot be configured inconsistently.
One rule is stricter than the caps: in the launch block itself, a buy out of the pool
reverts with LaunchBlockBuyBlocked for everybody except the recipient of the factory's own
atomic opening buy. The pool is identified by asking the configured V3 factory for it, at any fee tier, so a
DexConfig whose factory belongs to a different Uniswap deployment than its position manager
disables all of this silently instead of reverting.
LP fees
- Trading on a V1 pool pays the Uniswap V3 LP fee and nothing else: 1% (
poolFee10000 in the DEX config). There is no creator tax in V1. AgiLaunchLocker.collectFees(token)collects both sides of the position's accrued fees. It pays 30% to the protocol wallet and 70% to the creator's fee wallet.- That 30 is a percent snapshotted per token when its position was locked (
initialProtocolFeeShare = 30on the locker). The ceiling isMAX_PROTOCOL_FEE_SHARE = 50, so the protocol can never take more than half. - It is not permissionless: the caller must be the locker owner, the token's deployer, the current fee recipient, or an address the owner whitelisted with
setFeeCollector. Whoever calls, the money goes to those two fixed 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.
- Changing
protocolFeeShareaffects future launches only; each token keeps the share recorded when its position was locked. ChangingprotocolFeeRecipientdoes apply immediately, since the locker reads it at collection time.
graduationStatus(token) reads the paired principal inside the locked position and compares it
against a threshold. Nothing happens when it is crossed: there is no migration, no second pool and no
unlock. It is a progress read for a UI, and the position stays locked forever either way.