Skip to content

fix: exclude label-blacklisted vaults from APY - #1290

Merged
miohtama merged 1 commit into
masterfrom
fix/vault-chain-avg-apy-blacklist
Jun 26, 2026
Merged

fix: exclude label-blacklisted vaults from APY#1290
miohtama merged 1 commit into
masterfrom
fix/vault-chain-avg-apy-blacklist

Conversation

@miohtama

Copy link
Copy Markdown
Contributor

Why

Vault group average APY should exclude blacklisted vaults even when the upstream payload only carries the Blacklisted risk label and omits the numeric 999 sentinel.

Lessons learnt

The chains vault page already builds Avg. APY from calculateTvlWeightedApy() over the eligible vault set. Making the shared blacklist helper accept both blacklist representations keeps chain, protocol, stablecoin and slim-client consumers aligned.

Summary

  • Treat vaults with risk: Blacklisted as blacklisted even when risk_numeric is missing.
  • Include risk in the slim vault payload keys so label-based checks survive slimming.
  • Add unit coverage for numeric and label-only blacklist exclusion from TVL-weighted APY.

@miohtama
miohtama merged commit 97b18c0 into master Jun 26, 2026
2 of 5 checks passed
@miohtama
miohtama deleted the fix/vault-chain-avg-apy-blacklist branch June 26, 2026 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant