project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4
project screenshot 5

Pocket

Experience seamless financial management with integrated service, allowing direct interaction with your Gnosis card as you build pockets for various purposes.

Pocket

Created At

ETHGlobal London

Winner of

Gnosis - Decentralized Application (DApp) Interaction with Gnosis Pay 2nd place

Gnosis - Other Innovative Use Cases on Top of Gnosis Pay

Project Description

Pocket is a Gnosis Pay savings account that enables seamless integration with on-chain liquidity providers and interest-earning tokens. This is possible through an on-chain custodial for your savings that's capable of adding small financial modules called "pockets", these handle the logic of integrations with more complex financial services.

How it's Made

What technologies did you use?

We leverage Safe and Safe modules for what we call the "PocketVault". Each vault is a secondary Safe Wallet that we deploy through a factory without owners and only a single module enabled to operate it. This module is called "PocketManager" and it allows executing transactions on the PocketVault by validating and authorizing signatures exactly as if it were the Gnosis Pay underlying Safe.

Given the PocketVault is only operated by the Gnosis Pay owner's, the vault works as an extension that's not restricted by the Gnosis Pay delay module.

How are they pieced together?

Gnosis Pay uses a SafeWallet that's restricted by a delay module. Our factory creates another Safe{Wallet} with no owner addresses and just the PocketManager enabled. New pockets for different investment strategies and services are developed on top of a BasePocket contract we've developed and includes logic for authorizing calls from the PocketVault, set up, withdrawals and deposits. These are enabled as modules for the PocketVault (Safe modules)

New protocols can build on top of the BasePocket to enable use cases for Gnosis Pay users. In this way, we've been able to integrate the following:

  • Pocket limit orders using hooks in Uniswap V4 and Pancakeswap V4
  • Seamless liquidity between sDAI and EURe by enabling a user to make instant swaps through its Pocket.
  • Easy lending through Morpho vaults. A pocket deposits users funds into a morpho vault and is managed by the PocketManager.

If you used any partner technologies, how did it benefit your project?

Safe allowed to deploy the solution across multiple networks where these financial services are distributed, and also makes it easy to create a PocketBridge (out of scope for this project). Given Gnosis Pay is built on top of this, it made it easier for us to design around Safe.

Uniswap and Pancakeswap v4 hooks allow to create innovative Pocket solutions. The possibilities are endless here.

Did you do anything particularly hacky that's notable and worth mentioning?

Yes! Having a Safe module to mimic other's Safe permissions was a game changer!

background image mobile

Join the mailing list

Get the latest news and updates