> For the complete documentation index, see [llms.txt](https://docs.ojolabs.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ojolabs.xyz/integration-guides/erc-4626-vault-adapter.md).

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