# 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] |
