# EzEthWstEthSpotOracle

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

**Inherits:** SpotOracle

The ezETH spot oracle denominated in wstETH

### [State Variables](https://docs.ionprotocol.io/devs/smart-contract-architecture/oracles/spot/lrt/broken-reference) <a href="#state-variables" id="state-variables"></a>

#### [MAX\_TIME\_FROM\_LAST\_UPDATE](https://docs.ionprotocol.io/devs/smart-contract-architecture/oracles/spot/lrt/broken-reference) <a href="#max_time_from_last_update" id="max_time_from_last_update"></a>

```
uint256 public immutable MAX_TIME_FROM_LAST_UPDATE;
```

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

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

Creates a new `EzEthWstEthSpotOracle` instance.

```
constructor(uint256 _ltv, address _reserveOracle, uint256 _maxTimeFromLastUpdate) SpotOracle(_ltv, _reserveOracle);
```

**Parameters**

| Name                     | Type      | Description                                 |
| ------------------------ | --------- | ------------------------------------------- |
| `_ltv`                   | `uint256` | The loan to value ratio for ezETH <> wstETH |
| `_reserveOracle`         | `address` | The associated reserve oracle.              |
| `_maxTimeFromLastUpdate` | `uint256` |                                             |

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

Gets the price of ezETH in wstETH (ETH / ezETH) / (ETH / stETH) \* (wstETH / stETH) = wstETH / ezETH

*Redstone oracle returns ETH per ezETH with 8 decimals. This needs to be converted to wstETH per ezETH denomination.*

```
function getPrice() public view override returns (uint256);
```

**Returns**

| Name     | Type      | Description                                     |
| -------- | --------- | ----------------------------------------------- |
| `<none>` | `uint256` | wstEthPerWeEth price of ezETH in wstETH. \[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/oracles/spot/lrt/ezethwstethspotoracle.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.
