Inspiration
DeFi yield is fragmented. Aave, Compound, and emerging confidential compute protocols each offer returns, but users have no single interface to allocate across them intelligently. Switching manually is gas-intensive, opaque, and inaccessible to non-technical users.
We were inspired by the convergence of three cutting-edge primitives: ERC-4626 vault accounting, AI-driven on-chain allocation via ChainGPT, and confidential execution via iExec TEE (NOX). The idea was simple — what if a single vault could harness all three, and let users deposit once while an AI continuously optimizes where their capital works hardest?
What it does
Omni-Vault is a non-custodial DeFi yield aggregator. Users deposit USDC into a central MetaVault contract and receive vault shares proportional to their contribution. The vault routes capital across three yield strategies — Aave V3, Compound V3, and iExec NOX — with allocation weights in basis points determined by ChainGPT.
Users can deposit, monitor real-time PnL, and withdraw at any time by redeeming shares. A 10% performance fee is collected on profit only at withdrawal — never on principal, never on losses.
The iExec NOX strategy runs yield computations inside a Trusted Execution Environment, submitting signed oracle reports on-chain via submitYieldReport() — keeping sensitive allocation logic confidential.
How we built it
Smart contracts were written in Solidity 0.8.x and deployed on Sepolia using Hardhat. MetaVault.sol handles ERC-4626-inspired share accounting, principal tracking, and performance fee logic. An abstract StrategyBase.sol enforces vault-only access and standardizes deposit/withdraw interfaces. Concrete strategies — AaveStrategy, CompoundStrategy, and NoxStrategy — extend this base and integrate with their respective protocols.
The frontend was built with React, wagmi, viem, RainbowKit, and TanStack Router. Live vault stats (totalAssets, sharePrice, user PnL) are polled per block. Deposit and withdrawal flows follow an approval-first UX, and a withdrawal slider lets users select any percentage of their shares.
AI allocation flows through Harvester.sol into MetaVault.rebalance(newAllocations), where ChainGPT proposes new basis-point weights across strategies. Confidential yield from iExec is submitted on-chain as a signed oracle report verified against an authorizedOracle address.
Challenges we ran into
Fund routing complexity. Wiring MetaVault.deposit() to call strategy.deposit() across multiple strategies in a single transaction — while keeping accounting consistent — proved more involved than anticipated. In the current build, allocations are tracked on-chain but full deposit-to-strategy orchestration is incomplete.
Confidential oracle integration. Designing a signature scheme for iExec TEE yield reports required careful chain ID binding and replay protection using keccak256(abi.encodePacked(yieldAmount, block.chainid, address(this))), verified via toEthSignedMessageHash().
PnL accounting edge cases. Linear principal tracking works cleanly for the current model but breaks under compounding or multiple sequential deposits. Designing a fair, manipulation-resistant accounting model across strategies was a key design challenge.
Testnet protocol quirks. Sepolia deployments of Aave V3 and Compound V3 diverge from mainnet in subtle ways — liquidity limits, interest accrual timing, and mock token behavior all required workarounds during integration testing.
Accomplishments that we're proud of
A working vault with live PnL. Users can deposit Mock USDC on Sepolia, watch their share price update in real time, simulate yield by sending USDC directly to the vault, and withdraw with the 10% performance fee correctly deducted — end to end, on a live testnet.
Three distinct strategy integrations. Aave V3, Compound V3, and iExec NOX are all wired into a unified vault interface, each with its own totalAssets() surface that feeds the vault's NAV calculation.
Confidential yield on-chain. The NoxStrategy oracle signature scheme is fully implemented and verified on-chain — a meaningful step toward production-grade TEE-backed DeFi yield.
Clean, polished frontend. The dashboard, deposit, withdraw, and strategy views are production-quality — not a hackathon prototype UI. Live block-by-block polling, share sliders, and activity feeds work seamlessly.
What we learned
Vault accounting is deceptively hard. Share price math is elegant when written down, but rounding errors, deposit ordering, and multi-strategy NAV aggregation expose edge cases that aren't obvious until you stress-test them on a real network.
TEE oracles require careful trust modeling. Integrating iExec NOX taught us how to think rigorously about the boundary between confidential off-chain computation and verifiable on-chain state — specifically how signature schemes can bridge that gap without leaking the underlying model.
AI allocation is a UX problem, not just a smart contract problem. Getting ChainGPT weights to flow through to Harvester.rebalance() smoothly required thinking carefully about how humans and AI agents interact with the same control surface.
Testnet is not mainnet. Every protocol has subtle testnet-specific behaviors. Building a system that spans three external protocols amplified this — rigorous mainnet readiness planning is non-negotiable before any production deployment.
What's next for Omni-Vault
Complete fund routing. Implement the full deposit-to-strategy orchestration pipeline so capital is automatically allocated across Aave, Compound, and NOX proportionally on every deposit and rebalance call.
Yield harvesting. Wire Harvester.harvest() to actually claim and compound protocol rewards, completing the yield loop and making APY figures real rather than simulated.
Mainnet deployment. Replace all Sepolia-hardcoded addresses, deploy on Ethereum mainnet or an L2, and commission a full smart contract security audit before any user funds are at risk.
Improved PnL accounting. Redesign the principal tracking model to handle compounding deposits correctly — potentially adopting a per-share cost-basis approach similar to production vaults.
Broader strategy support. Extend the StrategyBase interface to support additional protocols — Morpho, Yearn, and native LST yield — giving ChainGPT a richer allocation surface to optimize across.
Built With
- ipfs
- nextjs
- sepolia
- solidity
- web3
Log in or sign up for Devpost to join the conversation.