ERC4626 yield aggregator that automatically deploys USDC to Aave strategies. Deposit, earn yield, withdraw anytime.
- Frontend: liquid-vault.netlify.app
- Vault: 0xF2C1164499D6AaB1b0ddc9a7349e7827efD882Bc
- Strategy: 0xa2BB571a3eB292aE4bc87C6dd12EF85DD36E70aa
Users deposit USDC → Vault mints shares → Auto-deploys 70% to Aave → Earns yield → Withdraw with profits
Contracts:
- Solidity 0.8.20
- Foundry
- OpenZeppelin v5
- ERC4626 standard
Frontend:
- React
- ethers.js
- MetaMask integration
- ERC4626 tokenized vault
- Automatic 70/30 allocation
- Multi-strategy support
- Real-time tracking
- Performance fees on profits
- Emergency pause system
cd Blockchain
forge install
forge testcd frontend
npm install
npm startforge test -vvv20/20 tests passing covering deposits, withdrawals, strategies, and edge cases.
export PRIVATE_KEY=your_key
export SEPOLIA_RPC_URL=your_rpc
forge script script/DeployFinal.s.sol:DeployFinal \
--rpc-url $SEPOLIA_RPC_URL \
--broadcast \
--verify- Connect MetaMask (Sepolia)
- Get test USDC from faucet
- Deposit USDC
- Earn yield automatically
- Withdraw anytime
// Deposit
IERC20(usdc).approve(vault, amount);
uint256 shares = vault.deposit(amount, receiver);
// Withdraw
vault.withdraw(assets, receiver, owner);User → Vault (ERC4626) → Strategy (70%) + Idle (30%) → Aave
LiquidVault/
├── Blockchain/
│ ├── src/
│ │ ├── LiquidVault.sol # Main vault
│ │ ├── MockAave.sol # Test mock
│ │ ├── strategies/
│ │ │ └── AaveStrategy.sol # Aave integration
│ │ └── interfaces/
│ │ └── IStrategy.sol # Strategy interface
│ ├── test/
│ │ └── LiquidVault.t.sol # All tests
│ ├── script/
│ │ └── DeployFinal.s.sol # Deployment
│ └── foundry.toml
└── README.md
LiquidVault.sol - Main ERC4626 vault with automated strategy allocation
AaveStrategy.sol - Aave V3 integration for yield generation
MockAave.sol - Mock lending pool with 5% APY for testing
- User deposits USDC
- Vault mints lvUSDC shares (1:1 initially)
- Vault deploys 70% to Aave strategy
- 30% stays idle for quick withdrawals
- Aave earns interest on deposited funds
- Share value increases
- User withdraws USDC + yield
- OpenZeppelin contracts
- SafeERC20 for all transfers
- ReentrancyGuard
- Pausable emergency mechanism
- Owner access controls
- Comprehensive tests
- Additional strategies (Compound, Yearn)
- Multi-asset support (USDT, DAI)
- Automated rebalancing
- Analytics dashboard
- Mainnet deployment
MIT
Educational project. Not audited. Use at your own risk.
- GitHub: [https://github.com/Pawar7349]
- Twitter: [https://x.com/PratikP43786754]
- LinkedIn: [https://www.linkedin.com/in/pratik-pawar-600731237/]