02 · The hooks
Cohort cap
Each wallet's buys stay under a cap that grows every block, then disappears.
Cohort cap stops one wallet from buying the whole launch in the first blocks, without banning sells.
What a trader sees
On a buy, the hook adds the launch tokens they received to a running total for that wallet. If the total would pass the cap that is in force this block, the buy reverts. A sell does not add to the total and does not get blocked.
The cap starts at 1 token and ends at 5 tokens over 100 blocks. In block 0 a wallet can buy until it has received 1 token from this pool. Selling does not lower that count. Halfway through the window the cap is 3. After the window the cap is gone and the wallet can buy freely. A second buy inside a cooldown, if you set one, reverts even when the cap still has room.
What you set
- The starting cap and the ending cap, in launch tokens.
- How many blocks the cap takes to grow from the start to the end.
- How many blocks a wallet must wait between buys. Zero means no wait.
- The launch token, and the router you trust to name the real trader.
Good to know
The cap measures tokens received, not quote spent. A wallet cannot dodge it by waiting for a cheaper price. Two wallets have two totals. The router pins the wallet. A public router that is not the trusted one is treated as a single trader, so do not point this at the stock v4 router.
NextConviction lockLock the tokens you bought and the creator fee gets smaller.