How it works
A zk-pad coin goes through four stages: launch, trading, fee collection and claiming. This section covers the first three. Claiming is part of the privacy model.
Launch
The creator calls ZkPadFactory.deployToken once. In that single transaction the factory:
- deploys a fixed-supply
ZkPadTokenwith CREATE2; - asks the
ZkPadHookto create and initialize a PancakeSwap Infinity CL pool against an allow-listed quote token, at a starting price the creator picked within the quote token's bounds; - has the
ZkPadLpLockerplace 100% of the supply in one to seven single-sided positions, which it owns forever (see single-sided liquidity); - optionally executes a dev buy for the creator at the starting price;
- optionally arms the anti-sniper fee.
The TokenLaunched event records the token, the pool id, the quote token and the opaque
beneficiary id that receives the fees.
Trading
The coin trades on PancakeSwap Infinity from the first block. There is no bonding curve and no
"graduation". Any Infinity-compatible router works, because the hook does not rely on custom
hookData. The zk-pad UI uses the minimal ZkPadSwapRouter.
Every swap pays the creator-chosen fee F (1% to 5%), plus PancakeSwap's own protocol fee of about 0.03%.
Fee collection
Fees are collected automatically. Before each swap, the hook:
- pays out the protocol fees accumulated by earlier swaps to the factory (the treasury share);
- asks the locker to collect the LP fees of the locked positions, convert the token-side part
to the quote token, and deposit the result into the
FeeVaultunder the coin's beneficiary id.
Anyone can also trigger collection with ZkPadLpLocker.collectRewards(token). A failing
collection never blocks trading; the fees simply wait in the positions until the next attempt.
A collection whose conversion would run at a price that an earlier swap in the same block pushed
against it is deferred to a later block (RewardsDeferred).