A concentrated position needs both tokens of a pair, in a ratio set by where the price sits inside your range. A one-token deposit does the balancing for you: you send one token or ETH, and ZKDepth's zap sells the share your range does not want, mints the position to your wallet and sends back the rest, all in one transaction.
One transaction, start to finish
You choose the token, the amount and a range in the Liquidity mode of the ticket on the Trade page. It works with Uniswap v3 pools (ZKDepthZapV3) and v4 pools (ZKDepthZapV4).
- 1Take the input and the feeAn ERC-20 is pulled after an exact-amount approval. 25 bps goes to the
FeeRouter, booked against your address so that a referrer you have bound earns 20 % of it. - 2Size and swapThe contract reads the price from
slot0and sells the excess token on the pool you are entering, with a minimum outputmaxSlippageBpsbelow the spot quote. - 3Mint to youThe position manager mints the balanced amounts to
recipient. Less liquidity thanminLiquidityreverts. - 4Return the restThe contract sends its balance of both tokens to the caller. A real swap moves the price a little, so a small remainder is normal.
ZKDepthZapV3.zapIncrease adds to a v3 position you already hold. previewZap returns the exact swap amount zapMint would use.
Picking a range
| Shape | Band around the current price |
|---|---|
SPOT | 5 % below to 5 % above |
CURVE | 25 % below to 25 % above |
WIDE | 50 % below to 50 % above |
| Custom | the prices you type or drag |
For a tokenized stock, presets double both edges while the NYSE is closed, because the token keeps trading on chain while its reference price stands still. Custom ranges are never widened.
The three checks on your deposit
- Swap output. The swap must fill at or above the spot quote less
maxSlippageBps. - Mint amounts. The mint must stay within
maxSlippageBpsof the balanced amounts. This tightens as the range narrows, so a large deposit into a narrow range can revert at the default. Widen the range, deposit less or raise the slippage. - Liquidity floor. The app sets
minLiquidityto the previewed liquidity less your slippage.
The first two are computed from slot0 when your transaction runs, so only minLiquidity is fixed when you sign, and the zap has no TWAP guard. The app will not build the transaction until the pool's price agrees with the quoted price within your slippage. If you call the contract directly, derive minLiquidity from a price you trust.
The app's presets are 50, 100 and 200 bps. Above 500 bps you must acknowledge it, and both zaps refuse more than 5,000 bps. The app sets the deadline 600 s ahead.
Cost
You pay 25 bps of the input and nothing on the way out. The FeeRouter passes 20 % of it to your referrer if you have bound a code, and the rest goes toward the $ZKD buyback. The pool charges its usual fee on the swapped part only: on a 0.30 % pool, a deposit that swaps half its input pays about 0.15 % of the input to the pool.
On Uniswap v4
ZKDepthZapV4.zapMint gives the same result through v4's plumbing. The pool is named by its full PoolKey, and hookData is passed to the hooks. ETH is accepted only when one side of the pool is native ETH. approveOnce(token) sets a standing approval to Permit2, which anyone may call. There is no zapIncrease on v4.
contracts/src/ZKDepthZapV3.solzapMint, zapIncrease, previewZapcontracts/src/ZKDepthZapV4.solzapMint, approveOnce and the unlock callbackpackages/core/src/shapes.tsthe presets and the after-hours widening