Swap wstETH → WETH
Exchange wstETH for WETH instantly. The vault unwraps wstETH to stETH, then executes the same discount-based swap.
What you need
- wstETH in your wallet
- Approval for the vault contract to spend your wstETH (only if the vault doesn't already hold enough)
Steps
- Get a quote - unwrap your wstETH to its stETH equivalent (
wstETH.getStETHByWstETH(amount)), then callgetSwapQuote(stEthEquivalent)to see the expected WETH output. - Approve the vault to spend your wstETH (
wstETH.approve(vaultAddress, wstETHAmount)). - Call
swapWstEthToWeth(wstETHAmount, receiver, minEthAmountOut):wstETHAmount- amount of wstETH to unwrap and swap. Passtype(uint256).maxto use the entire vault's wstETH balance (no user pull).receiver- address to receive the WETH.minEthAmountOut- slippage protection; pass theuserOutfrom your quote.
- Receive WETH in the
receiveraddress.

How the vault handles wstETH
The vault checks its own wstETH balance first. If that is less than wstETHAmount, it pulls the shortfall from the caller. This means you only need an approval for the shortfall, not necessarily the full amount.
After acquiring the wstETH, the vault calls wstETH.unwrap(wstETHAmount) which burns wstETH and mints the equivalent stETH to the vault, then proceeds with the standard stETH swap.