# ERC-4626 Vault Adapter

Our ERC-4626 adapter is a smaller contract that's used to overlay on top of an existing ERC-4626 vault, which will then output a chainlink-compatible price feed that can be used with common lending platforms.

Disclaimer: No risk strategy can 100% protect against any type of attack. This risk engine should be considered a part of a broader risk strategy - we provide absolutely no warranty of effectiveness.

**Warning**: Using this price feed alone may make your price feed susceptible to an [inflation attack](https://docs.openzeppelin.com/contracts/5.x/erc4626). Generally our users will use this in combination with one of our **Yield Risk Engines**.\
\
**Note:** The `decimals` value that returns from the ERC-4626 contract reflects the decimals of the token itself, but **the output is statically denominated in 1e18.** This is done to prevent rounding issues.\
\
For example with syrupUSDC, the ERC-4626 contract returns `6` for the `decimals` value, but the `latestRoundData.answer` responds with a value that is denominated in 10^18.

1. Navigate to the ERC-4626 adapter on etherscan

<figure><img src="/files/6PGJ5qVWCf8MWZ39SE0w" alt=""><figcaption></figcaption></figure>

2. Input your vault address you'd like to price out, and a description

<figure><img src="/files/hHXdZfx1jYBdB9YcrOcE" alt=""><figcaption></figcaption></figure>

3. Write the tx and you're done! You've created a chainlink-interface-compatible oracle that can be used with most popular defi protocols.

Example tx:\
<https://etherscan.io/tx/0x928e3178d7bec3b888dca6e69d7e08ff040238ae68b4ce370882d5d946aa76a1>

Example spawned price feed:\
<https://etherscan.io/address/0x9609addf1fe1aef95235c91bd45e426c75b909ab>


---

# 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.ojolabs.xyz/integration-guides/erc-4626-vault-adapter.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.
