A minimal Superfluid streaming app on Base.
Streaming allows you to send tokens continuously in real-time, like a salary or subscription. Instead of periodic transfers, the recipient receives tokens every second.
Create a .env.local file with:
# Required RPC endpoints in order of priority
NEXT_PUBLIC_ALCHEMY_RPC="https://base-mainnet.g.alchemy.com/v2/YOUR_KEY"
NEXT_PUBLIC_THIRDWEB_RPC="https://base.rpc.thirdweb.com/YOUR_KEY"
NEXT_PUBLIC_PUBLIC_RPC="https://base.blockpi.network/v1/rpc/public"- ETHx Token:
- Contract:
0x46fd5cfB4c12D87acD3a13e92BAa53240C661D93 - Need sufficient balance for streaming and buffer
- Wrap ETH to ETHx through Superfluid Dashboard
- Contract:
The app will automatically handle:
- Token approval for Superfluid host contract
- Flow operator authorization
- Stream creation verification
- Network: Base Mainnet
- ChainID: 8453
- Required RPC endpoints with sufficient rate limits
-
Wallet Connection:
- Connect wallet to Base Mainnet
- Ensure sufficient ETH for gas
-
Token Setup:
- Wrap ETH to ETHx if needed
- Minimum recommended: 0.1 ETHx
-
Stream Creation:
- Enter valid recipient address
- Set flow rate (monthly amount)
- App handles approvals automatically
- Verification occurs after creation
-
Verification:
- Stream appears in Superfluid Dashboard
- Real-time balance updates
- Transaction confirmation on Base
- Install dependencies:
npm install-
Create
.env.localwith required variables -
Run development server:
npm run dev- Uses Superfluid SDK v2
- Implements retry logic for RPC failures
- Handles rate limiting automatically
- Verifies stream creation through SDK
- Supports ENS, Lens, and Farcaster resolution
ETHx: "0x46fd5cfB4c12D87acD3a13e92BAa53240C661D93"
USDCx: "0x1D8Ee3C1F10Fd5683167fDB9f6711ef74083E0c0"
Superfluid Host: "0x4C073B3baB6d8826b8C5b229f3cfdC1eC6E47E74"
CFA Forwarder: "0xcfA132E353cB4E398080B9700609bb008eceB125"- Retries on RPC rate limits
- Fallback RPC endpoints
- Automatic approval handling
- Stream verification checks
- Requires MetaMask or similar Web3 wallet
- Requires ETHx for streaming (can be wrapped on Superfluid)
- Built on Base Mainnet for low fees
- Minimum stream duration: 1 month
- Buffer amount automatically calculated