Skip to content

Lappsnet/base-erc4626-vault

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Base ERC4626 Yield Vault

A production-grade, multi-strategy yield vault built on Base following the ERC4626 tokenized vault standard.

Architecture

User ──► BaseVault (ERC4626) ──► AaveV3Strategy ──► Aave V3 Pool
                │
                └──► [Future strategies...]
Contract Description
BaseVault Core ERC4626 vault with multi-strategy allocation, fees, and emergency controls
AaveV3Strategy Deposits idle assets into Aave V3 to earn variable APY
ChainlinkOracle Chainlink price feed wrapper with staleness protection

Features

  • ERC4626 compliant — composable with any vault aggregator
  • Multi-strategy — allocate capital across multiple yield sources via debtRatio weights
  • Role-based accessMANAGER, GUARDIAN, HARVESTER roles via OpenZeppelin AccessControl
  • Performance + management fees — configurable, capped at 20% / 2%
  • Emergency controls — pause deposits/withdrawals, emergency exit all strategies
  • Reentrancy protected — all state-changing paths guarded
  • Fuzz tested — 1000-run property tests via Foundry

Quick Start

# Install Foundry
curl -L https://foundry.paradigm.xyz | bash && foundryup

# Install dependencies
forge install

# Run tests
forge test -vvv

# Coverage
forge coverage

Deploy to Base

cp .env.example .env
# Fill in BASE_RPC_URL, PRIVATE_KEY, FEE_COLLECTOR, BASESCAN_API_KEY

forge script script/Deploy.s.sol:DeployBase \
  --rpc-url $BASE_RPC_URL \
  --broadcast \
  --verify

Deployed Contracts (Base Sepolia Testnet)

Contract Address
BaseVault 0x...
AaveV3Strategy 0x...
ChainlinkOracle 0x...

Security

  • Slither static analysis passes with 0 high-severity findings
  • ReentrancyGuard on all deposit/withdraw paths
  • Chainlink oracle staleness check (1 hour threshold)
  • All fees capped by immutable constants

License

MIT

About

ERC4626 multi-strategy yield vault on Base

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors