ETH Rome 2025 - Finance Track Submission
An intelligent DeFi portfolio management system that automatically rebalances WETH and USDC holdings to maintain a 50/50 allocation. Built on Base with advanced Web3 integrations and iExec confidential computing capabilities.
1Balancer is a non-custodial portfolio management platform that eliminates emotional trading decisions through automated rebalancing. Our system continuously monitors your WETH and USDC holdings and executes trades to maintain optimal 50/50 allocation, selling when prices rise and buying when they fall.
"Our portfolio keeps your WETH and USDC at 50/50, selling when prices rise and buying when they fall. No emotions, no stressโjust smart rebalancing."
- Automated Rebalancing: Intelligent 50/50 WETH/USDC allocation maintenance
- Non-Custodial: Users maintain full control of their assets
- Base Integration: Native Base mini app experience
- ENS Resolution: Human-readable addresses instead of hex strings
- 1inch Integration: Optimal swap routing and portfolio data fetching
- iExec Integration: Confidential computing for enhanced security
- Real-time Monitoring: Live portfolio tracking and rebalancing history
- Framework: Next.js 15 with React 19
- Styling: Tailwind CSS with custom animations
- Web3: Wagmi v2 + Viem for blockchain interactions
- State Management: TanStack Query for data fetching
- UI Components: Lucide React icons, custom components
- Rebalancing Engine: Automated portfolio management
- 1inch SDK: DEX aggregation and optimal routing
- iExec Integration: Confidential computing for private key management
- ENS Resolution: Address-to-name mapping
- Rebalancer Contract:
0x3d2b805E8dedA73efC15a16B27f081FF81106B65 - USDC (Base):
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 - WETH (Base):
0x4200000000000000000000000000000000000006
- Next.js 15 - React framework
- TypeScript - Type safety
- Tailwind CSS - Styling
- Viem - Ethereum library
- Wagmi - React hooks for Ethereum
- Base - Layer 2 blockchain
- Coinbase OnchainKit - Web3 components and utilities
- 1inch SDK - DEX aggregation
- ENS - Ethereum Name Service
- iExec - Confidential computing
- TanStack Query - Data fetching and caching
- ESLint - Code linting
- PostCSS - CSS processing
- Node.js 18+
- pnpm (recommended) or npm
- Base-compatible wallet (Coinbase Wallet, MetaMask)
# Clone the repository
git clone <repository-url>
cd 1balancer-ethrome
# Install dependencies
pnpm install
# Start development server
pnpm devCreate a .env.local file with the following variables:
# Base RPC URL
NEXT_PUBLIC_BASE_RPC_URL=https://mainnet.base.org
# 1inch API Key (for production)
NEXT_PUBLIC_1INCH_API_KEY=your_1inch_api_key
# iExec Configuration (for confidential computing)
IEXEC_APP_ADDRESS=your_iexec_app_address
IEXEC_WORKERPOOL_ADDRESS=your_iexec_workerpool_address- Open the Base mini app
- Connect your Web3 wallet
- Ensure you have WETH and USDC on Base
- Specify your USDC and WETH amounts
- Choose rebalancing interval (15min, 1hr, 4hr, 1day)
- Review and confirm your strategy
- View real-time portfolio status
- Track rebalancing history
- Monitor transaction status
- Adjust strategy as needed
โโโ app/ # Next.js app directory
โโโ components/ # React components
โ โโโ ActivePortfolio.tsx # Portfolio management UI
โ โโโ LandingPage.tsx # Landing page
โ โโโ Main.tsx # Main application logic
โ โโโ PortfolioSetup.tsx # Strategy configuration
โโโ hooks/ # Custom React hooks
โ โโโ use-get-basename.ts # ENS name resolution
โ โโโ use-get-portofolio.ts # Portfolio data fetching
โ โโโ use-send-token.ts # Token transfer logic
โโโ lib/ # Utility functions
โโโ config/ # Configuration constants
โโโ public/ # Static assets
- PortfolioSetup: Strategy configuration and initial setup
- ActivePortfolio: Real-time portfolio monitoring
- PortfolioPreview: Strategy preview before execution
- useGetBasename: ENS name resolution with caching
- useSendToken: Secure token transfers
- useGetPortfolio: Portfolio data fetching with 1inch SDK
- Users maintain full control of their private keys
- No centralized custody of funds
- Direct wallet integration
- Confidential Computing: Private key management in secure enclaves
- Multi-Wallet Support: Handle multiple wallets securely
- Enhanced Security: Private keys never exposed to frontend
- Audited rebalancing contracts
- Time-locked operations
- Emergency pause functionality
- Native Base Experience: Optimized for Base ecosystem
- Coinbase Wallet Integration: Seamless wallet connection
- Base Explorer Integration: Direct transaction viewing
- Farcaster Integration: Social features and casting
- Gas Optimization: Efficient Base L2 transactions
- Base Name Resolution: Native Base name support
- Base Token Support: Native USDC and WETH handling
- Optimal Routing: Best price discovery across DEXs
- Slippage Protection: Configurable slippage tolerance
- MEV Protection: Advanced transaction routing
- Real-time Prices: Live token price feeds
- Portfolio Valuation: Accurate portfolio tracking
- Historical Data: Performance analytics
- Secure Enclaves: Private key operations in secure environments
- Multi-Wallet Management: Support for multiple wallets
- Enhanced Privacy: Sensitive operations in confidential computing
- Frontend: Base mini app for user interaction
- Backend: iExec iApp for confidential operations
- Separation: Public operations in Base, private operations in iExec
- Automated Rebalancing: Eliminates emotional trading decisions
- Base Integration: Native L2 experience with mini app
- 1inch Integration: Optimal DEX routing and data
- ENS Integration: Human-readable addresses
- iExec Integration: Confidential computing for enhanced security
- Multi-Chain Support: Base L2 with L1 fallbacks
- Advanced Web3 UX: Seamless wallet integration
- Real-time Data: Live portfolio monitoring
- Security First: Non-custodial with confidential computing
- Rebalancing Accuracy: 99.9% allocation maintenance
- Gas Efficiency: Optimized for Base L2
- Response Time: <2s for rebalancing decisions
- Uptime: 99.9% availability
We welcome contributions! Please see our contributing guidelines for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Base Team - For the amazing L2 infrastructure
- 1inch - For DEX aggregation and optimal routing
- iExec - For confidential computing capabilities
- ENS - For human-readable addresses
- ETH Rome 2025 - For the incredible hackathon experience
- Project: 1Balancer - Automated Portfolio Rebalancing
- Event: ETH Rome 2025
- Track: Finance
- Team: [Your Team Name]
Built with โค๏ธ for ETH Rome 2025 - Revolutionizing DeFi portfolio management