Non-custodial USDC savings vault that automatically routes deposits into Aave V3 to earn yield.
Users deposit USDC, receive vault shares, and withdraw principal plus net yield at any time. A protocol fee (default 5%) is taken only from yield — principal is mathematically protected.
| Network | Address | Explorer |
|---|---|---|
| Sepolia | 0x6C2Df464b38e92Ec8d01f8BEaF621f1ad894C107 |
Etherscan |
| Base Sepolia | 0xC0aAd48188dabF8d5B33e30A0946d79d5C8F6323 |
Blockscout |
Prerequisites: Foundry ≥ 0.2
git clone https://github.com/your-org/ys-contracts
cd ys-contracts
forge install
forge build
forge testAll unit and scenario tests run against mock contracts with no RPC required. See the Developer Guide for fork tests and environment setup.
| Document | Purpose |
|---|---|
| Technical Specification | Complete canonical reference: architecture, storage layout, security model, risks |
| Contract Reference | Per-contract: purpose, state, functions, logic flow, events, reverts, interaction diagrams |
| Developer Guide | Orientation, common workflows, code conventions |
| Setup | Prerequisites, installation, environment variables, Anvil workflow |
| Architecture | Contract design, share model, fee math, invariants, security model |
| Testing | Test suite structure, running tests, writing new tests |
| Deployment | Deploying to each network, verification, post-deploy checklist |
| Reference | Full ABI, function signatures, events, errors, cast one-liners |
| Troubleshooting | Common errors and how to fix them |
| FAQ | Frequently asked developer questions |
| Maintenance | Monitoring, fee collection, incident response, re-deployment |
| User Guide | End-user product documentation |
| Contributing | Contribution workflow and standards |
| Layer | Technology |
|---|---|
| Smart contracts | Solidity 0.8.30 |
| Toolchain | Foundry (forge, cast, anvil) |
| Access control utility | OpenZeppelin ReentrancyGuard |
| Yield source | Aave V3 (USDC → aUSDC) |
| Testing | Forge unit tests, scenario tests, mock contracts, fork tests |
src/
YieldSaveVault.sol Main vault contract
interfaces/
IERC20.sol Minimal ERC-20 interface
IPool.sol Aave V3 Pool interface
test/
YieldSaveVault.t.sol Core unit + fork tests
helpers/ Shared fixtures and fork utilities
scenarios/ Focused scenario tests (deposit, withdraw, fee, share math)
mocks/ MockERC20, MockAavePool
fork/ Real-chain integration tests (Base Sepolia)
script/
Deploy.s.sol Deployment script (all networks)
VerifyAddresses.s.sol Address sanity-check utility
deployments/ JSON records written at deploy time
docs/ Developer documentation
MIT