Skip to main content
Chain Media

Protocols, chains and markets, reported

Zap Deposits Add Contract Work Beyond a Direct LP Deposit

A zap deposit costs more gas than a direct deposit because it swaps tokens, adds liquidity, deposits LP and refunds dust through extra contract calls.

The Chain Media Editors5 min read

Zap Deposits Add Contract Work Beyond a Direct LP Deposit

A zap deposit uses more gas within its transaction because it performs more contract work than depositing an LP token directly. A Beefy ZAP swaps part of a single token, adds liquidity, deposits the resulting LP token and returns leftover dust; each added call and storage write uses gas.

A zap turns one token into a vault deposit

A Beefy ZAP takes a single token in and returns mooTokens out. It routes part of the input through a DEX router, then calls the pool’s addLiquidity function with the swapped token and the remainder. That call adds liquidity, mints an LP token and updates the pool’s reserves.

The zap then deposits the LP token into the vault. The vault records the deposit and issues mooTokens, which represent the deposited position. If the swap and liquidity addition leave token dust, the zap sends that remainder back to the wallet before the transaction finishes.

Those actions happen in one Ethereum transaction, but they still require multiple contract calls. The router executes the swap; the pool handles liquidity; the vault accepts the LP token; and the zap may make final transfers. Each step adds execution work compared with sending an LP token straight to a vault.

The extra gas comes from calls and state changes

A direct deposit starts with an LP token and calls the vault to deposit it. The vault updates its accounting and issues mooTokens. A zap has to do that vault work too, plus the swap, the pool interaction and any dust refunds.

Contract calls consume gas as they execute instructions and interact with other contracts. Storage writes add to that work. On Ethereum, a transaction has a 21,000-gas base cost, and writing a new non-zero storage slot with SSTORE costs 20,000 gas. A zap’s total depends on the work its contracts perform, including which storage slots need updating.

The number of calls alone does not give an exact gas total. A storage write can cost differently depending on the slot’s existing state, and the amount of work depends on the route through the contracts. The useful comparison is the full sequence of operations, not simply “one transaction versus several.”

Bundling steps can reduce total gas across the sequence

Take a user who holds one token but wants to enter a vault that accepts an LP token. Doing it manually means swapping part of the token, adding liquidity with the two resulting assets, then depositing the LP token. That is three Ethereum transactions. Each transaction carries its own 21,000-gas base cost, for 63,000 gas in base costs across the sequence.

The zap performs those same stages inside one transaction, so the sequence pays one base cost instead of three. Its contract calls and storage writes still cost gas, and the transaction does more execution work than a direct LP deposit. But compared with manually swapping, adding liquidity and depositing, the saved base costs often make the zap cheaper overall.

This is the comparison that matters for a single-token holder: compare the zap with all the transactions needed to reach the same vault position. Comparing only a zap with a direct deposit misses the swap and liquidity addition the direct depositor would have to complete first. A direct deposit is cheaper when the wallet already holds the required LP token; the zap bundles the earlier work when it does not.

For a reader deciding whether to convert a single asset before entering a vault, the Beefy app helps put that choice in context: the Beefy app is a multichain yield optimizer that automatically compounds rewards from supported DeFi strategies. A zap suits the case where the reader holds a single token and wants the vault position without manually submitting each conversion step.

The premium depends on what the wallet holds

A zap’s extra gas buys a combined conversion and deposit. The router swap, addLiquidity call, vault accounting and possible dust transfers explain why its transaction uses more gas than a direct LP deposit. A user who already has the LP token avoids the swap and liquidity work by depositing directly.

For example, a user holding only one side of a pool can use a zap to convert part of that balance, add liquidity and deposit the LP token in one transaction. If the user already holds the right LP token, a direct vault deposit is the shorter path. In either case, the relevant cost is the gas for the whole route from the wallet’s starting asset to the vault position.

That distinction applies when comparing a Beefy ZAP with a direct deposit on Ethereum or Arbitrum: the zap adds contract work in exchange for combining steps. The single-transaction gas total may be higher than the direct deposit’s, while the full sequence may be lower than carrying out the swap, liquidity addition and deposit separately.