# WstEthReserveOracle

[Git Source](https://github.com/Ion-Protocol/ion-protocol/blob/88cc595825f1dc2eb738fb93e172a3e8ab7a5c43/src/oracles/reserve/lst/WstEthReserveOracle.sol)

**Inherits:** ReserveOracle

Reserve oracle for wstETH.

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

#### [WST\_ETH](https://docs.ionprotocol.io/devs/smart-contract-architecture/oracles/reserve/lst/broken-reference) <a href="#wst_eth" id="wst_eth"></a>

```
address public immutable WST_ETH;
```

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

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

Creates a new `WstEthReserveOracle` instance.

```
constructor(
    address _wstEth,
    uint8 _ilkIndex,
    address[] memory _feeds,
    uint8 _quorum,
    uint256 _maxChange
)
    ReserveOracle(_ilkIndex, _feeds, _quorum, _maxChange);
```

**Parameters**

| Name         | Type        | Description                                                    |
| ------------ | ----------- | -------------------------------------------------------------- |
| `_wstEth`    | `address`   | wstETH contract address.                                       |
| `_ilkIndex`  | `uint8`     | of wstETH.                                                     |
| `_feeds`     | `address[]` | List of alternative data sources for the WstEth exchange rate. |
| `_quorum`    | `uint8`     | The amount of alternative data sources to aggregate.           |
| `_maxChange` | `uint256`   | Maximum percent change between exchange rate updates. \[RAY]   |

#### [\_getProtocolExchangeRate](https://docs.ionprotocol.io/devs/smart-contract-architecture/oracles/reserve/lst/broken-reference) <a href="#getprotocolexchangerate" id="getprotocolexchangerate"></a>

Returns the exchange rate between wstETH and stETH.

*In a slashing event, the loss for the staker is represented through a decrease in the wstETH to stETH exchange rate inside the wstETH contract. The stETH to ETH ratio in the Lido contract will still remain 1:1 as it rebases. stETH / wstETH = stEth per wstETH ETH / stETH = total ether value / total stETH supply ETH / wstETH = (ETH / stETH) \* (stETH / wstETH)*

```
function _getProtocolExchangeRate() internal view override returns (uint256);
```


---

# 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/reserve/lst/wstethreserveoracle.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.
