Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(Vault)!: rename avgApy to apy #167

Merged
merged 5 commits into from
Nov 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/blue-sdk/src/vault/Vault.ts
Original file line number Diff line number Diff line change
@@ -261,9 +261,9 @@ export class AccrualVault extends Vault implements InputAccrualVault {
}

/**
* The MetaMorpho vault's average APY on its assets, including the performance fee.
* The MetaMorpho vault's APY on its assets averaged over its market deposits, before deducting the performance fee.
*/
get avgApy() {
get apy() {
if (this.totalAssets === 0n) return 0n;

return (
@@ -278,10 +278,10 @@ export class AccrualVault extends Vault implements InputAccrualVault {
}

/**
* The MetaMorpho vault's average APY on its assets, excluding the performance fee.
* The MetaMorpho vault's APY on its assets averaged over its market deposits, after deducting the performance fee.
*/
get netApy() {
return MathLib.wMulDown(this.avgApy, MathLib.WAD - this.fee);
return MathLib.wMulDown(this.apy, MathLib.WAD - this.fee);
}

public getAllocationProportion(marketId: MarketId) {