Guide
Launch protection
The first-buy cap and the anti-snipe window.
Tokens from the current factory (0x09A8…3F60) have two protections. Tokens from older factories do not.
First-buy cap#
The first swap on a curve can take at most 5% of supply: 50,000,000 tokens. In practice this is the creator's buy inside the launch transaction.
- The factory rejects a launch whose minimum output is above 50M tokens.
- The hook checks the exact output of the first swap. A low slippage setting cannot get around it.
- A launch that breaks the cap reverts with
FirstBuyTooLarge. Nothing is created.
Later buys have no per-wallet cap.
Your maximum first buy#
The launch form shows the maximum for your pair and tax. It uses this formula:
maxFirstBuy = virtualQuote * 10000 / (19 * (10000 - taxBps))
| Pair | Tax | Max first buy |
|---|---|---|
| ETH | 1% | about 0.053163 ETH |
| ETH | 5% | about 0.055401 ETH |
| ETH | 10% | about 0.058479 ETH |
| USDG | 1% | about 172.03 USDG |
Anti-snipe window#
Call the launch block L. The launch transaction creates the pool and runs the creator's buy in block L, before anyone else can trade.
| Block | Buys | Sells |
|---|---|---|
L | Only the creator's launch buy | Open |
L+1, L+2 | Revert with AntiSnipe | Open |
L+3 and later | Open | Open |
A sniper's buy in the window does not get a worse price. It fails, and the sniper gets nothing.
While the window is active, the token page shows Anti-snipe active with the block where buys open. Explore cards show Opening.
Read it onchain#
| Hook function | Returns |
|---|---|
launchBlock(token) | The launch block. 0 for older tokens. |
marketOpenBlock(token) | The first block where buys work (L+3). 0 for older tokens. |
antisnipeActive(token) | true during L+1 and L+2. |
MAX_FIRST_BUY_TOKENS() | 50000000e18 |
ANTISNIPE_BLOCKS() | 2 |
antisnipeActive reads the latest block. Your transaction lands in the next one. Treat the market as open when latestBlock + 1 >= marketOpenBlock.