Video thumbnail

Circles Subscriptz

Circles users can now securely, trustlesly & smoothly authorize recurring payments.

Circles Subscriptz

Created At

ETHGlobal Prague

Winner of

Blockscout - Big Blockscout Explorer Pool Prize

Prize Pool

Project Description

Subi is an automated subscription system for Circles that enables secure, seamless recurring payments directly from a user’s account. It allows users to subscribe to services by specifying a recipient, amount, and frequency—while retaining full control (i.e. cancel at any time). The system ensures payments are executed reliably and without manual intervention, even with Circles’ complex transfer logic. A user-friendly interface makes it easy to set up and manage subscriptions with just a few clicks.

How it's Made

Most Notable hacks:

  • constructing a deterministic module proxy deployment to streamline module installation into a single transaction. The first transaction in the batch requires contract deployment address, that needs to be fed into the construction of the follow-up transactions.
  • batched payment collections: Similar to above, but leveraging EIP-7702 for an EOA multisend.
  • Parsing Circles flow matrix data for on-chain validation of recipients and transfer amounts in trust-based payment paths.

Key Technologies: Safe, Circles API & Smart Contracts, Silverback, EIP-7702, create2.

  1. The subscription contracts utilize Zodiac Modules exposing a permissioned subscribe & permissionless redeem payment functions. Due to the proxied nature of an individual user's SubscriptionModule a SubscriptionManager provides a single source for data availability that is relevant to both payment collection services and the user interface. The contract master copy is available on chain, making new proxies easily deployable by new users.

  2. A Silverback bot automates subscription redemptions using a single private key. Since redemptions are permissionless, this key poses no risk to user funds. The system is open—anyone can deploy their own bot to perform automated redemptions.

  3. Single Click Module "installation" is streamlined by leveraging create2 together with a multisend transaction on the Safe consisting of deployModuleProxy (with create2), enableModule, registerModule & setModuleApproval.

  4. The Circles API is used by the payment service to construct the flow matrix required for invoking payments—note that Circles transfers are not simple ERC20 transfers. Each redemption requires computing a valid trust-based payment path through the Circles network, then encoding it into trusted avatars (vertices), directional flows (edges), recipient validation logic (streams) and compact sender/receiver encoding (packed coordinates).

  5. UI is able to detect whether a subscription module is enabled on a connected account through the subscription manager. The subscribe button is disabled if the UI detects that the user has not yet installed the module (this is a one time transaction). If installed, the user can subscribe to whatever recurring payments they would like.

  6. (Time permitting) the collection service can leverage EIP-7702 by batching multiple redemptions whenever it encounters several "matured" payments simultaneously.

background image mobile

Join the mailing list

Get the latest news and updates