Composable fee system for ERC-4626 vaults — management, performance, entry, and exit fees.
Price: $7.99 | Store: vault-forge | Product #3
FeeModule is an abstract Solidity contract that adds a complete, production-ready fee system to any ERC-4626 vault. Inherit it, configure your fees, and call the collection hooks in your vault's lifecycle functions.
| Fee Type | Mechanism | Default | Cap |
|---|---|---|---|
| Management | Annual bps charged via share inflation (dilutive minting) | 200 bps (2%) | 500 bps (5%) |
| Performance | Bps on yield above high-water mark | 2000 bps (20%) | 5000 bps (50%) |
| Entry | Bps deducted from deposit amounts | 0 bps | 200 bps (2%) |
| Exit | Bps deducted from withdrawal amounts | 0 bps | 200 bps (2%) |
Management Fee — Charged pro-rata based on time elapsed since last collection. New shares are minted to the fee recipient, diluting all holders proportionally. This follows Yearn's canonical streaming fee pattern.
feeShares = totalSupply * managementFeeBps * elapsed / (365 days * 10_000)
Performance Fee — Charged only on profit above the high-water mark (HWM). When totalAssets > highWaterMark, the profit is totalAssets - HWM, and the fee is a percentage of that profit. The HWM updates after each collection.
feeAssets = profit * performanceFeeBps / 10_000
Entry Fee — A flat percentage deducted from deposit amounts before shares are minted. The fee stays in the vault (increasing share value) or is transferred to the fee recipient.
Exit Fee — A flat percentage deducted from withdrawal amounts before assets are sent. Discourages short-term speculation.
Get the full Vault Fee Module and unlock everything.
Get the complete guide with every chapter unlocked, including code samples, diagrams, and best practices.
Access all interactive tools with complete data, all workload profiles, and the full scenario library.
Downloadable source code, configuration files, and working examples from every chapter.
Free updates for life. Every new chapter, tool, and improvement included.