Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

MetaMorphoVaultAssertion

Git Source

Inherits: ERC4626PreviewAssertion

Title: MetaMorphoVaultAssertion

Author: Phylax Systems

Example ERC-4626 assertion bundle for MetaMorpho vaults.

MetaMorpho reports managed assets held in Morpho markets. User operations temporarily move assets and shares at different internal call boundaries, and ordinary withdrawals have equal vault inflow and outflow legs. This bundle therefore keeps only the ERC-4626 preview directions that MetaMorpho’s implementation supports. Managed-asset loss and flow policy need a MetaMorpho-specific adapter rather than the generic share-price or idle-balance circuit-breaker primitives.

Functions

constructor

constructor(address vault_, address asset_) ERC4626BaseAssertion(vault_, asset_);

Parameters

NameTypeDescription
vault_addressMetaMorpho vault instance whose selectors this bundle will monitor.
asset_addressUnderlying ERC-20 asset of the vault.

triggers

Registers the ERC-4626 selectors against the MetaMorpho-safe assertion set.

MetaMorpho-specific managed-asset and loss accounting must be installed separately.

function triggers() external view virtual override;

_maxPreviewDeviation

Pinned MetaMorpho operations return the same pre-state previewed amount.

function _maxPreviewDeviation() internal pure override returns (uint256);