StackFlow Overview
StackFlow is a next-generation Web3 financial super-app that combines instant blockchain payments with intelligent portfolio investing, all powered by PYUSD stablecoin on Arbitrum. Think of it as "Apple Pay meets Robinhood" for crypto — making both payments and investing simple, fast, and accessible.
🎯 Core Problem Solved
Traditional crypto wallets are complex and intimidating. Users need to remember long hexadecimal addresses, manage gas fees, and can't easily invest in diversified crypto portfolios.
StackFlow solves this by:
Simplifying payments with human-readable handles (@username@pyusd) instead of wallet addresses
Democratizing investing through expert-curated, auto-rebalancing crypto portfolios
Reducing barriers with a beautiful, intuitive UX inspired by Apple Pay and Paytm
Ensuring security with enterprise-grade AES-256 encryption and server-side transaction signing
💳 Payment Features Smart Blockchain Payments
Create unique payment handles like @alice@pyusd or @bob@pyusd
Send PYUSD to anyone using their handle (no need to remember 0x... addresses)
Generate QR codes for instant receiving
Real-time transaction tracking with blockchain explorer integration
Automatic wallet generation on signup (users never see private keys)
Encrypted private key storage in Supabase with AES-256 encryption
Server-side transaction signing for maximum security
Payment Links
A shareable link system that enables users to create custom payment requests — similar to Venmo or PayPal links, but fully on-chain with PYUSD.
How it works:
Create a link with amount, description, and optional expiry
Get a shareable URL (e.g., stackflow.app/pay/abc123) or QR code
Recipients click, connect wallet, and pay instantly
Track real-time payment status (paid, pending, expired)
Key capabilities:
Fixed or flexible payment amounts
Custom memos/descriptions (e.g., “Coffee ☕”, “Rent split”)
Expiration and one-time/reusable links
Dashboard view for all created links with payment history
Use cases: Freelancers, small businesses, event organizers, friends splitting bills, and donations — all simplified with one-click blockchain payments.
Key Payment Capabilities
Send PYUSD via handles or traditional wallet addresses
Instant transfers on Arbitrum network (low gas fees)
Transaction history with timestamp, amount, and blockchain confirmation
Copy wallet address with one tap
Download payment QR codes
Balance tracking in real-time
📊 Portfolio Investment Features Expert-Curated Portfolios
StackFlow offers a range of professionally designed portfolios across different risk levels and market sectors — from stable, blue-chip blends to high-growth themes like AI, DeFi, and Layer 2 ecosystems.
Investment Capabilities
One-click investing with PYUSD (minimum 10 PYUSD)
Live price tracking via Pyth Network oracles
Automatic portfolio rebalancing (weekly or monthly)
Share-based accounting for transparent value tracking
Real-time performance and P/L monitoring
Withdraw anytime at current market value
Interactive charts and risk indicators
🏗️ Technical Architecture Frontend Stack
React 18.3 + TypeScript for type-safe development
Vite for lightning-fast builds and HMR
TailwindCSS 3.4 for responsive, utility-first styling
Framer Motion for smooth 60fps animations
React Router for client-side navigation
Recharts for interactive portfolio charts
Lucide React for modern iconography
Backend & Database
Supabase for authentication, PostgreSQL database, and real-time subscriptions
Row Level Security (RLS) policies protecting user data
Automatic timestamp tracking and audit trails
Helper functions for complex queries
Blockchain Layer
ethers.js 6.x for Ethereum/Arbitrum interaction
Arbitrum Sepolia testnet (production ready for mainnet)
PYUSD ERC-20 token integration
Pyth Network price oracles via Hermes API
Smart contracts: PortfolioManager.sol and PythPriceOracle.sol
Server-side transaction signing (private keys never exposed to client)
Database Schema
Payment Tables:
wallets – User wallet addresses and encrypted private keys
handles – Unique payment handle system (@username@pyusd)
transactions – Complete transaction history with blockchain references
payment_links – Generated payment links with amount, expiry, and status tracking
Investment Tables:
portfolios – Portfolio definitions with token allocations
user_investments – User portfolio holdings with share tracking
portfolio_performance – Historical NAV and performance metrics
rebalance_history – Audit trail of all rebalancing events
token_prices – Cached Pyth price feed data
investment_transactions – Complete investment/withdrawal log
🔐 Security Architecture Multi-Layer Security
Client-Side: No private keys ever transmitted or stored in browser
Transport: All API calls over HTTPS with Supabase authentication
Storage: AES-256 encryption for private keys in database
Database: Row Level Security ensures users only see their own data
Signing: All transactions signed server-side via Supabase Edge Functions
Validation: Input sanitization and validation on all user inputs
Authentication: Supabase Auth with email/password and session management
🎨 User Experience Design Philosophy
Apple Pay-inspired clean, minimalist interface
Paytm-influenced color scheme with gradients and glassmorphism
Dark mode throughout for reduced eye strain
Smooth animations with Framer Motion (fade, slide, scale transitions)
Mobile-first responsive design with bottom navigation
Skeleton loaders for perceived performance
Empty state components with helpful CTAs
Toast notifications for user feedback
Key UX Features
One-click actions (send, invest, withdraw, request)
Instant visual feedback on all interactions
Real-time balance updates
Live price tickers
Interactive charts with tooltips
Copy-to-clipboard with confirmation
QR code generation and download
Protected routes with automatic redirects
Loading states during async operations
📱 User Journey New User Flow
Sign up with email, password, and unique handle
System auto-generates secure EVM wallet
Private key encrypted and stored securely
Redirected to dashboard showing balance and handle
Can immediately receive PYUSD via QR code or handle
Fund wallet to start sending payments or investing
Payment Flow
Click “Send” from dashboard
Enter recipient handle (@alice@pyusd) or wallet address
Enter PYUSD amount
Confirm transaction
System signs transaction server-side
Broadcast to Arbitrum network
Real-time confirmation with blockchain link
Payment Link Flow
Create a payment link from the dashboard
Add amount, description, and expiry (optional)
Share the link or QR code
Recipient pays instantly using PYUSD
View payment status and history in real-time
Investment Flow
Navigate to “Invest” tab
Explore curated portfolios with live prices and categories
Choose risk level and amount
Confirm investment to receive proportional portfolio shares
Track performance in “My Investments” tab
🚀 Key Innovations
Handle System: First PYUSD wallet with social-style handles for easy payments
Payment Links: Shareable blockchain payment requests for individuals and businesses
Unified App: Payments + investing in one seamless experience
Auto-Rebalancing: Smart contracts automatically maintain target allocations
Live Pricing: Pyth Network integration for real-time, accurate token prices
Share Model: Fair value distribution with transparent NAV calculation
Zero Custody: Users maintain full ownership via encrypted key storage
Mobile-First: Optimized for smartphone use with touch-friendly UI
🎯 Target Audience
Crypto newcomers who want a simple payment experience
Freelancers and small businesses seeking easy, on-chain payments
Passive investors wanting diversified exposure without manual management
Mobile users needing quick payments and portfolio tracking on-the-go
International users leveraging stablecoins for cross-border payments
📊 Performance Metrics
Bundle size: ~330KB gzipped (optimized for fast loading)
Live price updates: Every 5 seconds for active users
Transaction speed: ~15–30 seconds on Arbitrum
Database queries: Indexed for sub-100ms response times
Mobile responsive: Works on all screen sizes (320px+)
Build time: ~30 seconds for production
🔮 Future Enhancements
Custom portfolio builder (user-defined allocations)
Dollar-cost averaging (DCA) automation
Stop-loss and take-profit orders
Portfolio details page with deeper analytics
Copy trading (follow expert traders)
Price alerts and notifications
Fiat on/off ramp integration
Multi-chain support (expand beyond Arbitrum)