Experience seamless financial management with integrated service, allowing direct interaction with your Gnosis card as you build pockets for various purposes.
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.
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:
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!