A Look At Snowball’s New Zapper Functionality

Ncookie
Snowball
Published in
4 min readDec 17, 2021

Depositing into your favorite Snowball strategies just got a lot easier. Since the latest update to the app’s UI, users can now deposit into LP strategies with AVAX or other tokens with as little as 2 clicks. Let’s briefly look into the technology that makes this possible:

Zapper Contracts

These smart contracts batch many transactions together, allowing users to avoid manually making these in order to deposit funds. When a user deposits AVAX, for example, the contract does the following:

  • Wraps half the AVAX into WAVAX.
  • Swaps the other half of AVAX into the other token in the liquidity pool.
  • Approves the expenditure of WAVAX for the appropriate DEX.
  • Approves the expenditure of the other token for the appropriate DEX.
  • Creates the LP tokens on the appropriate DEX by depositing WAVAX and the other token.
  • Approves the expenditure of the LP token for Snowball’s deposit contract.
  • Deposits the LP tokens into Snowball’s deposit contract.
  • Sends the Snowball receipt tokens received to the user.
  • Approves the expenditure of the receipt token for Snowball’s gauge contract.
  • Deposits the receipt tokens into Snowball’s gauge contract for the user.
  • If there are any tokens leftover from swapping, the contract sends these back to the user.

If not using AVAX, half of the token initially deposited will be swapped for WAVAX or whatever other token is in the liquidity pool.

These contracts are currently deployed for all Snowball strategies based on Pangolin and Trader Joe farms. The contracts can be found here and here respectively, or through our documentation here.

How To Use This New Functionality

Knowing how it works is the first step to feeling safe when using any new technology, but how would you actually use it?

These new contracts have been integrated seamlessly into Snowball’s Compounding UI, and will not require you to navigate to any other page. Let’s take the AVAX - SNOB strategy on pangolin, for example:

Let’s click on DEPOSIT to see what happens:

By default the deposit selects the LP token as usual, but by clicking on the token dropdown we have the following deposit options:

The simplest option here is an AVAX deposit. If picking WAVAX or SNOB however, there will be only 1 extra approval transaction to submit.

As can be observed above, choosing to deposit AVAX will display exactly what the output will be in terms of your pool allocation, alongside the steps necessary to do so.

In this case, the only steps necessary are the following:

  • Click on Approve and sign the transaction through your wallet.
  • Click on Deposit and sign the transaction through your wallet.

That’s it! Your deposited funds will now show on-site, and can always be verified on-chain through Snowball’s gauge smart contracts.

Keep in mind there are some advanced options that can be utilized:

The Max Slippage option determines the maximum amount of slippage tolerated by the swap’s execution. If slippage accounts for more than selected, the transaction will not execute.

The Infinite Approval option, if selected, makes it so that you only need to approve a token’s expenditure once. There is increased risk when utilizing this option though, as discussed here. Make sure you acknowledge these risks prior to exchanging security for convenience.

About Snowball

Snowball is an auto-compounder for liquidity rewards and a Venture DAO. It was the first auto-compounder launched on Avalanche and it prides itself on being entirely community run. If you’d like to be a part of Snowball, join the conversation in Discord or Telegram. Stay up to date on our Twitter.

Website | Twitter | Discord | Telegram | Docs | GitHub

--

--

Snowball
Snowball

Published in Snowball

The Avalanche-native, community-driven venture DAO and auto-compounder. Snowball your returns with us and join us in bringing innovative products to the Avalanche ecosystem.

Ncookie
Ncookie

Written by Ncookie

JavaScript developer and blockchain enthusiast. Developer of @cookietrack_io and technical writer for @snowballdefi & @axialdefi