VEth
Parameter
Type
Description
(implicit) msg.value
uint256
Amount of native ETH sent with the transaction.
Returns:
Return
Type
Description
shares
uint256
Amount of shares minted to msg.sender
representing their ETH deposit.
RedeemEth
Function Signature:
function redeemEth(uint256 shares) external returns (uint256 assets)
Description: Allows users to redeem vault shares for native ETH. Shares are burned, WETH is unwrapped to ETH, and the ETH is sent to the caller.
Parameters:
Parameter
Type
Description
shares
uint256
Amount of shares to burn and convert to ETH.
Returns:
Return
Type
Description
assets
uint256
Amount of ETH returned to the user.
Fallback Function
receive() external payable {}
Allows the contract to receive ETH (required for WETH unwrapping). This is a bare receive function without logic — essential for the unwrapping step in redeemEth
.
Last updated