EzEthHandler

Git Source

Inherits: UniswapFlashswapDirectMintHandlerWithDust

Handler for the ezETH collateral.

Functions

constructor

Creates a new EzEthHandler instance.

constructor(
    uint8 _ilkIndex,
    IonPool _ionPool,
    GemJoin _gemJoin,
    Whitelist _whitelist,
    IUniswapV3Pool _wstEthUniswapPool
)
    IonHandlerBase(_ilkIndex, _ionPool, _gemJoin, _whitelist)
    UniswapFlashswapDirectMintHandlerWithDust(_wstEthUniswapPool, WETH_ADDRESS);

Parameters

NameTypeDescription

_ilkIndex

uint8

Ilk index of the pool.

_ionPool

IonPool

address.

_gemJoin

GemJoin

address.

_whitelist

Whitelist

address.

_wstEthUniswapPool

IUniswapV3Pool

address of the wstETH/WETH Uniswap pool (0.01% fee).

_mintCollateralAsset

Deposits the mint asset into the provider's collateral-asset deposit contract.

function _mintCollateralAsset(uint256 amountWeth) internal override returns (uint256);

Parameters

NameTypeDescription

amountWeth

uint256

Returns

NameTypeDescription

<none>

uint256

Amount of collateral asset received. [WAD]

_getAmountInForCollateralAmountOut

Calculates the amount of mint asset required to receive amountLrt.

Calculates the amount of mint asset required to receive amountLrt.

function _getAmountInForCollateralAmountOut(uint256 amountOut) internal view override returns (uint256 ethAmountIn);

Parameters

NameTypeDescription

amountOut

uint256

Returns

NameTypeDescription

ethAmountIn

uint256

Amount mint asset required for desired output. [WAD]