Skip to content

Fill in missing APYs #225

@murderteeth

Description

@murderteeth

what

We compute apy on external 4626 vaults here,
https://github.com/yearn/kong/blob/main/packages/ingest/abis/erc4626/timeseries/apy/hook.ts#L115

Note that the computation requires the vault to implement convertToAssets in order to compute a price per share. But external 4626 vaults are not guaranteed to implement convertToAssets or the counterpart convertToShares function.

so what

The result is that some of the index's external 4626 vaults incorrectly compute a 0% APY. For example, https://kalani.yearn.farm/erc4626/1/0xbEef047a543E45807105E51A8BBEFCc5950fcfBa

now what

  • Update kong's apy logic to pull both in a multicall then default to convertToAssets
  • Recompute historic APYs on effected external 4626 vaults

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions