Use Case & Applications
Enforces a critical ERC4626 vault invariant: total shares must never exceed total assets converted to shares, preventing share price manipulation and fund loss. Critical for yield aggregators, lending protocols implementing ERC4626, liquidity pools using ERC4626 for LP tokens, and staking protocols with ERC4626 vaults. Any violation could allow unauthorized share minting that dilutes existing holders or enables withdrawal of more assets than deposited, potentially leading to protocol insolvency.Explanation
Verifies the fundamental ERC4626 share-to-asset relationship using a basic approach:registerStorageChangeTrigger(): Trigger when total supply storage slot changes- Verify total assets are sufficient to back all outstanding shares
- Ensure share value is preserved and users can withdraw their assets
Code Example
Full examples with tests available in the Phylax Assertion Examples Repository.
Related Assertions
- ERC4626 Vault Operations — deposit, withdraw, mint, redeem with batch handling

