Overview

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.

Purpose

Key Functions

callHook(address asset, uint256 assets)

Attempts to make assets of asset liquid within the main vault by pulling from subvaults if needed.

Execution Flow:

  1. Checks how much of the asset the vault already holds.
  2. If balance is sufficient → no-op.
  3. Otherwise:

Guarantees:

getLiquidAssets(address asset) → uint256

Returns the total liquid amount of a given asset available across the vault and all its subvaults.