Git Source
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
IonPool
contract address.
GemJoin
contract address associated with wstETH.
Address of the Whitelist
contract.
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.
function _depositWethForLst(uint256 amountWeth) internal override returns (uint256);
Parameters
The WETH amount to deposit. [WAD]
Returns
Amount of lst received. [WAD]
_getEthAmountInForLstAmountOut
Calculates the amount of eth required to receive amountLst
.
Calculates the amount of eth required to receive amountLst
.
function _getEthAmountInForLstAmountOut(uint256 amountLst) internal view override returns (uint256);
Parameters
Desired output amount. [WAD]
Returns
Eth required for desired lst output. [WAD]
zapDepositAndBorrow
function zapDepositAndBorrow(
uint256 stEthAmount,
uint256 amountToBorrow,
bytes32[] calldata proof
)
external
onlyWhitelistedBorrowers(proof);
zapFlashLeverageCollateral
function zapFlashLeverageCollateral(
uint256 initialDeposit,
uint256 resultingAdditionalStEthCollateral,
uint256 maxResultingAdditionalDebt,
bytes32[] calldata proof
)
external
onlyWhitelistedBorrowers(proof);
zapFlashLeverageWeth
function zapFlashLeverageWeth(
uint256 initialDeposit,
uint256 resultingAdditionalStEthCollateral,
uint256 maxResultingAdditionalDebt,
bytes32[] calldata proof
)
external
onlyWhitelistedBorrowers(proof);
zapFlashswapLeverage
function zapFlashswapLeverage(
uint256 initialDeposit,
uint256 resultingAdditionalStEthCollateral,
uint256 maxResultingAdditionalDebt,
uint160 sqrtPriceLimitX96,
uint256 deadline,
bytes32[] calldata proof
)
external
checkDeadline(deadline)
onlyWhitelistedBorrowers(proof);