Stake in Uniswap V3 with a Multisig Safe. Universal V3 Staker as a Safe App

Marta
Coinmonks
4 min readSep 8, 2023

--

In May 2023, the Universal V3 Staker UI was published. The main goal of this project was to help users interact with Uniswap V3 Contracts in a more user-friendly way. Read more about the project here:

However, some users prefer to store their assets in a multisig account (Safe{Wallet} — https://app.safe.global/).
And now they can do much more! After a recent update, I am glad to announce that those accounts can also use the UI to create incentives, check their positions, and stake them the same way other EOA wallets could via Metamask.

New connection type (make sure to open in Safe App context)

Important!

  • Uniswap is a trademark of Uniswap Labs.
    This project is not affiliated with or endorsed by Uniswap Labs.
  • Safe Ecosystem Foundation owns Safe{Wallet}.
    This project is not affiliated with or endorsed by the Safe Ecosystem Foundation.
  • This is a hobby project that has no additional contracts or any additional logic/services, but it interacts with existing Uniswap V3 Staker contracts.
  • The main tech stack consists of Web App (React) and Subgraph. However, even though this is just a UI, use it carefully and test it out in the Goerli test network before proceeding to other networks.
  • There is a guide on how to interact with Uniswap V3 staker contracts without UI in case the web service or ethereum subgraph service goes down:
    - Medium article: Part I — (incentive creation)
    - Medium article: Part II — (staking)

Before proceeding I would like to thank Justinas for the help in building this project.

How to Use Universal V3 Staker in Safe

  • Open Safe(Wallet). Connect with your account and head to the Safe Apps section;
  • Click to add a custom Safe App;
Add custom Safe App
Put a Universal V3 Staker URL to retrieve site metadata

2. Test it out in the Testnet network! Below are some examples of incentive creation and token unstake processes.

Incentive Creation

The app will make sure that the safe has enough tokens approved for incentive creation, so the two steps would be:

  • Sign and approve tokens;
  • Create an incentive. Similar sign—execute procedure. If everything is alright, users should be greeted with a success message:
Successful incentive creation using a safe app

Unstake Tokens

Users can find their Uniswap V3 NFTs in the positions tab. Here they can stake / unstake / withdraw positions.

Incentive page opened in a safe context

Withdraw Tokens

After unstaking users can check their tokens in the positions tab.
Important note*. If you get gas estimation errors: reason=”execution reverted: GS013" — that means your safe does not have a fallback handler set and is not “prepared” to receive ERC721 tokens.

  • How to find it out? Check out this answer. If the fallback handler is not set — it should return a zero address. An example is shown below.
Etherscan result which shows the fallback handler address

Or just check via Safe UI (Settings -> Modules -> Fallback handler):

Modules fallback handler panel
  • How to set it? You can do it via transaction builder, safeSDK, or via your preferred method. After setting it you can check it again in the settings:
CompatibilityFallbackHandler is set as a Fallback handler for token retrievals

That is it :)

Hopefully, this project will make it easier for safe users to get acquainted with Uniswap V3 staker contracts and use their functionality to visually check, whether this incentive method could be useful for liquidity provision staking rewards.

References

--

--

Marta
Coinmonks

Blockchain developer interested in instant photography