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