
Index-Fi
Onchain RWA index vaults: deposit USDC, get one share for diversified stock exposure.
Demo
About
IndexFi is a prototype for turning tokenized stock exposure into a single onchain primitive. Instead of manually buying and managing multiple RWA assets one by one, users deposit USDC into a basket vault and receive one vault share token that represents proportional exposure to the full index. For the MVP, we built an “AI Leaders” basket (NVDA, MSFT, GOOGL, AMD, TSM) with target weights and live NAV/share accounting. The app lets users deposit, withdraw, and track portfolio value while also showing drift between target and current basket weights. A manager can trigger rebalancing to restore allocations. The core thesis is simple: move from “tokenized single assets” to “tokenized programmable portfolios” that are composable with DeFi rails.
How it's made
We built the protocol side in Solidity with Foundry and deployed it on a local Anvil chain for fast iteration. The contract stack includes: mock RWA ERC-20 tokens, a mock oracle for pricing, a basket vault with ERC-4626-style share accounting, a factory to create vaults, and a rebalancer entrypoint. On the frontend, we migrated from Vite to Next.js (App Router) and wired wallet/auth + contract interaction using Privy, wagmi, and viem. Privy handles embedded/external wallet onboarding; wagmi + viem handle reads/writes for deposit, withdraw, approvals, manager checks, and rebalance actions. One hacky but useful move: we kept the whole flow reproducible locally (contracts + UI) with deterministic Anvil deployment addresses and env-based wiring, so judges can run everything end-to-end without external infrastructure. We also intentionally used simulated RWAs/oracles to focus on protocol UX and basket mechanics before adding compliance-heavy real-world issuance layers.