RswEthHandler
Inherits: UniswapFlashswapDirectMintHandler
Handler for the rswETH/wstETH market.
Functions
constructor
Creates a new RswEthHandler
instance.
Parameters
_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.
Parameters
amountWeth
uint256
_getAmountInForCollateralAmountOut
Calculates the amount of mint asset required to receive amountLrt
.
Calculates the amount of mint asset required to receive amountLrt
.
Parameters
amountOut
uint256
Returns
<none>
uint256
Amount mint asset required for desired output. [WAD]
getEthAmountInForLstAmountOut
Returns the amount of ETH needed to mint the given amount of rswETH.
Parameters
lstAmount
uint256
Desired output amount. [WAD]
getLstAmountOutForEthAmountIn
Returns the amount of ETH needed to mint the given amount of rswETH.
Parameters
ethAmount
uint256
Amount of ETH to deposit. [WAD]