# 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="https://1263318908-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWevx0b0VM747CowY7OG1%2Fuploads%2FiWtGRC1kCxnbOrdmgGWL%2Fimage.png?alt=media&#x26;token=5b833986-0e12-44d8-805e-147f92f2185d" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://1263318908-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWevx0b0VM747CowY7OG1%2Fuploads%2FvF0t36cOykm8IZLdk5k2%2Fimage.png?alt=media&#x26;token=b8109c99-e1be-403f-a495-781362c4e49e" 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>
