Inspiration
DeFi yield is broken for normal users. You either keep funds liquid and earn nothing, or lock them in vaults and deal with manual deposits, withdrawals, and constant APY monitoring. We wanted a wallet that feels like a checking account but silently optimizes your idle capital in the background—no clicks, no gas, no thinking.
What it does
Autopilot Wallet is an ERC-4337 smart wallet on Base that automatically earns yield on idle USDC. Deposit funds and they're routed to the best Morpho Blue vault. When you spend, the wallet auto-withdraws from yield to cover the transaction—one signature, done. A backend scheduler continuously monitors APYs and migrates funds to better vaults without user action. It even sweeps dust tokens (airdrops, swap leftovers) into USDC and compounds them into yield. Completely gasless via paymaster.
How we built it
- Smart Contracts: Custom ERC-7579 modules on ZeroDev Kernel v3—an AutoYieldModule (executor) handling deposits/withdrawals/rebalancing, and an AutomationValidator (validator) for secure session key authentication
- Backend: Node.js scheduler that queries Morpho's GraphQL API for real-time APYs, monitors wallet balances via multicall, and submits UserOperations signed by a restricted session key
- Frontend: Next.js with Coinbase OnchainKit for wallet connection and transaction flows
- Infrastructure: Pimlico bundler and paymaster (Coinbase's don't support EntryPoint v0.7 yet), Aerodrome for dust swaps, all deployed on Base mainnet
Challenges we ran into
- Kernel v3 module architecture: Getting the AutoYieldModule to callback into Kernel without re-triggering validator hooks required using executeFromExecutor() instead of execute()—took multiple contract iterations to debug
- EntryPoint v0.7 compatibility: Coinbase paymaster/bundler only support v0.6, forcing us to use Pimlico
- UserOp gas estimation: Morpho vault interactions are gas-heavy; we had to tune gas limits carefully to avoid reverts while keeping costs reasonable
- Dual-validator nonce management: ECDSA validator and AutomationValidator use different nonce keys—getting this right for both user-signed and automation-signed operations was tricky
Accomplishments that we're proud of
- It actually works on mainnet—not a testnet demo, real USDC, real Morpho vaults, real yield
- True "set and forget" UX—users genuinely don't need to do anything after funding
- Session key security model—automation key literally cannot steal funds, only move between pre-approved vaults
- Single-signature spending from yield—the "magic moment" where complex DeFi operations feel like a normal transfer
- Dust sweep to yield—turning worthless airdrops into productive capital with one click
What we learned
- ERC-7579 module development is powerful but documentation is sparse—we learned a lot about Kernel internals through trial and error
- Account abstraction UX is only as good as your paymaster/bundler reliability
- GraphQL APIs for yield data (Morpho, Aave) are solid but require careful caching to avoid rate limits
- The gap between "works in tests" and "works on mainnet with real gas estimation" is significant
What's next for Autopilot Wallet
- Multi-token support—auto-yield for WETH, other stablecoins
- User-configurable liquid balance—let users keep a spending buffer if they want
- Yield strategy preferences—risk tolerance settings, protocol preferences
- Mobile app—push notifications for rebalances, spending alerts
- Cross-chain expansion—same UX on other L2s with yield opportunities
- Coinbase paymaster integration—once they support EntryPoint v0.7
Built With
- erc-4337
- erc-7579
- foundry
- graphql
- kernel
- morpho
- onchainkit
- primlico
- smart
- tailwind
- typescript
- viem
- wagmi
- zerodev
Log in or sign up for Devpost to join the conversation.