> 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/lrt/weethwstethspotoracle.md).

# WeEthWstEthSpotOracle

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

**Inherits:** SpotOracle

The weETH spot oracle denominated in wstETH

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

#### [MAX\_TIME\_FROM\_LAST\_UPDATE](broken://pages/z9NZMzujvxydlK1EYM9X) <a href="#max_time_from_last_update" id="max_time_from_last_update"></a>

```
uint256 public immutable MAX_TIME_FROM_LAST_UPDATE;
```

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

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

Creates a new `WeEthWstEthSpotOracle` instance.

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

**Parameters**

| Name                     | Type      | Description                                        |
| ------------------------ | --------- | -------------------------------------------------- |
| `_ltv`                   | `uint256` | The loan to value ratio for weETH <> wstETH        |
| `_reserveOracle`         | `address` | The associated reserve oracle.                     |
| `_maxTimeFromLastUpdate` | `uint256` | The maximum delay for the oracle update in seconds |

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

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

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

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

**Returns**

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