Contract reference
These pages are derived from the interfaces in contracts/src/interfaces/ and the NatSpec in the
implementations. When a page and the source disagree, the source wins.
| Contract | License | Page |
|---|---|---|
ZkPadFactory | GPL-2.0-or-later | Factory |
ZkPadToken | MIT | Token |
ZkPadHook / ZkPadHookBase | GPL-2.0-or-later (imports Infinity) | Hook |
ZkPadLpLocker | GPL-2.0-or-later | LP locker |
ZkPadMevDescendingFees | GPL-2.0-or-later | MEV module |
ZkPadSwapRouter | GPL-2.0-or-later | Swap router |
FeeVault | MIT | FeeVault |
RailgunShieldAdapter, ShieldSender | MIT | Railgun adapter |
QuoteRegistry, PancakeV3RouteExecutor | MIT | Consolidation |
InfinityCLRouteExecutor | GPL-2.0-or-later (imports Infinity) | Consolidation |
Conventions
- Solidity 0.8.26, EVM cancun, via-IR, OpenZeppelin v5.4.
- Custom errors everywhere,
nonReentranton external state changers, SafeERC20, CEI. - Admin contracts use Ownable2Step. On mainnet the owner is currently the deployer EOA; a hand-over to a multisig (and a timelock) is planned. See addresses.
- Fees are in pips: 1,000,000 = 100%, so 10,000 = 1% and 50,000 = 5%.
- Ticks in configuration are in token0 orientation (as if the new token were token0); the contracts negate them when the token sorts above the quote.
Constants at a glance
| Constant | Value | Where |
|---|---|---|
TOKEN_SUPPLY | 1_000_000_000e18 | Factory |
TICK_SPACING | 200 | Factory |
MIN_FEE / MAX_FEE | 10_000 / 50_000 pips (1% / 5%) | Hook |
MAX_MEV_FEE | 800_000 pips (80%) | Hook |
MAX_MEV_MODULE_DELAY | 2 minutes | Hook |
PROTOCOL_SHARE_BPS | 2_500 (25%) | Hook |
MAX_LP_POSITIONS | 7 | Locker |
BASIS_POINTS | 10_000 | Locker |
ID_TAG | keccak256("zkpad.beneficiary.v1") | FeeVault |
KIND_STEALTH / KIND_HANDLE | 1 / 2 | FeeVault |
MIN_FALLBACK_DELAY | 180 days | FeeVault |
MIN_BIND_DELAY / MAX_BIND_DELAY | 1 days / 30 days | FeeVault |
DELAY_GUARD | 1 second | MEV module |
Deployed addresses: see addresses.