Features
Position Tracking
Track deposits, pools, stakes, borrows, and rewards across DeFi protocols
Perpetuals Trading
Trade perpetual futures on Hyperliquid with up to 50x leverage
Prediction Markets
Bet on real-world events using Polymarket’s prediction markets
Portfolio Analytics
View aggregated DeFi portfolio value and performance metrics
Position Tracking
Rainbow automatically discovers and tracks your DeFi positions across multiple protocols:Supported Protocols
- Uniswap: Liquidity pools and concentrated liquidity positions
- Aave: Lending, borrowing, and collateral positions
- Compound: Supply and borrow positions
- Curve: Stablecoin pools and gauges
- Yearn Finance: Vault deposits
- Lido: Staked ETH positions
- Rocket Pool: rETH staking
- And many more DeFi protocols
Position Types
src/features/positions/types/index.ts
Perpetuals Trading
Trade perpetual futures on Hyperliquid directly from Rainbow:Key Features
- 50+ markets: Trade BTC, ETH, SOL, and altcoin perps
- Up to 50x leverage: Amplify trading positions
- Isolated margin: Risk per position
- Trigger orders: Take profit and stop loss
- Real-time data: Live prices, funding rates, and positions
Trading Flow
Prediction Markets
Bet on real-world outcomes with Polymarket:Market Types
- Politics: Elections, policy outcomes
- Sports: Game outcomes, player props
- Crypto: Token launches, protocol events
- Culture: Entertainment, awards shows
- Business: Company performance, M&A
Trading Workflow
Unified Portfolio View
All DeFi positions are aggregated in your wallet:src/features/positions/stores/positionsStore.ts
Portfolio Totals
- Total value: Sum of all DeFi positions
- Locked value: Assets locked in protocols
- Rewards: Claimable rewards across protocols
- Available: Unlocked, withdrawable funds
The wallet balance shown in Rainbow subtracts locked positions to show only available funds:
balance = total - locked.Position Discovery
Rainbow automatically discovers positions:src/features/positions/stores/positionsStore.ts
- Monitors your address across supported chains
- Detects protocol interactions
- Fetches position details from protocol subgraphs
- Calculates current values and rewards
- Returns normalized position data
Real-Time Updates
Positions
Position data refreshes:- Every 10 minutes (stale time)
- On wallet switch
- After transactions
- Manual pull-to-refresh
Perps
Perpetual positions update:- Real-time price feeds
- Funding rate updates every 8 hours
- Position P&L recalculated on price changes
- Order book updates via WebSocket
Predictions
Prediction market data:- Market price updates every 30 seconds
- Position size updates after trades
- Event resolution monitoring
- Live sports scores (for sports markets)
Performance Analytics
Track DeFi performance over time:src/features/positions/stores/positionsStore.ts
- Total positions count
- Total USD value
- Number of assets
- Number of protocols used
- Rewards earned
- Rewards USD value
Chain Support
DeFi features span multiple chains:Position Tracking
- Ethereum mainnet
- Arbitrum
- Optimism
- Polygon
- Base
- And other supported networks
Perpetuals
- Hyperliquid (Arbitrum)
Predictions
- Polymarket (Polygon)
Different features are available on different networks. Check the specific feature documentation for chain requirements.
Risk Management
Position Tracking
- Health factor monitoring (for lending protocols)
- Liquidation price tracking
- Impermanent loss calculation
Perpetuals
- Liquidation price calculation
- Margin ratio monitoring
- Position size limits
- Leverage warnings
Predictions
- Maximum position size
- Liquidity availability checks
- Market expiration dates