Reference implementation of ERC-8416: an ERC-4626 vault that pays a fixed rate over scheduled epochs, with deposits that settle right away and redemptions that go through a request queue (ERC-7540).
This is one example schedule. Each epoch sets its own windows, so they can be longer, shorter, overlap, or leave gaps.
- Entry window:
deposit/mintare open, up to the epoch's deposit cap. - Accrual interval:
totalAssetsgrows at the epoch's fixed APR, so the share price only rises here. Interest compounds from one epoch to the next. - Exit window: holders call
requestRedeem, the owner callsfulfillRedeem, then holdersredeem/withdraw. - Limbo: time between epochs, when deposits and redemption requests are both closed.
- Strategy: deposited funds go to an
IFixedRateStrategy, which must return principal plus interest. - Termination: after the last epoch ends, the owner pulls all funds back and the exit window stays open forever.
| File | What |
|---|---|
src/IERC8416.sol |
ERC-8416 interface |
src/IERC7540.sol |
Async-redeem and operator interfaces (ERC-7540 / ERC-7575) |
src/IFixedRateStrategy.sol |
Strategy hook |
src/FixedRateVault.sol |
Reference vault |
test/ |
Foundry unit and fuzz tests |
You need Foundry and Node.js. Dependencies are installed with npm (no git submodules).
npm install # OpenZeppelin + forge-std
npm run build # compile
npm test # run tests
npm run coverage # coverage summary
npm run fmt # format with PrettierThis is a reference implementation for discussing the standard. It has not been audited. Do not use it in production.
