Overview

LidoDepositHook is an implementation of the IHook interface that acts as a conversion adapter for incoming deposits. It standardizes various ETH-like assets into wstETH for use in downstream vault logic. The hook supports ETH, WETH, and stETH as input formats and ensures conversion to wstETH before optionally forwarding execution to a downstream nextHook.

Primary Purpose

Constructor Parameters

Parameter Type Description
wsteth_ address Address of the wstETH token contract
weth_ address Address of the WETH token contract
nextHook_ address Address of the optional downstream hook to forward to after wrapping

Key Function

callHook(address asset, uint256 assets)

Handles conversion of an input asset into wstETH and optionally delegates the call to a downstream hook.

Supported Input Types:

  1. wstETH — forwarded directly
  2. stETH — wrapped into wstETH via IWSTETH(wsteth).wrap()
  3. WETH — unwrapped into ETH via IWETH(weth).withdraw(), then deposited into wstETH
  4. ETH (i.e. address(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)) — directly deposited into wstETH

Execution Steps: