@morpho-org/blue-sdk 2.0.0-next.25 → 2.0.0-next.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/vault/Vault.d.ts +3 -3
- package/lib/vault/Vault.js +4 -4
- package/package.json +5 -5
package/lib/vault/Vault.d.ts
CHANGED
|
@@ -142,11 +142,11 @@ export declare class AccrualVault extends Vault implements InputAccrualVault {
|
|
|
142
142
|
*/
|
|
143
143
|
get liquidity(): bigint;
|
|
144
144
|
/**
|
|
145
|
-
* The MetaMorpho vault's
|
|
145
|
+
* The MetaMorpho vault's APY on its assets averaged over its market deposits, before deducting the performance fee.
|
|
146
146
|
*/
|
|
147
|
-
get
|
|
147
|
+
get apy(): bigint;
|
|
148
148
|
/**
|
|
149
|
-
* The MetaMorpho vault's
|
|
149
|
+
* The MetaMorpho vault's APY on its assets averaged over its market deposits, after deducting the performance fee.
|
|
150
150
|
*/
|
|
151
151
|
get netApy(): bigint;
|
|
152
152
|
getAllocationProportion(marketId: MarketId): bigint;
|
package/lib/vault/Vault.js
CHANGED
|
@@ -147,9 +147,9 @@ class AccrualVault extends Vault {
|
|
|
147
147
|
.reduce((total, { position }) => total + position.withdrawCapacityLimit.value, 0n);
|
|
148
148
|
}
|
|
149
149
|
/**
|
|
150
|
-
* The MetaMorpho vault's
|
|
150
|
+
* The MetaMorpho vault's APY on its assets averaged over its market deposits, before deducting the performance fee.
|
|
151
151
|
*/
|
|
152
|
-
get
|
|
152
|
+
get apy() {
|
|
153
153
|
if (this.totalAssets === 0n)
|
|
154
154
|
return 0n;
|
|
155
155
|
return (this.allocations
|
|
@@ -157,10 +157,10 @@ class AccrualVault extends Vault {
|
|
|
157
157
|
.reduce((total, { position }) => total + position.market.supplyApy * position.supplyAssets, 0n) / this.totalAssets);
|
|
158
158
|
}
|
|
159
159
|
/**
|
|
160
|
-
* The MetaMorpho vault's
|
|
160
|
+
* The MetaMorpho vault's APY on its assets averaged over its market deposits, after deducting the performance fee.
|
|
161
161
|
*/
|
|
162
162
|
get netApy() {
|
|
163
|
-
return index_js_2.MathLib.wMulDown(this.
|
|
163
|
+
return index_js_2.MathLib.wMulDown(this.apy, index_js_2.MathLib.WAD - this.fee);
|
|
164
164
|
}
|
|
165
165
|
getAllocationProportion(marketId) {
|
|
166
166
|
if (this.totalAssets === 0n)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@morpho-org/blue-sdk",
|
|
3
3
|
"description": "Framework-agnostic package that defines Morpho-related entity classes (such as `Market`, `Token`, `Vault`).",
|
|
4
|
-
"version": "2.0.0-next.
|
|
4
|
+
"version": "2.0.0-next.27",
|
|
5
5
|
"author": "Morpho Association <contact@morpho.org>",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Rubilmax <rmilon@gmail.com>"
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
"@noble/hashes": "^1.5.0"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@morpho-org/morpho-ts": "^2.0.0-next.
|
|
24
|
+
"@morpho-org/morpho-ts": "^2.0.0-next.14"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"typescript": "^5.6.3",
|
|
28
|
-
"viem": "^2.21.
|
|
28
|
+
"viem": "^2.21.50",
|
|
29
29
|
"vitest": "^2.1.5",
|
|
30
|
-
"@morpho-org/morpho-ts": "^2.0.0-next.
|
|
31
|
-
"@morpho-org/test": "^2.0.0-next.
|
|
30
|
+
"@morpho-org/morpho-ts": "^2.0.0-next.14",
|
|
31
|
+
"@morpho-org/test": "^2.0.0-next.22"
|
|
32
32
|
},
|
|
33
33
|
"scripts": {
|
|
34
34
|
"prepublish": "$npm_execpath build",
|