A DeFi mini-app built for Farcaster Frames that enables users to easily convert their tokens into yield-bearing vault tokens and back. The app provides a seamless experience for managing DeFi positions with a focus on mobile responsiveness and accessibility.
- Token Conversion: Convert supported tokens into yield-bearing vault tokens
- Token Reversion: Withdraw from vaults back to original tokens
- Real-time Estimates: Get estimated output amounts before transactions
- Mobile Responsive: Fully optimized for mobile devices
- Accessibility: ARIA-compliant with proper labels and descriptions
- Dark Mode Support: Seamless experience in both light and dark modes
- Transaction Tracking: View and track your transaction status with links to block explorer
- Native Farcaster Integration: Seamless wallet connection through Farcaster Frame
- View Vault Analytics: Interactive charts to monitor vault performance
- Monitor User Positions: Track user balances and positions
Currently supports the following vaults on Base:
- USDC Vault
- WETH Vault
- cbETH Vault
- Framework: Next.js
- Blockchain Integration: wagmi, viem
- Wallet Connection: Farcaster Frame SDK
- Styling: Tailwind CSS
- State Management: React Hooks
- Price Data: Portals API
- CI: GitHub Actions
- Smart token filtering based on vault selection
- Real-time balance updates
- Automatic price calculations
- Support for ERC20 tokens
- Two-step transaction process (Approve & Convert/Withdraw)
- Real-time transaction status updates
- Error handling with user-friendly messages
- Transaction hash display with block explorer links
- Responsive design for all screen sizes
- Loading states and progress indicators
- Clear error messages with truncation for long errors
- Tooltips for additional information
- Mobile-optimized transaction displays
- Content Security Policy (CSP) compliance
- Secure wallet connections through Farcaster Frame
- Protected API endpoints
- Safe transaction handling
- Input validation and sanitization
- ARIA labels and descriptions
- Keyboard navigation support
- Screen reader compatibility
- Focus management
- Color contrast compliance
- Clone the repository
- Install dependencies:
npm install- Run the development server:
npm run devnpm run dev- Start development servernpm run build- Build production bundlenpm run start- Start production servernpm run lint- Run ESLintnpm run lint:fix- Run ESLint and automatically fix issuesnpm run format- Format code with Prettiernpm run format:check- Check code formattingnpm run typecheck- Run TypeScript type checkingnpm test- Run tests
The project uses GitHub Actions for continuous integration. The workflow includes:
- Code formatting check
- Linting
- Type checking
- Building
- Testing
The CI pipeline runs on:
- Every push to the master branch
- Every pull request to the master branch
To set up CI:
- Fork the repository
- Enable GitHub Actions in your repository settings
- Push to the master branch or create a pull request to trigger the workflow
- Open the app in Farcaster Frame
- Connect your wallet through Farcaster
- Select a vault (USDC, WETH, or cbBTC)
- Choose whether to convert tokens to vault tokens or withdraw from vault
- Enter the amount you want to convert/withdraw
- Approve token spending (if needed)
- Confirm the transaction
- Track transaction status and completion