> For the complete documentation index, see [llms.txt](https://docs.ionprotocol.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ionprotocol.io/devs/smart-contract-architecture/oracles/spot/lst/wstethspotoracle.md).

# WstEthSpotOracle

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

**Inherits:** SpotOracle

The wstETH spot oracle.

### [State Variables](broken://pages/mdixZxaUrD852sKoBlbu) <a href="#state-variables" id="state-variables"></a>

#### [ST\_ETH\_TO\_ETH\_CHAINLINK](broken://pages/mdixZxaUrD852sKoBlbu) <a href="#st_eth_to_eth_chainlink" id="st_eth_to_eth_chainlink"></a>

```
IChainlink public immutable ST_ETH_TO_ETH_CHAINLINK;
```

#### [WST\_ETH](broken://pages/mdixZxaUrD852sKoBlbu) <a href="#wst_eth" id="wst_eth"></a>

```
IWstEth public immutable WST_ETH;
```

### [Functions](broken://pages/mdixZxaUrD852sKoBlbu) <a href="#functions" id="functions"></a>

#### [constructor](broken://pages/mdixZxaUrD852sKoBlbu) <a href="#constructor" id="constructor"></a>

Creates a new `WstEthSpotOracle` instance.

```
constructor(
    uint256 _ltv,
    address _reserveOracle,
    address _stEthToEthChainlink,
    address _wstETH
)
    SpotOracle(_ltv, _reserveOracle);
```

**Parameters**

| Name                   | Type      | Description                             |
| ---------------------- | --------- | --------------------------------------- |
| `_ltv`                 | `uint256` | The loan to value ratio for wstETH.     |
| `_reserveOracle`       | `address` | The associated reserve oracle.          |
| `_stEthToEthChainlink` | `address` | The chainlink price feed for stETH/ETH. |
| `_wstETH`              | `address` | The wstETH contract address.            |

#### [getPrice](broken://pages/mdixZxaUrD852sKoBlbu) <a href="#getprice" id="getprice"></a>

Gets the price of wstETH in terms of ETH.

*Because the collateral amount in the core contract is denominated in amount of wstETH tokens, spot needs to equal (stETH/wstETH) \* (ETH/stETH) liquidationThreshold. If the beaconchain reserve decreases, the wstETH to stEth conversion will be directly impacted, but the stEth to Eth conversion will simply be determined by the chainlink price oracle.*

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

**Returns**

| Name           | Type      | Description                    |
| -------------- | --------- | ------------------------------ |
| `ethPerWstEth` | `uint256` | price of wstETH in ETH. \[WAD] |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.ionprotocol.io/devs/smart-contract-architecture/oracles/spot/lst/wstethspotoracle.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
