-
Notifications
You must be signed in to change notification settings - Fork 57
Adding a vault to the website
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.
- 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 propertyapyTypeOverride
set tonew
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 theapyOverride
field. For example, setting it to 0.1 will set the apy to 10%.
-
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. -
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 theaddresses
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 theaddresses
field on the relevant strategy file. -
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 aticons/multichain-tokens/{chain id}/{token address}
-
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
.