
Superfluid Streaming
Create, update, and delete per-second payment streams via Superfluid.
Overview
Create, update, and delete per-second payment streams via Superfluid.
Facts
0xcfA132E353cB4E398080B9700609bb008eceB125 (same address on ALL Superfluid-supported chains)0xD04383398dD2426297da660F9CCA3d439AF9ce1b (wraps USDC 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913)0x30a6933Ca9230361972E413a15dC8114c952414e, fDAIx 0x9ce2062b085a2268e8d769ffc040f6692315fd2camount × 10^decimals / period_seconds⚠️ 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:
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):
// 1. Approve underlying token (USDC) for USDCx contractfunction approve(address spender, uint256 amount) external returns (bool); // call on USDC// 2. Wrap underlying to super tokenfunction 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.
10^(18−6) = 10^12approve(USDCx, 1_000) then upgrade(1_000_000_000_000_000) (= 1e15)amount / 10^12 = 0 → reverts with "amount must be greater than 0"Typical Flows
Stream with USDCx on Base mainnet — 3 transactions:
approve(USDCx, amount) on USDC contract — allow USDCx to pull USDCupgrade(amount_18dec) on USDCx contract — wrap USDC to USDCx (use 18-decimal amount)createFlow(USDCx, sender, receiver, flowRate, "") on CFAv1Forwarder — start streamStop stream:
deleteFlow(USDCx, sender, receiver, "") on CFAv1ForwarderUpdate rate:
updateFlow(USDCx, sender, receiver, newFlowRate, "") on CFAv1ForwarderTestnet (SETH) fDAIx — 2 transactions (fDAIx has its own faucet, no approve needed):
createFlow(fDAIx, sender, receiver, flowRate, "") on CFAv1ForwarderdeleteFlow(fDAIx, sender, receiver, "") to stopPolicy Controls
balance / total_outgoing_flow_rate continuously.usdc-transferReferences
https://docs.superfluid.org — CFAv1 Forwarder ABI, createFlow/updateFlow/deleteFlow, flowRate formula, Super Token addresses.