Welcome to our Help Center 👋

How to Zap Directly from Gnosis Safe

Written by zes
Updated 1 year ago

Gnosis Safe has become the go-to tool for teams to secure company crypto assets by requiring multiple signatures to manage funds. Here's a quick video tutorial on how to set up a wallet for your team with Gnosis.

Once signed in, their web app enables easy interactions with existing DeFi applications such as Aave, Balancer and Synthetix. While Zapper is finalizing a direct integration within this "Apps" section, we wanted to share a tutorial on how you could interact with Zap contracts directly from your Gnosis Safe via their custom transaction builder.

You need to first decide which opportunity you would like to "Zap" into and which asset you will be depositing with.

You can find a list of available opportunities on zapper.fi/invest and a list of corresponding Zap contracts on docs.zapper.fi/build/smart-contracts. Each generalized DeFi action has a dedicated Zap contract. For example, adding liquidity to any liquidity pool on Uniswap V2 using a single asset could be executed via a general Unipool Zap by calling the ZapIn function with pre-filled parameters to specify which pool you are joining, with what asset, and where the liquidity pool token proceeds should be sent (with this last one you could actually redirect the Zap proceeds to be sent to a third party if you want to).

If you are using ETH as your deposit - you are able to call the contract function directly and make your deposit but if you are using ERC20 tokens (DAI, LINK, SNX, YFI, etc.), you will first need to approve the chosen Zap contract to use them.

Example

Adding liquidity to the $YFI/$ETH pool on Uniswap V2 with $DAI:

  1. Paste in the DAI token contract address 0x6b175474e89094c44da98b954eedeac495271d0f into Multisend transaction builder on Gnosis Select Approve function.
  2. Look up Zap In contract for adding liquidity to uniswap V2 pools address: 0x0286Ab4C526C0F28EC31dBb08755C999f441A58F. For a list of other Zapper contracts, please see docs.zapper.fi/build/smart-contracts.
  3. In approve function, paste in Zap contract address under usr(address) and enter how many DAI tokens you would like to approve the Zap contract for (this means you will be able to Zap in up to this amount in DAI. Keep in mind its in wad so for 100 DAI you would enter 100000000000000000000 (100 * 1e18 = 1e20).
  4. Click Send Transaction.
  5. Now paste the Zap contract on top.
  6. Select ZapIn function.
  7. _toWhomToIssue (address): Enter wallet address where you want to send proceeds to (usually this is your address).
  8. _FromTokenContractAddress (address): Enter DAI contract address.
  9. _ToUnipoolToken0 (address): Enter YFI token contract address.
  10. _ToUnipoolToken1 (address): Enter WETH token contract address.
  11. _amount (uint256): Enter how many DAI you want to deposit.
  12. _minPoolTokens (uint256): Enter min # of pool tokens you wish to receive otherwise transaction reverts in order to avoid slippage.
Did this answer your question?