Cobo Agentic Wallet
Superfluid Streaming

Superfluid Streaming

Create, update, and delete per-second payment streams via Superfluid.

CategoryPayments
ChainsBASE_ETHMATICSETH
C
Cobo· Author
934 views·28 uses

Overview

Create, update, and delete per-second payment streams via Superfluid.

Facts

cfa_v1_forwarder: 0xcfA132E353cB4E398080B9700609bb008eceB125 (same address on ALL Superfluid-supported chains)
supported super tokens (BASE_ETH): USDCx 0xD04383398dD2426297da660F9CCA3d439AF9ce1b (wraps USDC 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913)
supported test super tokens (SETH): ETHx 0x30a6933Ca9230361972E413a15dC8114c952414e, fDAIx 0x9ce2062b085a2268e8d769ffc040f6692315fd2c
faucet (SETH): app.superfluid.finance → Sepolia → wrap test tokens
flowRate unit: wei/sec; formula: amount × 10^decimals / period_seconds
target_in: cfa_v1_forwarder and the super token contract (for approve/upgrade)

⚠️ ETHx NOT supported in contract context: ETHx (0x46fd5cfB4c12D87acD3a13e92BAa53240C661D93 on Base) is a Native Asset Super Token — it does NOT have a standard ERC-20 underlying and cannot be wrapped via upgrade(). Use USDCx for all Base mainnet streaming operations.

Functions on CFAv1Forwarder:

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

Functions for USDC → USDCx wrapping (call on the super token contract):

solidity
// 1. Approve underlying token (USDC) for USDCx contract
function approve(address spender, uint256 amount) external returns (bool); // call on USDC
// 2. Wrap underlying to super token
function upgrade(uint256 amount) external; // call on USDCx; amount in super token decimals (18)

⚠️ upgrade() decimal mismatch: upgrade(uint256) expects amount in super token's 18-decimal units, NOT the underlying token's decimals.

For USDC (6 decimals): multiply by 10^(18−6) = 10^12
Example: wrap 0.001 USDC → approve(USDCx, 1_000) then upgrade(1_000_000_000_000_000) (= 1e15)
Passing the 6-decimal USDC amount directly → internally computes amount / 10^12 = 0 → reverts with "amount must be greater than 0"

Typical Flows

Stream with USDCx on Base mainnet — 3 transactions:

1.approve(USDCx, amount) on USDC contract — allow USDCx to pull USDC
2.upgrade(amount_18dec) on USDCx contract — wrap USDC to USDCx (use 18-decimal amount)
3.createFlow(USDCx, sender, receiver, flowRate, "") on CFAv1Forwarder — start stream

Stop stream:

deleteFlow(USDCx, sender, receiver, "") on CFAv1Forwarder

Update rate:

updateFlow(USDCx, sender, receiver, newFlowRate, "") on CFAv1Forwarder

Testnet (SETH) fDAIx — 2 transactions (fDAIx has its own faucet, no approve needed):

1.createFlow(fDAIx, sender, receiver, flowRate, "") on CFAv1Forwarder
2.deleteFlow(fDAIx, sender, receiver, "") to stop

Policy Controls

CRITICAL — maintain ≥4-hour super token buffer: If balance drops below buffer, ALL outgoing streams liquidate simultaneously. Monitor balance / total_outgoing_flow_rate continuously.
Pact expiry does NOT stop streams: Streams continue after pact expiry until explicitly deleted or wallet is drained.
No per-tx amount limit for streaming: Flow rate is not a transfer amount — policy per-tx caps do not apply. Flow rate can drain wallet rapidly; validate rate against balance before creating.
Not applicable for: standard ERC-20 tokens — must first be wrapped as super tokens; one-time payments — use usdc-transfer
Testnet: No real value. Get test tokens at app.superfluid.finance on Sepolia. Token list changes over time: use the current Superfluid Sepolia super token list.
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.