🔎Methodology

What makes vaults.fyi special?

vaults.fyi utilizes onchain data to track yields over a given period of time. We query blockchains hourly and obtain the share price of the specific DeFi vaults curated on our platform. This share price, indicative of a lender’s stake in a vault, can be used to calculate yield over time. By sourcing data directly and avoiding external API endpoints, we strive for accuracy and dependability.

For example, when calculating a vault’s 7-day APY on January 7th, we compare the share price on that day with the share price from January 1st and then extrapolate this difference over an entire year. This method is similarly applied when determining 1-day and 30-day APYs.

To efficiently automate this process, we implement specialized smart contracts that fetch and transform data using a single function. These contracts are deployed in a static call, which is temporary and does not affect blockchain storage, thereby incurring any cost. This method allows us to read data directly from the blockchain. Our approach saves on calls and enables the use of one result to calculate the next within the same call, a technique not possible with standard multi-call processes. We use services like Infura, Alchemy, and Ankr RPCs to execute these calls. Once the data is retrieved, it is stored in our backend database.

Last updated