IVaultUtils Interface
TheIVaultUtils
interface defines the functions available in the VaultUtils contract, which provides utility functions for the Vault including fee calculations, position validation, and funding rate updates.
Position Validation
Fee Calculations
Configuration
Usage Notes
- The VaultUtils contract is a companion to the main Vault, handling complex calculations and validations.
- It helps keep the Vault code cleaner and more modular.
- The contract is upgradeable separately from the main Vault, allowing improvements to fee calculations without changing the core Vault.
- All interactions with VaultUtils typically flow through the Vault contract rather than being called directly by users.
Security Considerations
- VaultUtils has access to the Vault’s state, so its security is critical.
- The fee calculations directly affect protocol economics and user experience.
- Liquidation validation is a critical security component that protects the protocol from undercollateralized positions.