---
# System prepended metadata

title: Oracle solution for the Vault

---

# Oracle solution for the Vault

https://ethereum.org/en/developers/docs/oracles/

I've asked questions in some of the popular Auditor discord servers, but I had no luck with the answers.


From my reserach I've found 2 potential solutions.
1. Band protocol
2. Witnet
3. API3

## Band protocol

It should be possible to create custom price feeds for the stuff that we need.

For example:
3crv/USD price

https://docs.bandchain.org/custom-script/data-source/tutorial.html

Band protocol has a separate blockchain where oracles store and update prices based on data feeds. After creating data feeds that we need, we could then create a script and give it token amounts, and it would then calculate and return the total $ value of our Vault.


Pros:
- Possibly, more secure because we only rely on one protocol instead of two

Cons:
- Uses some shitty testnets
- Rust

## Witnet + The Graph

Witnet opens up a possibility to query data from The Graph.
That means that we could deploy the code for the graph, which would calculate the price of our Vault on every block, and have it available there.
We could then query that data from our smart contract using Witnet Oracle Network.

https://docs.witnet.io/smart-contracts/witnet-web-oracle/query-graphql-apis-in-solidity

Pros:
- We could use the graph data on both frontend + smart contracts 
- Javascript
- Uses Goerli testnet
- Grant possibility?

Cons:
- Two protocols instead of one


# API3 + Debank/Etherscan/Zerion/The Graph

API3 has a 'Airnode' which allows smart contracts to query an external API. That would allow us to query $ price of the Vault, using some of the portofolio trackers that are available out there.

Pros:
- 

Cons:
- No control over external API's


Links:
https://witnet.notion.site/The-Witnet-Grant-Program-0e6bc5ddbe4a4bf8a22c262dedfe268f
https://thegraph.com/ecosystem/grants/