Protected Zap

Enter a two-token position with one token, in a single atomic transaction.

What it does

You supply one token. Part of it is swapped for the other side, both amounts are deposited into your chosen range, the position NFT is minted to you, and anything left over is swept back to you. All in one transaction.

The route

The swap goes directly through one canonical Uniswap v3 pool, and the whole operation is executed by Robinhood Chain’s canonical SwapRouter02 at 0xcaf681a66d020601342297493863e78c959e5cb2. No SquirtFi contract is involved, and no custom contract was deployed for this.

The router’s deployed bytecode was rebuilt from its verified 63-file compiler input with the exact reported settings and matched the on-chain runtime byte for byte. The runtime hash is re-checked on every preview.

Uniswap’s Universal Router is deliberately not used. The deployment on this chain is a fork whose position-manager command supports decrease, collect and burn but rejects v3 mint.

What happens inside the transaction

  1. 1

    Swap the computed portion

    Straight from your wallet through the one canonical pool, bounded by both a minimum output and a direction-specific price limit.

  2. 2

    Pull the retained portion

    Only the part of your input that was not swapped is moved into the router.

  3. 3

    Mint the position

    Through the router’s adapter into Uniswap’s canonical position manager, with the same minimum-amount bounds a manual mint uses.

  4. 4

    Mint the NFT to you

    The recipient is your address, not the router and not SquirtFi.

  5. 5

    Sweep the remainder

    Both token leftovers go back to the same wallet that sent the transaction.

How the split is chosen

The share to swap is solved with a bounded binary search using at most twenty direct quoter calls. Each candidate is evaluated against the quoted post-swap price and the same integer range-composition maths the mint uses, so the split accounts for the pool fee, the price movement the swap itself causes, tick crossings, token ordering and your range.

Because it is solved against a quote, the split is a best estimate at a specific block, not a guarantee. The protection bounds below are what make a bad outcome revert instead of execute.

Protection bounds

BoundWhat it protects
Minimum swap outputThe swap cannot return less than the amount you signed for.
Square-root price limitA direction-specific ceiling on how far the swap may move the pool.
Mint minimum amountsThe deposit cannot execute below the amounts implied by your slippage setting.
DeadlineThe whole multicall expires rather than sitting pending indefinitely.
Slippage and price impact capsIndependently bounded by you, and hard-capped at 300 basis points regardless.

Quotes carry the block and timestamp they came from, and the chain, account, freshness and deadline checks all run again immediately before signing. A stale quote is rebuilt, not signed.

A pre-existing balance of either token sitting on the router refuses the operation, so another user’s leftover dust cannot contaminate your preview or your accounting.

Atomic, but not risk-free

The swap, the pull, the mint and the sweep share one transaction. If any inner call fails, all of them revert together: you cannot end up having swapped without having minted.