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.
wstETH on deposit.wstETH.IHook (nextHook).| 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 |
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:
wstETH — forwarded directlystETH — wrapped into wstETH via IWSTETH(wsteth).wrap()WETH — unwrapped into ETH via IWETH(weth).withdraw(), then deposited into wstETHETH (i.e. address(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)) — directly deposited into wstETHExecution Steps:
asset == wstETH: do nothingasset == stETH:
wstETH to pull stETHwrap() on wstETH to convert to wstETHasset == WETH:
withdraw()wstETH contract to mint wstETH