WstEthHandler
Inherits: UniswapFlashswapHandler, BalancerFlashloanDirectMintHandler
Handler for the wstETH collateral.
State Variables
STETH
IERC20 constant STETH = IERC20(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);Functions
constructor
Creates a new WstEthHandler instance.
constructor(
uint8 _ilkIndex,
IonPool _ionPool,
GemJoin _gemJoin,
Whitelist _whitelist,
IUniswapV3Pool _wstEthUniswapPool
)
IonHandlerBase(_ilkIndex, _ionPool, _gemJoin, _whitelist)
UniswapFlashswapHandler(_wstEthUniswapPool, false);Parameters
_ilkIndex
uint8
of wstETH.
_ionPool
IonPool
IonPool contract address.
_gemJoin
GemJoin
GemJoin contract address associated with wstETH.
_whitelist
Whitelist
Address of the Whitelist contract.
_wstEthUniswapPool
IUniswapV3Pool
Address of the wstETH/ETH Uniswap V3 pool.
_depositWethForLst
Unwraps weth into eth and deposits into lst contract.
Unwraps weth into eth and deposits into lst contract.
Parameters
amountWeth
uint256
The WETH amount to deposit. [WAD]
Returns
<none>
uint256
Amount of lst received. [WAD]
_getEthAmountInForLstAmountOut
Calculates the amount of eth required to receive amountLst.
Calculates the amount of eth required to receive amountLst.
Parameters
amountLst
uint256
Desired output amount. [WAD]
Returns
<none>
uint256
Eth required for desired lst output. [WAD]