@defisaver/positions-sdk 2.1.174 → 2.1.175-looping-2-dev-dev
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/cjs/aaveV2/index.d.ts +4 -4
- package/cjs/aaveV2/index.js +7 -7
- package/cjs/aaveV3/index.d.ts +5 -14
- package/cjs/aaveV3/index.js +14 -10
- package/cjs/aaveV3/merkl.d.ts +5 -1
- package/cjs/aaveV3/merkl.js +8 -3
- package/cjs/aaveV3/sgho.d.ts +2 -16
- package/cjs/aaveV4/index.d.ts +4 -3
- package/cjs/aaveV4/index.js +19 -16
- package/cjs/aaveV4/lend.d.ts +2 -43
- package/cjs/aaveV4/merkl.d.ts +10 -2
- package/cjs/aaveV4/merkl.js +15 -6
- package/cjs/claiming/aaveV3.d.ts +3 -3
- package/cjs/claiming/aaveV3.js +5 -4
- package/cjs/claiming/ethena.d.ts +2 -1
- package/cjs/claiming/king.d.ts +3 -2
- package/cjs/claiming/king.js +3 -2
- package/cjs/claiming/spark.d.ts +4 -4
- package/cjs/claiming/spark.js +8 -7
- package/cjs/claiming/uniswap.d.ts +2 -2
- package/cjs/claiming/uniswap.js +3 -2
- package/cjs/compoundV2/index.d.ts +4 -4
- package/cjs/compoundV2/index.js +9 -9
- package/cjs/compoundV3/index.d.ts +5 -4
- package/cjs/compoundV3/index.js +17 -13
- package/cjs/compoundV3/merkl.d.ts +1 -1
- package/cjs/compoundV3/merkl.js +2 -5
- package/cjs/curveUsd/index.d.ts +5 -5
- package/cjs/curveUsd/index.js +17 -17
- package/cjs/fluid/index.d.ts +23 -66
- package/cjs/fluid/index.js +75 -72
- package/cjs/fluid/merkl.d.ts +5 -3
- package/cjs/fluid/merkl.js +11 -6
- package/cjs/helpers/aaveHelpers/index.js +1 -1
- package/cjs/helpers/aaveV4Helpers/index.js +14 -2
- package/cjs/helpers/compoundHelpers/index.js +2 -2
- package/cjs/helpers/curveUsdHelpers/index.js +1 -1
- package/cjs/helpers/fluidHelpers/index.js +1 -1
- package/cjs/helpers/liquityV2Helpers/index.js +1 -1
- package/cjs/helpers/llamaLendHelpers/index.js +1 -1
- package/cjs/helpers/morphoBlueHelpers/index.js +1 -1
- package/cjs/helpers/morphoMidnightHelpers/index.js +1 -1
- package/cjs/helpers/sparkHelpers/index.js +1 -1
- package/cjs/liquity/index.d.ts +5 -15
- package/cjs/liquity/index.js +23 -23
- package/cjs/liquityV2/index.d.ts +16 -31
- package/cjs/liquityV2/index.js +96 -78
- package/cjs/llamaLend/index.d.ts +5 -5
- package/cjs/llamaLend/index.js +13 -13
- package/cjs/maker/index.d.ts +6 -6
- package/cjs/maker/index.js +16 -16
- package/cjs/moneymarket/moneymarketCommonService.js +13 -2
- package/cjs/morphoBlue/index.d.ts +7 -7
- package/cjs/morphoBlue/index.js +28 -26
- package/cjs/morphoBlue/merkl.d.ts +5 -3
- package/cjs/morphoBlue/merkl.js +6 -8
- package/cjs/morphoMidnight/index.d.ts +5 -5
- package/cjs/morphoMidnight/index.js +18 -18
- package/cjs/portfolio/customDeFiData.d.ts +3 -0
- package/cjs/portfolio/customDeFiData.js +267 -0
- package/cjs/portfolio/index.d.ts +17 -8
- package/cjs/portfolio/index.js +459 -520
- package/cjs/portfolio/lendingProtocols.d.ts +184 -0
- package/cjs/portfolio/lendingProtocols.js +196 -0
- package/cjs/savings/index.d.ts +8 -2
- package/cjs/savings/index.js +33 -4
- package/cjs/services/merkl.d.ts +46 -2
- package/cjs/services/merkl.js +190 -19
- package/cjs/services/priceService.d.ts +12 -12
- package/cjs/services/priceService.js +30 -29
- package/cjs/services/viem.d.ts +10 -2
- package/cjs/services/viem.js +27 -1
- package/cjs/spark/index.d.ts +4 -4
- package/cjs/spark/index.js +9 -9
- package/cjs/types/aave.d.ts +98 -2
- package/cjs/types/aaveV4.d.ts +45 -0
- package/cjs/types/common.d.ts +1 -0
- package/cjs/types/common.js +1 -0
- package/cjs/types/compound.d.ts +26 -2
- package/cjs/types/curveUsd.d.ts +9 -1
- package/cjs/types/fluid.d.ts +13 -0
- package/cjs/types/index.d.ts +1 -0
- package/cjs/types/index.js +1 -0
- package/cjs/types/liquity.d.ts +12 -0
- package/cjs/types/liquityV2.d.ts +24 -0
- package/cjs/types/llamaLend.d.ts +12 -1
- package/cjs/types/merkl.d.ts +18 -0
- package/cjs/types/morphoBlue.d.ts +2 -0
- package/cjs/types/portfolio.d.ts +162 -5
- package/cjs/types/portfolio.js +18 -0
- package/cjs/types/savings/index.d.ts +9 -1
- package/cjs/types/spark.d.ts +21 -1
- package/cjs/umbrella/index.d.ts +3 -4
- package/cjs/umbrella/index.js +5 -4
- package/esm/aaveV2/index.d.ts +4 -4
- package/esm/aaveV2/index.js +8 -8
- package/esm/aaveV3/index.d.ts +5 -14
- package/esm/aaveV3/index.js +15 -11
- package/esm/aaveV3/merkl.d.ts +5 -1
- package/esm/aaveV3/merkl.js +9 -4
- package/esm/aaveV3/sgho.d.ts +2 -16
- package/esm/aaveV4/index.d.ts +4 -3
- package/esm/aaveV4/index.js +20 -17
- package/esm/aaveV4/lend.d.ts +2 -43
- package/esm/aaveV4/merkl.d.ts +10 -2
- package/esm/aaveV4/merkl.js +16 -7
- package/esm/claiming/aaveV3.d.ts +3 -3
- package/esm/claiming/aaveV3.js +6 -5
- package/esm/claiming/ethena.d.ts +2 -1
- package/esm/claiming/king.d.ts +3 -2
- package/esm/claiming/king.js +3 -2
- package/esm/claiming/spark.d.ts +4 -4
- package/esm/claiming/spark.js +9 -8
- package/esm/claiming/uniswap.d.ts +2 -2
- package/esm/claiming/uniswap.js +3 -2
- package/esm/compoundV2/index.d.ts +4 -4
- package/esm/compoundV2/index.js +9 -9
- package/esm/compoundV3/index.d.ts +5 -4
- package/esm/compoundV3/index.js +19 -15
- package/esm/compoundV3/merkl.d.ts +1 -1
- package/esm/compoundV3/merkl.js +3 -6
- package/esm/curveUsd/index.d.ts +5 -5
- package/esm/curveUsd/index.js +17 -17
- package/esm/fluid/index.d.ts +23 -66
- package/esm/fluid/index.js +76 -73
- package/esm/fluid/merkl.d.ts +5 -3
- package/esm/fluid/merkl.js +12 -7
- package/esm/helpers/aaveHelpers/index.js +1 -1
- package/esm/helpers/aaveV4Helpers/index.js +15 -3
- package/esm/helpers/compoundHelpers/index.js +2 -2
- package/esm/helpers/curveUsdHelpers/index.js +1 -1
- package/esm/helpers/fluidHelpers/index.js +1 -1
- package/esm/helpers/liquityV2Helpers/index.js +1 -1
- package/esm/helpers/llamaLendHelpers/index.js +1 -1
- package/esm/helpers/morphoBlueHelpers/index.js +1 -1
- package/esm/helpers/morphoMidnightHelpers/index.js +1 -1
- package/esm/helpers/sparkHelpers/index.js +1 -1
- package/esm/liquity/index.d.ts +5 -15
- package/esm/liquity/index.js +23 -23
- package/esm/liquityV2/index.d.ts +16 -31
- package/esm/liquityV2/index.js +95 -78
- package/esm/llamaLend/index.d.ts +5 -5
- package/esm/llamaLend/index.js +13 -13
- package/esm/maker/index.d.ts +6 -6
- package/esm/maker/index.js +16 -16
- package/esm/moneymarket/moneymarketCommonService.js +13 -2
- package/esm/morphoBlue/index.d.ts +7 -7
- package/esm/morphoBlue/index.js +29 -27
- package/esm/morphoBlue/merkl.d.ts +5 -3
- package/esm/morphoBlue/merkl.js +7 -9
- package/esm/morphoMidnight/index.d.ts +5 -5
- package/esm/morphoMidnight/index.js +18 -18
- package/esm/portfolio/customDeFiData.d.ts +3 -0
- package/esm/portfolio/customDeFiData.js +261 -0
- package/esm/portfolio/index.d.ts +17 -8
- package/esm/portfolio/index.js +459 -522
- package/esm/portfolio/lendingProtocols.d.ts +184 -0
- package/esm/portfolio/lendingProtocols.js +189 -0
- package/esm/savings/index.d.ts +8 -2
- package/esm/savings/index.js +31 -3
- package/esm/services/merkl.d.ts +46 -2
- package/esm/services/merkl.js +180 -18
- package/esm/services/priceService.d.ts +12 -12
- package/esm/services/priceService.js +31 -30
- package/esm/services/viem.d.ts +10 -2
- package/esm/services/viem.js +25 -0
- package/esm/spark/index.d.ts +4 -4
- package/esm/spark/index.js +10 -10
- package/esm/types/aave.d.ts +98 -2
- package/esm/types/aaveV4.d.ts +45 -0
- package/esm/types/common.d.ts +1 -0
- package/esm/types/common.js +1 -0
- package/esm/types/compound.d.ts +26 -2
- package/esm/types/curveUsd.d.ts +9 -1
- package/esm/types/fluid.d.ts +13 -0
- package/esm/types/index.d.ts +1 -0
- package/esm/types/index.js +1 -0
- package/esm/types/liquity.d.ts +12 -0
- package/esm/types/liquityV2.d.ts +24 -0
- package/esm/types/llamaLend.d.ts +12 -1
- package/esm/types/merkl.d.ts +18 -0
- package/esm/types/morphoBlue.d.ts +2 -0
- package/esm/types/portfolio.d.ts +162 -5
- package/esm/types/portfolio.js +17 -1
- package/esm/types/savings/index.d.ts +9 -1
- package/esm/types/spark.d.ts +21 -1
- package/esm/umbrella/index.d.ts +3 -4
- package/esm/umbrella/index.js +5 -4
- package/package.json +1 -1
- package/src/aaveV2/index.ts +7 -7
- package/src/aaveV3/index.ts +16 -11
- package/src/aaveV3/merkl.ts +9 -4
- package/src/aaveV3/sgho.ts +2 -17
- package/src/aaveV4/index.ts +19 -16
- package/src/aaveV4/lend.ts +2 -48
- package/src/aaveV4/merkl.ts +16 -7
- package/src/claiming/aaveV3.ts +9 -5
- package/src/claiming/ethena.ts +5 -5
- package/src/claiming/king.ts +8 -5
- package/src/claiming/spark.ts +15 -10
- package/src/claiming/uniswap.ts +4 -3
- package/src/compoundV2/index.ts +10 -9
- package/src/compoundV3/index.ts +20 -14
- package/src/compoundV3/merkl.ts +5 -4
- package/src/curveUsd/index.ts +19 -17
- package/src/fluid/index.ts +91 -72
- package/src/fluid/merkl.ts +12 -7
- package/src/helpers/aaveHelpers/index.ts +1 -1
- package/src/helpers/aaveV4Helpers/index.ts +16 -2
- package/src/helpers/compoundHelpers/index.ts +2 -2
- package/src/helpers/curveUsdHelpers/index.ts +1 -1
- package/src/helpers/fluidHelpers/index.ts +1 -1
- package/src/helpers/liquityV2Helpers/index.ts +1 -1
- package/src/helpers/llamaLendHelpers/index.ts +1 -1
- package/src/helpers/morphoBlueHelpers/index.ts +1 -1
- package/src/helpers/morphoMidnightHelpers/index.ts +1 -1
- package/src/helpers/sparkHelpers/index.ts +1 -1
- package/src/liquity/index.ts +24 -24
- package/src/liquityV2/index.ts +110 -76
- package/src/llamaLend/index.ts +15 -13
- package/src/maker/index.ts +19 -16
- package/src/moneymarket/moneymarketCommonService.ts +14 -2
- package/src/morphoBlue/index.ts +23 -20
- package/src/morphoBlue/merkl.ts +9 -6
- package/src/morphoMidnight/index.ts +13 -13
- package/src/portfolio/customDeFiData.ts +385 -0
- package/src/portfolio/index.ts +307 -331
- package/src/portfolio/lendingProtocols.ts +281 -0
- package/src/savings/index.ts +41 -4
- package/src/services/merkl.ts +209 -19
- package/src/services/priceService.ts +33 -30
- package/src/services/viem.ts +16 -0
- package/src/spark/index.ts +11 -8
- package/src/types/aave.ts +104 -1
- package/src/types/aaveV4.ts +50 -0
- package/src/types/common.ts +1 -0
- package/src/types/compound.ts +38 -2
- package/src/types/curveUsd.ts +17 -1
- package/src/types/fluid.ts +14 -0
- package/src/types/index.ts +1 -0
- package/src/types/liquity.ts +13 -1
- package/src/types/liquityV2.ts +26 -1
- package/src/types/llamaLend.ts +19 -1
- package/src/types/merkl.ts +20 -0
- package/src/types/morphoBlue.ts +3 -0
- package/src/types/portfolio.ts +191 -5
- package/src/types/savings/index.ts +12 -1
- package/src/types/spark.ts +25 -1
- package/src/umbrella/index.ts +7 -5
package/esm/fluid/merkl.js
CHANGED
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import memoize from 'memoizee';
|
|
11
11
|
import { aprToApy } from '../moneymarket';
|
|
12
|
-
import {
|
|
12
|
+
import { fetchMerklOpportunities } from '../services/merkl';
|
|
13
13
|
import { IncentiveKind, IncentiveSource, OpportunityStatus, } from '../types';
|
|
14
14
|
/**
|
|
15
15
|
* Merkl tags Fluid vault-scoped reward campaigns via the opportunity `type` field:
|
|
@@ -63,23 +63,28 @@ export const buildFluidMerklRewardMap = (opportunities, chainId) => {
|
|
|
63
63
|
return result;
|
|
64
64
|
};
|
|
65
65
|
/**
|
|
66
|
-
* Fetches live vault-scoped Fluid campaigns for the chain, keyed by vault address.
|
|
67
|
-
*
|
|
66
|
+
* Fetches live vault-scoped Fluid campaigns for the chain, keyed by vault address. With
|
|
67
|
+
* `asOfTimestamp` (unix seconds) the campaigns and APRs are the ones Merkl had at that moment
|
|
68
|
+
* instead. Never throws — on any failure it returns an empty map, so Merkl being down can't break
|
|
69
|
+
* market data.
|
|
68
70
|
*/
|
|
69
|
-
export const getFluidMerklCampaigns = memoize((chainId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
71
|
+
export const getFluidMerklCampaigns = memoize((chainId, asOfTimestamp) => __awaiter(void 0, void 0, void 0, function* () {
|
|
70
72
|
try {
|
|
71
|
-
const opportunities = yield
|
|
73
|
+
const opportunities = yield fetchMerklOpportunities({
|
|
72
74
|
mainProtocolId: 'fluid',
|
|
75
|
+
chainId: chainId.toString(),
|
|
73
76
|
type: Object.values(FluidMerklOpportunityType).join(','),
|
|
74
77
|
status: OpportunityStatus.LIVE,
|
|
75
|
-
});
|
|
78
|
+
}, asOfTimestamp);
|
|
76
79
|
return buildFluidMerklRewardMap(opportunities, chainId);
|
|
77
80
|
}
|
|
78
81
|
catch (e) {
|
|
79
82
|
console.error('Failed to fetch Fluid Merkl campaigns', e);
|
|
80
83
|
return {};
|
|
81
84
|
}
|
|
82
|
-
|
|
85
|
+
// memoizee keys on the declared arity, which excludes optional params — `length: 2` keeps the
|
|
86
|
+
// timestamp in the cache key so a historical lookup never serves (or is served by) the live one
|
|
87
|
+
}), { promise: true, maxAge: 60 * 1000, length: 2 });
|
|
83
88
|
/**
|
|
84
89
|
* Appends the vault's Merkl campaigns to its assets' incentive arrays — supply rewards on every
|
|
85
90
|
* suppliable asset and borrow rewards on every borrowable one. Smart collateral/debt vaults hold
|
|
@@ -149,7 +149,7 @@ export const aaveAnyGetAggregatedPositionData = (_a) => {
|
|
|
149
149
|
payload.leveragedType = leveragedType;
|
|
150
150
|
payload.leveragedAsset = leveragedAsset;
|
|
151
151
|
payload.liquidationPrice = '';
|
|
152
|
-
if (
|
|
152
|
+
if (leveragedAsset !== '') {
|
|
153
153
|
let assetPrice = data.assetsData[leveragedAsset].price;
|
|
154
154
|
if (leveragedType === LeverageType.VolatilePair) {
|
|
155
155
|
const borrowedAsset = Object.values(usedAssets).find(({ borrowedUsd }) => +borrowedUsd > 0);
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import Dec from 'decimal.js';
|
|
11
11
|
import { assetAmountInWei } from '@defisaver/tokens';
|
|
12
|
-
import { aprToApy, calcLeverageLiqPrice, getAssetsTotal, STABLE_ASSETS, } from '../../moneymarket';
|
|
12
|
+
import { aprToApy, calcLeverageLiqPrice, getAssetsTotal, getExposure, STABLE_ASSETS, } from '../../moneymarket';
|
|
13
13
|
import { calculateInterestEarned } from '../../staking';
|
|
14
14
|
import { IncentiveSide, LeverageType, } from '../../types';
|
|
15
15
|
import { borrowOperations } from '../../constants';
|
|
@@ -151,12 +151,15 @@ export const isLeveragedPosAaveV4 = (usedAssets, dustLimit = 5) => {
|
|
|
151
151
|
let supplyUnstable = 0;
|
|
152
152
|
let longAsset = '';
|
|
153
153
|
let shortAsset = '';
|
|
154
|
+
let stableCollAsset = '';
|
|
154
155
|
Object.values(usedAssets).forEach(({ symbol, suppliedUsd, borrowedUsd, collateral, reserveId, }) => {
|
|
155
156
|
const spokeAsset = `${symbol}-${reserveId}`;
|
|
156
157
|
const isSupplied = (+suppliedUsd) > dustLimit; // ignore dust like <limit leftover supply
|
|
157
158
|
const isBorrowed = (+borrowedUsd) > dustLimit; // ignore dust like <limit leftover supply
|
|
158
|
-
if (isSupplied && STABLE_ASSETS.includes(symbol) && collateral)
|
|
159
|
+
if (isSupplied && STABLE_ASSETS.includes(symbol) && collateral) {
|
|
159
160
|
supplyStable += 1;
|
|
161
|
+
stableCollAsset = spokeAsset;
|
|
162
|
+
}
|
|
160
163
|
if (isBorrowed && STABLE_ASSETS.includes(symbol))
|
|
161
164
|
borrowStable += 1;
|
|
162
165
|
if (isBorrowed && !STABLE_ASSETS.includes(symbol)) {
|
|
@@ -171,6 +174,7 @@ export const isLeveragedPosAaveV4 = (usedAssets, dustLimit = 5) => {
|
|
|
171
174
|
const isLong = borrowStable > 0 && borrowUnstable === 0 && supplyUnstable === 1 && supplyStable === 0;
|
|
172
175
|
const isShort = supplyStable > 0 && supplyUnstable === 0 && borrowUnstable === 1 && borrowStable === 0;
|
|
173
176
|
const isVolatilePair = supplyUnstable === 1 && borrowUnstable === 1 && supplyStable === 0 && borrowStable === 0;
|
|
177
|
+
const isStablePair = supplyStable > 0 && borrowStable > 0 && supplyUnstable === 0 && borrowUnstable === 0;
|
|
174
178
|
if (isLong) {
|
|
175
179
|
return {
|
|
176
180
|
leveragedType: LeverageType.Long,
|
|
@@ -189,6 +193,13 @@ export const isLeveragedPosAaveV4 = (usedAssets, dustLimit = 5) => {
|
|
|
189
193
|
leveragedAsset: longAsset,
|
|
190
194
|
};
|
|
191
195
|
}
|
|
196
|
+
if (isStablePair) {
|
|
197
|
+
return {
|
|
198
|
+
leveragedType: LeverageType.StablePair,
|
|
199
|
+
// with multiple stable collaterals there is no single leveraged asset (and no liquidation price)
|
|
200
|
+
leveragedAsset: supplyStable === 1 ? stableCollAsset : '',
|
|
201
|
+
};
|
|
202
|
+
}
|
|
192
203
|
return {
|
|
193
204
|
leveragedType: LeverageType.None,
|
|
194
205
|
leveragedAsset: '',
|
|
@@ -215,7 +226,7 @@ export const aaveV4GetAggregatedPositionData = ({ usedAssets, assetsData, networ
|
|
|
215
226
|
payload.leveragedType = leveragedType;
|
|
216
227
|
payload.leveragedAsset = leveragedAsset;
|
|
217
228
|
payload.liquidationPrice = '';
|
|
218
|
-
if (
|
|
229
|
+
if (leveragedAsset !== '') {
|
|
219
230
|
const leveragedAssetData = assetsData[leveragedAsset];
|
|
220
231
|
let assetPrice = (leveragedAssetData === null || leveragedAssetData === void 0 ? void 0 : leveragedAssetData.price) || '0';
|
|
221
232
|
if (leveragedType === LeverageType.VolatilePair) {
|
|
@@ -239,6 +250,7 @@ export const aaveV4GetAggregatedPositionData = ({ usedAssets, assetsData, networ
|
|
|
239
250
|
payload.collLiquidationRatio = new Dec(payload.suppliedCollateralUsd).div(payload.liquidationLimitUsd).mul(100).toString();
|
|
240
251
|
payload.healthRatio = new Dec(payload.liquidationLimitUsd).div(payload.borrowedUsd).toDP(4).toString();
|
|
241
252
|
payload.minHealthRatio = new Dec(payload.liquidationLimitUsd).div(payload.borrowLimitUsd).toDP(4).toString();
|
|
253
|
+
payload.exposure = getExposure(payload.borrowedUsd, payload.suppliedUsd);
|
|
242
254
|
const { netApy, incentiveUsd, totalInterestUsd } = calculateNetApyAaveV4({ usedAssets, assetsData });
|
|
243
255
|
payload.netApy = netApy;
|
|
244
256
|
payload.incentiveUsd = incentiveUsd;
|
|
@@ -108,7 +108,7 @@ export const getCompoundV2AggregatedData = (_a) => {
|
|
|
108
108
|
const { leveragedType, leveragedAsset } = isLeveragedPos(usedAssets);
|
|
109
109
|
payload.leveragedType = leveragedType;
|
|
110
110
|
payload.liquidationPrice = '';
|
|
111
|
-
if (
|
|
111
|
+
if (leveragedAsset !== '') {
|
|
112
112
|
payload.leveragedAsset = leveragedAsset;
|
|
113
113
|
const assetPrice = assetsData[handleWbtcLegacy(leveragedAsset)].price;
|
|
114
114
|
payload.liquidationPrice = calcLeverageLiqPrice(leveragedType, assetPrice, payload.borrowedUsd, payload.liquidationLimitUsd);
|
|
@@ -142,7 +142,7 @@ export const getCompoundV3AggregatedData = (_a) => {
|
|
|
142
142
|
const { leveragedType, leveragedAsset } = isLeveragedPos(usedAssets, selectedMarket.value === CompoundVersions.CompoundV3ETH ? 0.001 : 5);
|
|
143
143
|
payload.leveragedType = leveragedType;
|
|
144
144
|
payload.liquidationPrice = '';
|
|
145
|
-
if (
|
|
145
|
+
if (leveragedAsset !== '') {
|
|
146
146
|
payload.leveragedAsset = leveragedAsset;
|
|
147
147
|
let assetPrice = assetsData[leveragedAsset].price;
|
|
148
148
|
if (leveragedType === LeverageType.VolatilePair) {
|
|
@@ -38,7 +38,7 @@ export const getCrvUsdAggregatedData = (_a) => {
|
|
|
38
38
|
const { leveragedType, leveragedAsset } = isLeveragedPos(usedAssets);
|
|
39
39
|
payload.leveragedType = leveragedType;
|
|
40
40
|
payload.liquidationPrice = '';
|
|
41
|
-
if (
|
|
41
|
+
if (leveragedAsset !== '') {
|
|
42
42
|
payload.leveragedAsset = leveragedAsset;
|
|
43
43
|
payload.liquidationPrice = calcLeverageLiqPrice(leveragedType, usedAssets[selectedMarket.collAsset].price, payload.borrowedUsd, payload.borrowLimitUsd);
|
|
44
44
|
}
|
|
@@ -82,7 +82,7 @@ export const getFluidAggregatedData = ({ usedAssets, assetsData, marketData, },
|
|
|
82
82
|
const { leveragedType, leveragedAsset } = isLeveragedPos(usedAssets);
|
|
83
83
|
payload.leveragedType = leveragedType;
|
|
84
84
|
payload.liquidationPrice = '';
|
|
85
|
-
if (
|
|
85
|
+
if (leveragedAsset !== '') {
|
|
86
86
|
payload.leveragedAsset = leveragedAsset;
|
|
87
87
|
let assetPrice = assetsData[leveragedAsset].price;
|
|
88
88
|
if (leveragedType === LeverageType.VolatilePair) {
|
|
@@ -50,7 +50,7 @@ export const getLiquityV2AggregatedPositionData = ({ usedAssets, assetsData, min
|
|
|
50
50
|
payload.leveragedType = leveragedType;
|
|
51
51
|
payload.leveragedAsset = leveragedAsset;
|
|
52
52
|
payload.liquidationPrice = '';
|
|
53
|
-
if (
|
|
53
|
+
if (leveragedAsset !== '') {
|
|
54
54
|
const assetPrice = assetsData[leveragedAsset].price;
|
|
55
55
|
payload.liquidationPrice = calcLeverageLiqPrice(leveragedType, assetPrice, payload.borrowedUsd, payload.liquidationLimitUsd);
|
|
56
56
|
}
|
|
@@ -45,7 +45,7 @@ export const getLlamaLendAggregatedData = (_a) => {
|
|
|
45
45
|
const { leveragedType, leveragedAsset } = isLeveragedPos(usedAssets);
|
|
46
46
|
payload.leveragedType = leveragedType;
|
|
47
47
|
payload.liquidationPrice = '';
|
|
48
|
-
if (
|
|
48
|
+
if (leveragedAsset !== '') {
|
|
49
49
|
payload.leveragedAsset = leveragedAsset;
|
|
50
50
|
payload.liquidationPrice = calcLeverageLiqPrice(leveragedType, usedAssets[collAsset].price, payload.borrowedUsd, payload.borrowLimitUsd);
|
|
51
51
|
}
|
|
@@ -45,7 +45,7 @@ export const getMorphoBlueAggregatedPositionData = ({ usedAssets, assetsData, ma
|
|
|
45
45
|
const { leveragedType, leveragedAsset } = isLeveragedPos(usedAssets);
|
|
46
46
|
payload.leveragedType = leveragedType;
|
|
47
47
|
payload.liquidationPrice = '';
|
|
48
|
-
if (
|
|
48
|
+
if (leveragedAsset !== '') {
|
|
49
49
|
payload.leveragedAsset = leveragedAsset;
|
|
50
50
|
let assetPrice = assetsData[leveragedAsset].price;
|
|
51
51
|
if (leveragedType === LeverageType.VolatilePair) {
|
|
@@ -63,7 +63,7 @@ export const getMorphoMidnightAggregatedPositionData = ({ usedAssets, assetsData
|
|
|
63
63
|
const { leveragedType, leveragedAsset } = isLeveragedPos(usedAssets);
|
|
64
64
|
payload.leveragedType = leveragedType;
|
|
65
65
|
payload.liquidationPrice = '';
|
|
66
|
-
if (
|
|
66
|
+
if (leveragedAsset !== '') {
|
|
67
67
|
payload.leveragedAsset = leveragedAsset;
|
|
68
68
|
let assetPrice = assetsData[leveragedAsset].price;
|
|
69
69
|
if (leveragedType === LeverageType.VolatilePair) {
|
|
@@ -80,7 +80,7 @@ export const sparkGetAggregatedPositionData = (_a) => {
|
|
|
80
80
|
const { leveragedType, leveragedAsset } = isLeveragedPos(usedAssets);
|
|
81
81
|
payload.leveragedType = leveragedType;
|
|
82
82
|
payload.liquidationPrice = '';
|
|
83
|
-
if (
|
|
83
|
+
if (leveragedAsset !== '') {
|
|
84
84
|
payload.leveragedAsset = leveragedAsset;
|
|
85
85
|
let assetPrice = data.assetsData[leveragedAsset].price; // TODO sparkPrice or price??
|
|
86
86
|
if (leveragedType === LeverageType.VolatilePair) {
|
package/esm/liquity/index.d.ts
CHANGED
|
@@ -1,21 +1,11 @@
|
|
|
1
1
|
import { Client } from 'viem';
|
|
2
2
|
import { Blockish, EthAddress, EthereumProvider, NetworkNumber, PositionBalances } from '../types/common';
|
|
3
|
-
import { LiquityTroveInfo } from '../types';
|
|
3
|
+
import { LiquityStakingData, LiquityTroveInfo } from '../types';
|
|
4
4
|
export declare const LIQUITY_NORMAL_MODE_RATIO = 110;
|
|
5
5
|
export declare const LIQUITY_RECOVERY_MODE_RATIO = 150;
|
|
6
6
|
export declare const _getLiquityAccountBalances: (provider: Client, network: NetworkNumber, block: Blockish, addressMapping: boolean, address: EthAddress) => Promise<PositionBalances>;
|
|
7
7
|
export declare const getLiquityAccountBalances: (provider: EthereumProvider, network: NetworkNumber, block: Blockish, addressMapping: boolean, address: EthAddress) => Promise<PositionBalances>;
|
|
8
|
-
export declare const getDebtInFront: (provider: EthereumProvider, address: EthAddress) => Promise<string>;
|
|
9
|
-
export declare const _getLiquityTroveInfo: (provider: Client, network: NetworkNumber, address: EthAddress) => Promise<LiquityTroveInfo>;
|
|
10
|
-
export declare const getLiquityTroveInfo: (provider: EthereumProvider, network: NetworkNumber, address: EthAddress) => Promise<LiquityTroveInfo>;
|
|
11
|
-
export declare const getLiquityStakingData: (provider: Client, network: NetworkNumber, address: EthAddress) => Promise<
|
|
12
|
-
totalLUSDDeposited: string;
|
|
13
|
-
totalLQTYStaked: string;
|
|
14
|
-
stakedLQTY: string;
|
|
15
|
-
stakedLUSDBalance: string;
|
|
16
|
-
rewardETH: string;
|
|
17
|
-
rewardLUSD: string;
|
|
18
|
-
stabilityRewardETH: string;
|
|
19
|
-
stabilityRewardLQTY: string;
|
|
20
|
-
showStakingBalances: boolean;
|
|
21
|
-
}>;
|
|
8
|
+
export declare const getDebtInFront: (provider: EthereumProvider, address: EthAddress, blockNumber?: Blockish) => Promise<string>;
|
|
9
|
+
export declare const _getLiquityTroveInfo: (provider: Client, network: NetworkNumber, address: EthAddress, blockNumber?: Blockish) => Promise<LiquityTroveInfo>;
|
|
10
|
+
export declare const getLiquityTroveInfo: (provider: EthereumProvider, network: NetworkNumber, address: EthAddress, blockNumber?: Blockish) => Promise<LiquityTroveInfo>;
|
|
11
|
+
export declare const getLiquityStakingData: (provider: Client, network: NetworkNumber, address: EthAddress, blockNumber?: Blockish) => Promise<LiquityStakingData>;
|
package/esm/liquity/index.js
CHANGED
|
@@ -40,33 +40,33 @@ export const _getLiquityAccountBalances = (provider, network, block, addressMapp
|
|
|
40
40
|
return balances;
|
|
41
41
|
});
|
|
42
42
|
export const getLiquityAccountBalances = (provider, network, block, addressMapping, address) => __awaiter(void 0, void 0, void 0, function* () { return _getLiquityAccountBalances(getViemProvider(provider, network), network, block, addressMapping, address); });
|
|
43
|
-
const _getDebtInFront = (viewContract_1, address_1, ...args_1) => __awaiter(void 0, [viewContract_1, address_1, ...args_1], void 0, function* (viewContract, address, accumulatedSum = '0', iterations = 2000) {
|
|
44
|
-
const res = yield viewContract.read.getDebtInFront([address, accumulatedSum, iterations]);
|
|
43
|
+
const _getDebtInFront = (viewContract_1, address_1, ...args_1) => __awaiter(void 0, [viewContract_1, address_1, ...args_1], void 0, function* (viewContract, address, accumulatedSum = '0', iterations = 2000, blockNumber = 'latest') {
|
|
44
|
+
const res = yield viewContract.read.getDebtInFront([address, accumulatedSum, iterations], setViemBlockNumber(blockNumber));
|
|
45
45
|
const debt = res[1].toString();
|
|
46
46
|
const next = res[0];
|
|
47
47
|
if (next === ZERO_ADDRESS)
|
|
48
48
|
return assetAmountInEth(debt, 'LUSD');
|
|
49
|
-
return _getDebtInFront(viewContract, next, debt, iterations);
|
|
49
|
+
return _getDebtInFront(viewContract, next, debt, iterations, blockNumber);
|
|
50
50
|
});
|
|
51
|
-
export const getDebtInFront = (
|
|
51
|
+
export const getDebtInFront = (provider_1, address_1, ...args_1) => __awaiter(void 0, [provider_1, address_1, ...args_1], void 0, function* (provider, address, blockNumber = 'latest') {
|
|
52
52
|
const client = getViemProvider(provider, NetworkNumber.Eth);
|
|
53
53
|
const viewContract = LiquityViewContractViem(client, NetworkNumber.Eth);
|
|
54
|
-
return _getDebtInFront(viewContract, address);
|
|
54
|
+
return _getDebtInFront(viewContract, address, '0', 2000, blockNumber);
|
|
55
55
|
});
|
|
56
|
-
export const _getLiquityTroveInfo = (
|
|
56
|
+
export const _getLiquityTroveInfo = (provider_1, network_1, address_1, ...args_1) => __awaiter(void 0, [provider_1, network_1, address_1, ...args_1], void 0, function* (provider, network, address, blockNumber = 'latest') {
|
|
57
57
|
const viewContract = LiquityViewContractViem(provider, network);
|
|
58
58
|
const collSurplusPoolContract = LiquityCollSurplusPoolContractViem(provider, network);
|
|
59
59
|
const troveManagerContract = LiquityTroveManagerContractViem(provider, network);
|
|
60
60
|
const priceFeedContract = LiquityPriceFeedContractViem(provider, network);
|
|
61
61
|
const activePoolContract = LiquityActivePoolContractViem(provider, network);
|
|
62
62
|
const [troveInfo, collSurplusInfo, borrowingRateWithDecay, assetPrice, totalETH, totalLUSD, debtInFront,] = yield Promise.all([
|
|
63
|
-
viewContract.read.getTroveInfo([address]),
|
|
64
|
-
collSurplusPoolContract.read.getCollateral([address]),
|
|
65
|
-
troveManagerContract.read.getBorrowingRateWithDecay(),
|
|
66
|
-
priceFeedContract.read.fetchPrice(),
|
|
67
|
-
activePoolContract.read.getETH(),
|
|
68
|
-
activePoolContract.read.getLUSDDebt(),
|
|
69
|
-
_getDebtInFront(viewContract, address),
|
|
63
|
+
viewContract.read.getTroveInfo([address], setViemBlockNumber(blockNumber)),
|
|
64
|
+
collSurplusPoolContract.read.getCollateral([address], setViemBlockNumber(blockNumber)),
|
|
65
|
+
troveManagerContract.read.getBorrowingRateWithDecay(setViemBlockNumber(blockNumber)),
|
|
66
|
+
priceFeedContract.read.fetchPrice(setViemBlockNumber(blockNumber)),
|
|
67
|
+
activePoolContract.read.getETH(setViemBlockNumber(blockNumber)),
|
|
68
|
+
activePoolContract.read.getLUSDDebt(setViemBlockNumber(blockNumber)),
|
|
69
|
+
_getDebtInFront(viewContract, address, '0', 2000, blockNumber),
|
|
70
70
|
]);
|
|
71
71
|
const recoveryMode = troveInfo[6];
|
|
72
72
|
const minCollateralRatio = recoveryMode ? LIQUITY_RECOVERY_MODE_RATIO : LIQUITY_NORMAL_MODE_RATIO;
|
|
@@ -100,19 +100,19 @@ export const _getLiquityTroveInfo = (provider, network, address) => __awaiter(vo
|
|
|
100
100
|
};
|
|
101
101
|
return payload;
|
|
102
102
|
});
|
|
103
|
-
export const getLiquityTroveInfo = (
|
|
104
|
-
export const getLiquityStakingData = (
|
|
103
|
+
export const getLiquityTroveInfo = (provider_1, network_1, address_1, ...args_1) => __awaiter(void 0, [provider_1, network_1, address_1, ...args_1], void 0, function* (provider, network, address, blockNumber = 'latest') { return _getLiquityTroveInfo(getViemProvider(provider, network, { batch: { multicall: true } }), network, address, blockNumber); });
|
|
104
|
+
export const getLiquityStakingData = (provider_1, network_1, address_1, ...args_1) => __awaiter(void 0, [provider_1, network_1, address_1, ...args_1], void 0, function* (provider, network, address, blockNumber = 'latest') {
|
|
105
105
|
const lqtyStakingView = LiquityLQTYStakingViem(provider, network);
|
|
106
106
|
const stabilityPoolView = LiquityStabilityPoolViem(provider, network);
|
|
107
107
|
const [stakes, pendingETHGain, pendingLUSDGain, totalLQTYStakes, stabilityPoolETHGain, stabilityPoolLQTYGain, compoundedLUSDDeposit, totalLUSDDeposits,] = yield Promise.all([
|
|
108
|
-
lqtyStakingView.read.stakes([address]),
|
|
109
|
-
lqtyStakingView.read.getPendingETHGain([address]),
|
|
110
|
-
lqtyStakingView.read.getPendingLUSDGain([address]),
|
|
111
|
-
lqtyStakingView.read.totalLQTYStaked(),
|
|
112
|
-
stabilityPoolView.read.getDepositorETHGain([address]),
|
|
113
|
-
stabilityPoolView.read.getDepositorLQTYGain([address]),
|
|
114
|
-
stabilityPoolView.read.getCompoundedLUSDDeposit([address]),
|
|
115
|
-
stabilityPoolView.read.getTotalLUSDDeposits(),
|
|
108
|
+
lqtyStakingView.read.stakes([address], setViemBlockNumber(blockNumber)),
|
|
109
|
+
lqtyStakingView.read.getPendingETHGain([address], setViemBlockNumber(blockNumber)),
|
|
110
|
+
lqtyStakingView.read.getPendingLUSDGain([address], setViemBlockNumber(blockNumber)),
|
|
111
|
+
lqtyStakingView.read.totalLQTYStaked(setViemBlockNumber(blockNumber)),
|
|
112
|
+
stabilityPoolView.read.getDepositorETHGain([address], setViemBlockNumber(blockNumber)),
|
|
113
|
+
stabilityPoolView.read.getDepositorLQTYGain([address], setViemBlockNumber(blockNumber)),
|
|
114
|
+
stabilityPoolView.read.getCompoundedLUSDDeposit([address], setViemBlockNumber(blockNumber)),
|
|
115
|
+
stabilityPoolView.read.getTotalLUSDDeposits(setViemBlockNumber(blockNumber)),
|
|
116
116
|
]);
|
|
117
117
|
const totalLUSDDeposited = getEthAmountForDecimals(totalLUSDDeposits, 18);
|
|
118
118
|
const totalLQTYStaked = getEthAmountForDecimals(totalLQTYStakes, 18);
|
package/esm/liquityV2/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Client, PublicClient } from 'viem';
|
|
2
|
-
import { EthAddress, EthereumProvider, NetworkNumber } from '../types/common';
|
|
3
|
-
import { LiquityV2AssetsData, LiquityV2MarketData, LiquityV2MarketInfo, LiquityV2TroveData, LiquityV2Versions } from '../types';
|
|
2
|
+
import { Blockish, EthAddress, EthereumProvider, NetworkNumber } from '../types/common';
|
|
3
|
+
import { LiquityV2AssetsData, LiquityV2MarketData, LiquityV2MarketInfo, LiquityV2SBoldYBoldData, LiquityV2StakingData, LiquityV2TroveData, LiquityV2Versions } from '../types';
|
|
4
4
|
export type SPYieldGainParameters = {
|
|
5
5
|
P: string;
|
|
6
6
|
aggWeightedDebtSum: string;
|
|
@@ -9,8 +9,8 @@ export type SPYieldGainParameters = {
|
|
|
9
9
|
totalBoldDeposits: string;
|
|
10
10
|
yieldGainsPending: string;
|
|
11
11
|
};
|
|
12
|
-
export declare const _getLiquityV2MarketData: (provider: Client, network: NetworkNumber, selectedMarket: LiquityV2MarketInfo) => Promise<LiquityV2MarketData>;
|
|
13
|
-
export declare const getLiquityV2MarketData: (provider: EthereumProvider, network: NetworkNumber, selectedMarket: LiquityV2MarketInfo) => Promise<LiquityV2MarketData>;
|
|
12
|
+
export declare const _getLiquityV2MarketData: (provider: Client, network: NetworkNumber, selectedMarket: LiquityV2MarketInfo, blockNumber?: Blockish) => Promise<LiquityV2MarketData>;
|
|
13
|
+
export declare const getLiquityV2MarketData: (provider: EthereumProvider, network: NetworkNumber, selectedMarket: LiquityV2MarketInfo, blockNumber?: Blockish) => Promise<LiquityV2MarketData>;
|
|
14
14
|
export declare const nftContractCreationBlockMapping: {
|
|
15
15
|
liquityv2eth: number;
|
|
16
16
|
liquityv2wsteth: number;
|
|
@@ -19,6 +19,11 @@ export declare const nftContractCreationBlockMapping: {
|
|
|
19
19
|
liquityv2wstethlegacy: number;
|
|
20
20
|
liquityv2rethlegacy: number;
|
|
21
21
|
};
|
|
22
|
+
/**
|
|
23
|
+
* The trove ids of several accounts in one market: the market's NFT transfers are read once for all of them, rather
|
|
24
|
+
* than once per account as _getLiquityV2UserTroveIds does.
|
|
25
|
+
*/
|
|
26
|
+
export declare const _getLiquityV2UsersTroveIds: (provider: PublicClient, network: NetworkNumber, selectedMarket: LiquityV2MarketInfo, troveNFTAddress: EthAddress, limitBlocksForEventFetching: boolean, accounts: EthAddress[]) => Promise<Record<EthAddress, string[]>>;
|
|
22
27
|
export declare const _getLiquityV2UserTroveIds: (provider: PublicClient, network: NetworkNumber, selectedMarket: LiquityV2MarketInfo, troveNFTAddress: EthAddress, limitBlocksForEventFetching: boolean, account: EthAddress) => Promise<{
|
|
23
28
|
troves: {
|
|
24
29
|
troveId: string;
|
|
@@ -32,45 +37,25 @@ export declare const getLiquityV2UserTroveIds: (provider: EthereumProvider, netw
|
|
|
32
37
|
nextFreeTroveIndex: string;
|
|
33
38
|
}>;
|
|
34
39
|
export declare const calculateDebtInFrontLiquityV2: (markets: Record<LiquityV2Versions, LiquityV2MarketData>, selectedMarket: LiquityV2Versions, allMarketsUnbackedDebts: Record<LiquityV2Versions, string>, interestRateDebtInFront: string) => string;
|
|
35
|
-
export declare const getDebtInFrontForInterestRateIncludingNewDebtLiquityV2: (newDebt: string, markets: Record<LiquityV2Versions, LiquityV2MarketData>, selectedMarket: LiquityV2Versions, provider: Client, network: NetworkNumber, interestRate: string) => Promise<string>;
|
|
36
|
-
export declare const getDebtInFrontForInterestRateLiquityV2: (markets: Record<LiquityV2Versions, LiquityV2MarketData>, selectedMarket: LiquityV2Versions, provider: EthereumProvider, network: NetworkNumber, isLegacy: boolean, interestRate: string, debtInFrontBeingMoved?: string) => Promise<string>;
|
|
40
|
+
export declare const getDebtInFrontForInterestRateIncludingNewDebtLiquityV2: (newDebt: string, markets: Record<LiquityV2Versions, LiquityV2MarketData>, selectedMarket: LiquityV2Versions, provider: Client, network: NetworkNumber, interestRate: string, blockNumber?: Blockish) => Promise<string>;
|
|
41
|
+
export declare const getDebtInFrontForInterestRateLiquityV2: (markets: Record<LiquityV2Versions, LiquityV2MarketData>, selectedMarket: LiquityV2Versions, provider: EthereumProvider, network: NetworkNumber, isLegacy: boolean, interestRate: string, debtInFrontBeingMoved?: string, blockNumber?: Blockish) => Promise<string>;
|
|
37
42
|
export declare const _getLiquityV2TroveData: (provider: Client, network: NetworkNumber, { selectedMarket, assetsData, troveId, allMarketsData, }: {
|
|
38
43
|
selectedMarket: LiquityV2MarketInfo;
|
|
39
44
|
assetsData: LiquityV2AssetsData;
|
|
40
45
|
troveId: string;
|
|
41
46
|
allMarketsData: Record<LiquityV2Versions, LiquityV2MarketData>;
|
|
42
|
-
}, fetchDebtInFront?: boolean) => Promise<LiquityV2TroveData>;
|
|
47
|
+
}, fetchDebtInFront?: boolean, blockNumber?: Blockish) => Promise<LiquityV2TroveData>;
|
|
43
48
|
export declare const getLiquityV2TroveData: (provider: EthereumProvider, network: NetworkNumber, { selectedMarket, assetsData, troveId, allMarketsData, }: {
|
|
44
49
|
selectedMarket: LiquityV2MarketInfo;
|
|
45
50
|
assetsData: LiquityV2AssetsData;
|
|
46
51
|
troveId: string;
|
|
47
52
|
allMarketsData: Record<LiquityV2Versions, LiquityV2MarketData>;
|
|
48
|
-
}, fetchDebtInFront?: boolean) => Promise<LiquityV2TroveData>;
|
|
49
|
-
export declare const getLiquityV2ClaimableCollateral: (collSurplusPoolAddress: EthAddress, account: EthAddress, provider: EthereumProvider, network: NetworkNumber) => Promise<string>;
|
|
53
|
+
}, fetchDebtInFront?: boolean, blockNumber?: Blockish) => Promise<LiquityV2TroveData>;
|
|
54
|
+
export declare const getLiquityV2ClaimableCollateral: (collSurplusPoolAddress: EthAddress, account: EthAddress, provider: EthereumProvider, network: NetworkNumber, blockNumber?: Blockish) => Promise<string>;
|
|
50
55
|
export type sBoldYieldParameters = {
|
|
51
56
|
WETH: string;
|
|
52
57
|
wsETH: string;
|
|
53
58
|
rETH: string;
|
|
54
59
|
};
|
|
55
|
-
export declare const getLiquityV2Staking: (provider: Client, network: NetworkNumber, market: LiquityV2Versions, user: EthAddress) => Promise<
|
|
56
|
-
|
|
57
|
-
stakedBOLDBalance: string;
|
|
58
|
-
stabilityRewardColl: string;
|
|
59
|
-
stabilityRewardYield: string;
|
|
60
|
-
showStakingBalances: boolean;
|
|
61
|
-
debtTokenBalance: string;
|
|
62
|
-
stabilityPoolApy: string;
|
|
63
|
-
}>;
|
|
64
|
-
export declare const getLiquitySAndYBold: (provider: Client, network: NetworkNumber, markets: any, user: EthAddress) => Promise<{
|
|
65
|
-
spApy: string;
|
|
66
|
-
yBoldApy: string;
|
|
67
|
-
totalBoldDepositedSBold: string;
|
|
68
|
-
boldRateSBold: string;
|
|
69
|
-
maxWithdrawSBold: string;
|
|
70
|
-
totalBoldDepositedYBold: string;
|
|
71
|
-
boldRateYBold: string;
|
|
72
|
-
maxWithdrawYBold: string;
|
|
73
|
-
sBoldBalance: string;
|
|
74
|
-
yBoldBalance: string;
|
|
75
|
-
stYBoldBalance: string;
|
|
76
|
-
}>;
|
|
60
|
+
export declare const getLiquityV2Staking: (provider: Client, network: NetworkNumber, market: LiquityV2Versions, user: EthAddress, blockNumber?: Blockish) => Promise<LiquityV2StakingData>;
|
|
61
|
+
export declare const getLiquitySAndYBold: (provider: Client, network: NetworkNumber, markets: any, user: EthAddress, blockNumber?: Blockish) => Promise<LiquityV2SBoldYBoldData>;
|