Section 15 of 18

Build
+15 Lynx

The Factory and Pool Deployment

Key takeaway: V3 pools take no constructor arguments. The factory stashes (factory, token0, token1, fee, tickSpacing) in a transient parameters storage slot, CREATE2-deploys the pool with salt keccak256(abi.encode(token0, token1, fee)), and the pool's constructor calls IUniswapV3PoolDeployer(msg.sender).parameters() to read its configuration into immutables. Because the init code never varies, the init code hash is a chain-wide constant — which is what lets the periphery compute any pool's address offline and verify callbacks without trusting anyone. Around this trick sits ordinary governance: a fee-tier registry (500/10, 3000/60, 10000/200 at launch, extendable via enableFeeAmount, never reconfigurable), token sorting, a getPool mapping populated in both directions, and a setOwner handoff that instantly re-parents protocol-fee control of every pool ever deployed.

What You Are Building

Two contracts: UniswapV3PoolDeployer (the deploy function and its transient parameters slot) and UniswapV3Factory (fee-tier registry, createPool, setOwner, enableFeeAmount). A condensed pool contract is provided — only its constructor matters here.

Your Code

Solution.sol
Solidity
Loading editor...

Requirements

Write your implementation, then click Run Tests. Tests execute on the server.

Sign up free — keep reading + earn 15 Lynx

Zealynx Academy is free. Track your progress, earn Lynx, and climb the leaderboard.

Sign up free to continue

Already have an account? Log in