project screenshot 1
project screenshot 2
project screenshot 3

SubHub

Subscription payments using ERC-4337 and ERC-7579 Modular Smart Accounts

SubHub

Created At

ETHGlobal London

Winner of

Nethermind - Account abstraction & user experience 2nd place

Project Description

The goal was to create a framework for subscription services to allow scheduled payments; where by ERC-4337, the user retains custody of funds but payments happen at regular intervals without the user having to remember to pay. Due to ERC-4337, the user doesn't have to pay gas fees; they make no intervention until the time at which they choose to unsubscribe.

Using 7579 Modular Smart Accounts, our contract is an Execution Module; our subscription module is installed to an existing ERC-7579 Modular Smart Account, which then allows the subscription functionality for the duration of subscription. We can then choose to add and remove subscriptions at our choosing.

When we are subscribed, the module allows the service (Netflix, Disney Plus etc) to deduct the correct balance from the user account at the correct timestamp. When the user chooses to unsubscribe, the money can no longer be deducted from their account, but they remain subscribed for the remaining duration of their subscription period

How it's Made

We wanted to incorporate ERC-7579; it seemed like a perfect application of modular smart accounts. We took a long time trying to get the service contract to be able to request the payments. In the end we found that this just doesn't work with the way ERC-7579 is structured; incoming requests have to be in the form of UserOperations from EOAs. So instead, the subscriptions are taken by the service running a daemon to check when money is owed, which is automated offchain.

ERC-7579 does not currently have the tooling for connecting with GUI wallets (such as metamask, Safe etc). If we'd known this, we may have done a pure 4337 implementation instead of incorporating the smart accounts; however we were very happy with our proof-of-concept for how subscription payments can be taken through Modular Smart Accounts.

background image mobile

Join the mailing list

Get the latest news and updates