Skip to content
This repository has been archived by the owner on Aug 25, 2022. It is now read-only.

Adding a vault to the website

jstashh edited this page Feb 4, 2022 · 4 revisions

Once a vault has been endorsed by the registry it will automatically appear on the website. However, there are a few more steps that need to be taken to provide all information that the website needs. Additional data about the vault is stored on meta.yearn.network, where data is automatically published to using a github action whenever the master branch of this repo is updated.

  1. In the yearn-meta repo, under the path data/vaults/{chain id}/{vault address}.json. Inside should properties defined in the schema here. This is an example of commit adding a new vault. New vaults should have the property apyTypeOverride set to new so that they are not displaying an apy on the website while it's still volatile because the vault is new. This will have to be manually removed later to display the apy on the website, like it has been done here. The apy can be manually overriden if necessary using the apyOverride field. For example, setting it to 0.1 will set the apy to 10%.

03502

  1. In the yearn-meta repo, if the vault's underlying token does not exist, then add it. The path should be data/tokens/{chain id}/{token address}.json. Here's an example. The schema for the json file is here.

  2. In the yearn-meta repo, if the strategy is new and has not been used by any other vaults, then a strategy file will need to be added under data/strategies/{chain id}/{strategy name}.json. Here's the schema. To avoid duplication, each strategy file includes multiple addresses where the strategy has been deployed under the addresses field. If the strategy has already been added to yearn-meta previously because a copy of it is already being used by a different vault, all you'll need to do is append the new strategy address to the addresses field on the relevant strategy file.

  3. To add the icons, go to the yearn-assets repo. You will need the following files: logo-128.png, logo-32.png, logo.svg. If you do not have them, ask in a suitable public channel to be provided them by a designer. Put these icons under a new folder at icons/multichain-tokens/{chain id}/{token address}

  4. Not necessary, but it'd be good to check that the vault's apy is being calculated correctly, and does not have an error, the apys used by the website can be found at https://api.yearn.finance/v1/chains/1/vaults/all (for mainnet). Specifically, the net_apy field is the one displayed by the webiste. If these values are incorrect, the calculations will have to be debugged and fixed in the yearn-exporter repo. To output the apy for a given vault, you can add it to this script here, and then run it using brownie run apy vault_name.

Clone this wiki locally