# RsEthHandler

[Git Source](https://github.com/Ion-Protocol/ion-protocol/blob/88cc595825f1dc2eb738fb93e172a3e8ab7a5c43/src/flash/lrt/RsEthHandler.sol)

**Inherits:** UniswapFlashswapDirectMintHandler

Handler for the rsETH/wstETH market.

### [Functions](https://docs.ionprotocol.io/devs/smart-contract-architecture/flash/lrt/broken-reference) <a href="#functions" id="functions"></a>

#### [constructor](https://docs.ionprotocol.io/devs/smart-contract-architecture/flash/lrt/broken-reference) <a href="#constructor" id="constructor"></a>

Creates a new `RsEthHandler` instance.

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

**Parameters**

| Name                 | Type             | Description                                          |
| -------------------- | ---------------- | ---------------------------------------------------- |
| `_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](https://docs.ionprotocol.io/devs/smart-contract-architecture/flash/lrt/broken-reference) <a href="#mintcollateralasset" id="mintcollateralasset"></a>

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

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

**Parameters**

| Name         | Type      | Description |
| ------------ | --------- | ----------- |
| `amountWeth` | `uint256` |             |

#### [\_getAmountInForCollateralAmountOut](https://docs.ionprotocol.io/devs/smart-contract-architecture/flash/lrt/broken-reference) <a href="#getamountinforcollateralamountout" id="getamountinforcollateralamountout"></a>

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);
```

**Parameters**

| Name        | Type      | Description |
| ----------- | --------- | ----------- |
| `amountOut` | `uint256` |             |

**Returns**

| Name     | Type      | Description                                           |
| -------- | --------- | ----------------------------------------------------- |
| `<none>` | `uint256` | Amount mint asset required for desired output. \[WAD] |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ionprotocol.io/devs/smart-contract-architecture/flash/lrt/rsethhandler.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
