BasicRedeemHook is a minimal hook implementation for IHook, designed to dynamically fetch liquidity from subvaults during redemption processing in a VaultModule. It ensures that enough assets are available for user redemptions by pulling liquidity from a set of registered subvaults.
This hook is typically invoked by a vault’s redemption queue or during redeem() operations when assets must be made liquid.
callHook(address asset, uint256 assets)Attempts to make assets of asset liquid within the main vault by pulling from subvaults if needed.
Execution Flow:
asset the vault already holds.subvaultAt(i))hookPullAssets()Guarantees:
0 balancegetLiquidAssets(address asset) → uint256Returns the total liquid amount of a given asset available across the vault and all its subvaults.