twofold×2Docs
Documentation One-click deposit

One-click deposit

A DualPool deposit takes both legs of the pair in the pool's own ratio. If you hold only ETH or only USDG, the zap does the rest. On the app deposit panel, tick Pay with ETH or Pay with USDG, enter an amount, and confirm once. One transaction buys the leg you lack, deposits both, and sends any remainder back to your wallet.

What the transaction does

  1. Splits your budget against the pool's live ratio, read from the hook's deposit preview, so the two legs land in the proportion the pool takes.
  2. Buys the missing leg on the deepest hookless Uniswap v4 pool for that pair on Robinhood Chain. An ETH payment into a USDG pool sells ETH for USDG on the WETH/USDG market first, then buys the equity leg with the USDG.
  3. Deposits both legs through the hook, the same call a two-sided deposit makes.
  4. Refunds the remainder. Share rounding favors the pool, so about half a percent of the budget goes unspent. You get it back in the same transaction, with any WETH unwrapped to ETH.

The PoolZapper contract at 0x2eF1C576797a51FB60B25d9f946D2562d2d2F9Fc runs all four steps atomically. If any step fails the transaction reverts and nothing leaves your wallet. The contract has no owner, no admin functions and no upgrade path. Blockscout holds its verified source, and it appears under Contracts.

Where the position lives

Because the zapper makes the deposit, the hook credits the shares to the zapper, and the zapper records in its own ledger which wallet owns them. Your entry is an ERC-1155 token named Twofold LP (TWO-LP), one id per pool. That is why your wallet's simulator shows you receiving a position instead of only spending ETH. You hold the same share of reserves, earn the same vault yield on the USDG leg and the same swap fees as a direct depositor. Only the ledger holder can withdraw, and sending the token to another wallet sends the exit right with it.

You withdraw with the same button as any other position. The pools page reads hook shares and zapper shares and shows them split. A zapped position leaves through the zapper's zapOut, which burns the ledger entry and pays both legs to your wallet in one transaction. If you also hold shares directly on the hook, the app asks you to confirm that part separately.

Price impact and limits

  • Quoted at your size. The reference markets vary widely in depth, so the pools page quotes the swap for the amount you entered rather than for one unit. The preview shows what the pool will fill.
  • A floor, never zero. The transaction carries a minimum output 1 percent under the quote. If the market moves against you by more than that between preview and confirmation, the deposit reverts.
  • Impact above 2 percent is shown; above 15 the page refuses. A swap that would move the reference market more than 15 percent does not get built. Enter a smaller amount or make a two-sided deposit.
  • Only where a market exists. If the other leg has no hookless reference pool, the pools page does not offer the box for that pool. A two-sided deposit still works everywhere.

You pay the reference pool's swap fee and its price impact. Twofold adds no fee for the zap.

This is one section of the Twofold documentation. Read all of it.