Cobo Agentic Wallet
Superfluid Subscription Manager

Superfluid Subscription Manager

Manage multi-subscriber streaming payment channels with low-balance detection and auto-closure.

CategoryPaymentsAutomation
ChainsBASE_ETHMATIC
C
Cobo· Author
121 views·14 uses

Overview

Manage multi-subscriber streaming payment channels with low-balance detection and auto-closure.

Facts

cfa_v1_forwarder: 0xcfA132E353cB4E398080B9700609bb008eceB125 (same address on ALL Superfluid-supported chains)
usdcx (MATIC): 0x07b24bbd834c1c546ece89ff95f71d9f13a2ebd1 (0xCAa7349CEA390F89641fe306D93591f87595dc1F is USDC.ex, not USDCx)
flowRate unit: wei/sec; formula: amount × 10^decimals / period_seconds
subscription model: one stream per subscriber; flowRate = subscription_price / billing_period_seconds
buffer requirement: sender must maintain ≥4-hour super token buffer across ALL outgoing streams
use superfluid-streaming recipe for individual stream CRUD operations

Functions:

solidity
function createFlow(address token, address receiver, int96 flowrate) external returns (bool);
function updateFlow(address token, address receiver, int96 flowrate) external returns (bool);
function deleteFlow(address token, address sender, address receiver) external returns (bool);

Typical Flows

Onboard subscriber — 1 tx:

1.createFlow(superToken, subscriber, flowRate) on CFAv1 Forwarder — start billing stream from subscriber to platform

Monitor all subscriptions — scheduled off-chain:

2.Query all active flows via Superfluid Subgraph or getFlowInfo(superToken, sender, receiver)
3.For each subscriber: check balance / total_outgoing_flow_rate — if < 4 hours, flag as at-risk
4.For at-risk subscribers: notify or deleteFlow to prevent liquidation cascade

Subscription expiry — 1 tx:

5.When subscription period ends: deleteFlow(superToken, subscriber, platform) — stop billing

Rate change — 1 tx:

6.updateFlow(superToken, subscriber, newFlowRate) — adjust for plan upgrades/downgrades

Batch reporting — off-chain:

7.Aggregate: active subscribers, total MRR (monthly recurring revenue), at-risk count, churned count

Policy Controls

CRITICAL — buffer monitoring across all streams: If platform's combined outgoing streams drain balance below buffer, ALL streams liquidate simultaneously.
Token variant mismatch: On Polygon, use USDCx 0x07b24...ebd1; 0xCAa7...dc1F is USDC.ex and changes the asset you stream.
Subscriber default: If subscriber's super token balance runs out, their incoming stream to platform stops automatically; handle grace period logic off-chain.
Pact expiry does NOT stop streams: Streams continue after pact expiry until explicitly deleted or balance drained.
Rate precision: flowRate is integer wei/sec; rounding errors accumulate over long periods — verify monthly total matches expected subscription price.
Policy denial: createFlow and deleteFlow are contract calls targeting cfa_v1_forwarder; ensure pact covers this address.
Not applicable for: one-time or non-recurring payments — use usdc-transfer; standard ERC-20 tokens — must use USDCx (pre-wrapped super token)
Partial reference: use web search for unlisted tokens, contracts, parameters, or up-to-date addresses

References

Docs: https://docs.superfluid.org — CFAv1 Forwarder ABI, createFlow/updateFlow/deleteFlow, flowRate formula, Super Token addresses.