@1delta/margin-fetcher 5.0.87 → 5.0.89
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/dist/index.d.ts +103 -4
- package/dist/index.js +342 -81
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { parseAbi, keccak256, encodeAbiParameters, formatEther, BaseError, erc20Abi, stringToHex, isAddress, pad, encodeFunctionData, formatUnits, getAddress, decodeFunctionResult, decodeAbiParameters,
|
|
1
|
+
import { parseAbi, keccak256, encodeAbiParameters, formatEther, BaseError, erc20Abi, stringToHex, isAddress, pad, encodeFunctionData, formatUnits, getAddress, decodeFunctionResult, decodeAbiParameters, toBytes, slice, concat, AbiEncodingLengthMismatchError, concatHex, parseAbiParameters, hexToString, InvalidAddressError, boolToHex, integerRegex, numberToHex, bytesRegex, BytesSizeMismatchError, arrayRegex, UnsupportedPackedAbiType } from './chunk-JUYF2XLF.js';
|
|
2
2
|
import './chunk-BYTNVMX7.js';
|
|
3
3
|
import './chunk-PR4QN5HX.js';
|
|
4
4
|
import { Lender, isExactly, isMidnight, isTerm, isTermMax, isTeller, isListaDao, isLiquityFamily, isRiver, isInverse, isCooler, isDssType, isCompoundV3Type, isFluid, isGearboxV3, isLlamaLend, isFrankencoin, isResupply, isCurvance, isFlyingTulip, isTwyne, isFraxlend, isAaveV4Type, LIQUITY_FAMILY_LENDERS, isAaveType, isCompoundV3, isCompoundV2Type, isMultiMarket, isSiloV2Type, isSiloV3Type, isDolomite, isMorphoType, isUsdd, isSky, hasCrossMarginRisk, isEulerType, isInit, isVenusType, isSumerType, AAVE_V3_LENDERS, AAVE_V2_LENDERS, isMorphoBlue, isAaveV2Type, isAaveV32Type, isAaveV3Type, isYLDR, isLista, hasSubAccounts, isTectonicType, isKineticType, isBenqiType } from '@1delta/lender-registry';
|
|
5
5
|
export { hasCrossMarginRisk, isAaveType, isAaveV2Type, isAaveV32Type, isAaveV3Type, isCompoundV3, isCompoundV3Type, isInit, isMorphoType, isMultiMarket, isYLDR } from '@1delta/lender-registry';
|
|
6
|
-
import { fetchTokenLists, fetchTokenList, aavePools, compoundV3Pools, initConfig, morphoPools, compoundV2Pools, eulerVaults, siloMarkets, siloV2LenderKey, siloMarketsV3, siloV3LenderKey, aaveV4Spokes, aaveV4SpokeLenderKey, fluidResolvers, gearboxResolvers, dolomiteConfigs, midnightConfig, termConfig, termMarketsByChain, exactlyConfig, flyingTulipLendersByChain, liquityLendersByChain, riverLendersByChain, inverseLendersByChain, coolerLendersByChain, llamaLendLendersByChain, usddLendersByChain, skyLendersByChain, frankencoinLendersByChain, resupplyLendersByChain, curvanceLendersByChain, fraxlendLendersByChain, twyneLendersByChain, tellerConfigByChain, tellerPoolsByChain, termMaxConfigByChain, aaveReserves, compoundV3Reserves, morphoTypeMarkets, resolveTermApiBase, flyingTulipConfigFor, flyingTulipAssetsFor, liquityConfigFor, liquityBranchesByChain, riverConfigFor, riverChainData, termMaxApiBaseUrl, termMaxLenderKey, inverseConfigFor, inverseChainData, coolerConfigFor, llamaLendConfigFor, llamaLendChainData, llamaLendApiBaseUrl, resupplyConfigFor, fraxlendConfigFor, dssConfigFor, dssChainData, dssDebtToken, dssDebtJoin, frankencoinConfigFor, frankencoinChainData, aaveOracles, resolveMidnightApiBase, llamaLendMarketByVault, getSiloV2MarketEntry, getSiloV3MarketEntry, dolomiteEmode, curvanceConfigFor, aaveTokens, morphoTypeVaults, listaCollateralProvider, eulerConfigs, gearboxMarketCompressor, gearboxMarketConfigurators, compoundV2TokenArray, gearboxV3LenderKey, midnightMarketsByChain, twyneConfigFor, twyneChainData, midnightCollateralRef, parseAaveV4SpokeLenderKey, fraxlendPairsFor, gearboxAccountCompressor, compoundV2Tokens, exactlyMarketsByChain, aaveOraclesConfig, compoundV2Oracles, compoundV2OraclesConfig, compoundV3OraclesData, compoundV3BaseData, compoundV2Reserves, aaveV4Oracles, morphoTypeOracles } from '@1delta/data-sdk';
|
|
6
|
+
import { fetchTokenLists, fetchTokenList, aavePools, compoundV3Pools, initConfig, morphoPools, compoundV2Pools, eulerVaults, siloMarkets, siloV2LenderKey, siloMarketsV3, siloV3LenderKey, aaveV4Spokes, aaveV4SpokeLenderKey, fluidResolvers, gearboxResolvers, dolomiteConfigs, midnightConfig, termConfig, termMarketsByChain, exactlyConfig, flyingTulipLendersByChain, liquityLendersByChain, riverLendersByChain, inverseLendersByChain, coolerLendersByChain, llamaLendLendersByChain, usddLendersByChain, skyLendersByChain, frankencoinLendersByChain, resupplyLendersByChain, curvanceLendersByChain, fraxlendLendersByChain, twyneLendersByChain, tellerConfigByChain, tellerPoolsByChain, termMaxConfigByChain, aaveReserves, compoundV3Reserves, dolomiteIsolationMarket, morphoTypeMarkets, resolveTermApiBase, flyingTulipConfigFor, flyingTulipAssetsFor, liquityConfigFor, liquityBranchesByChain, riverConfigFor, riverChainData, termMaxApiBaseUrl, termMaxLenderKey, inverseConfigFor, inverseChainData, coolerConfigFor, llamaLendConfigFor, llamaLendChainData, llamaLendApiBaseUrl, resupplyConfigFor, fraxlendConfigFor, dssConfigFor, dssChainData, dssDebtToken, dssDebtJoin, frankencoinConfigFor, frankencoinChainData, aaveOracles, resolveMidnightApiBase, llamaLendMarketByVault, getSiloV2MarketEntry, getSiloV3MarketEntry, dolomiteEmode, dolomiteIsolation, curvanceConfigFor, aaveTokens, morphoTypeVaults, listaCollateralProvider, eulerConfigs, gearboxMarketCompressor, gearboxMarketConfigurators, compoundV2TokenArray, gearboxV3LenderKey, midnightMarketsByChain, twyneConfigFor, twyneChainData, midnightCollateralRef, parseAaveV4SpokeLenderKey, fraxlendPairsFor, gearboxAccountCompressor, compoundV2Tokens, exactlyMarketsByChain, aaveOraclesConfig, compoundV2Oracles, compoundV2OraclesConfig, compoundV3OraclesData, compoundV3BaseData, compoundV2Reserves, aaveV4Oracles, morphoTypeOracles } from '@1delta/data-sdk';
|
|
7
7
|
import lodash from 'lodash';
|
|
8
8
|
import { Chain, isEvmChainId } from '@1delta/chain-registry';
|
|
9
9
|
import { multicallRetryUniversal, getEvmClient, getEvmChain, createMulticallRetryUniversal, LIST_OVERRIDES, getEvmClientUniversal } from '@1delta/providers';
|
|
@@ -12013,7 +12013,7 @@ function createSumerUserState(payload, lenderData, totalDeposits24h = 0, totalDe
|
|
|
12013
12013
|
// src/lending/user-data/utils/createMultiAccountStyleUserState.ts
|
|
12014
12014
|
function createMultiAccountTypeUserState(payload, lenderData, histData) {
|
|
12015
12015
|
const positionKeys = Object.keys(payload.lendingPositions ?? {});
|
|
12016
|
-
let
|
|
12016
|
+
let marketUids2 = getMarketUidsFromMeta(lenderData);
|
|
12017
12017
|
const { chainId, account } = payload;
|
|
12018
12018
|
let data = [];
|
|
12019
12019
|
for (let j = 0; j < positionKeys.length; j++) {
|
|
@@ -12036,8 +12036,8 @@ function createMultiAccountTypeUserState(payload, lenderData, histData) {
|
|
|
12036
12036
|
let collateral = 0;
|
|
12037
12037
|
let borrowDiscountedCollateral = 0;
|
|
12038
12038
|
let adjustedDebt = 0;
|
|
12039
|
-
for (let i = 0; i <
|
|
12040
|
-
const marketUid =
|
|
12039
|
+
for (let i = 0; i < marketUids2.length; i++) {
|
|
12040
|
+
const marketUid = marketUids2[i];
|
|
12041
12041
|
if (!lenderData?.[marketUid] || !payload.lendingPositions[posId][marketUid])
|
|
12042
12042
|
continue;
|
|
12043
12043
|
const pos = payload.lendingPositions[posId][marketUid];
|
|
@@ -12093,8 +12093,8 @@ function createMultiAccountTypeUserState(payload, lenderData, histData) {
|
|
|
12093
12093
|
rewards: {}
|
|
12094
12094
|
};
|
|
12095
12095
|
const creditLine = Math.max(0, borrowDiscountedCollateral - adjustedDebt);
|
|
12096
|
-
for (let i = 0; i <
|
|
12097
|
-
const marketUid =
|
|
12096
|
+
for (let i = 0; i < marketUids2.length; i++) {
|
|
12097
|
+
const marketUid = marketUids2[i];
|
|
12098
12098
|
if (!lenderData?.[marketUid]) continue;
|
|
12099
12099
|
const { configs, flags, borrowLiquidity, withdrawLiquidity } = lenderData[marketUid];
|
|
12100
12100
|
const config = resolveModeConfig(configs, mode);
|
|
@@ -20598,7 +20598,10 @@ var DOLOMITE_MARKET_FNS = [
|
|
|
20598
20598
|
"getMarketMarginPremium",
|
|
20599
20599
|
"getMarketInterestRate"
|
|
20600
20600
|
];
|
|
20601
|
-
var DOLOMITE_GLOBAL_FNS = [
|
|
20601
|
+
var DOLOMITE_GLOBAL_FNS = [
|
|
20602
|
+
"getMarginRatio",
|
|
20603
|
+
"getEarningsRate"
|
|
20604
|
+
];
|
|
20602
20605
|
var buildDolomiteCall = (chainId, _lender) => {
|
|
20603
20606
|
const margin = dolomiteConfigs()?.[chainId]?.dolomiteMargin;
|
|
20604
20607
|
const marketIds = getDolomiteMarketIds(chainId);
|
|
@@ -20624,24 +20627,68 @@ var dolomiteFactors = (p, R) => ({
|
|
|
20624
20627
|
borrowCollateralFactor: 1 / ((1 + R) * (1 + p)),
|
|
20625
20628
|
borrowFactor: 1 + p
|
|
20626
20629
|
});
|
|
20627
|
-
|
|
20630
|
+
var DOLOMITE_ISOLATION_MODE_PREFIX = "iso:";
|
|
20631
|
+
var dolomiteIsolationMode = (marketId) => `${DOLOMITE_ISOLATION_MODE_PREFIX}${marketId}`;
|
|
20632
|
+
var DISABLED = {
|
|
20633
|
+
collateralFactor: 0,
|
|
20634
|
+
borrowCollateralFactor: 0,
|
|
20635
|
+
borrowFactor: DISABLED_BORROW_FACTOR,
|
|
20636
|
+
debtDisabled: true,
|
|
20637
|
+
collateralDisabled: true,
|
|
20638
|
+
liquidationPenalty: 0,
|
|
20639
|
+
closeFactor: 1
|
|
20640
|
+
};
|
|
20641
|
+
function buildDolomiteConfigs(marketId, marginPremium, R, isClosing, emode, isolation) {
|
|
20628
20642
|
const borrowOnly = emode?.riskFeatures?.[marketId]?.feature === "BORROW_ONLY";
|
|
20643
|
+
const isReceipt = !!isolation?.[marketId];
|
|
20629
20644
|
const base = dolomiteFactors(marginPremium, R);
|
|
20630
20645
|
const configs = {
|
|
20631
20646
|
["0"]: {
|
|
20632
20647
|
category: "0",
|
|
20633
20648
|
label: "Cross-margin",
|
|
20634
20649
|
...base,
|
|
20635
|
-
debtDisabled: isClosing,
|
|
20636
|
-
collateralDisabled: borrowOnly,
|
|
20650
|
+
debtDisabled: isClosing || isReceipt,
|
|
20651
|
+
collateralDisabled: borrowOnly || isReceipt,
|
|
20637
20652
|
liquidationPenalty: BASE_LIQUIDATION_PENALTY,
|
|
20638
20653
|
closeFactor: 1
|
|
20639
20654
|
}
|
|
20640
20655
|
};
|
|
20656
|
+
for (const [isoId, vault] of Object.entries(isolation ?? {})) {
|
|
20657
|
+
const mode = dolomiteIsolationMode(isoId);
|
|
20658
|
+
const label = `Isolation: ${vault.underlyingSymbol || isoId}`;
|
|
20659
|
+
if (isoId === marketId) {
|
|
20660
|
+
configs[mode] = {
|
|
20661
|
+
category: mode,
|
|
20662
|
+
label,
|
|
20663
|
+
...base,
|
|
20664
|
+
debtDisabled: true,
|
|
20665
|
+
// a receipt is never borrowable
|
|
20666
|
+
collateralDisabled: false,
|
|
20667
|
+
liquidationPenalty: BASE_LIQUIDATION_PENALTY,
|
|
20668
|
+
closeFactor: 1
|
|
20669
|
+
};
|
|
20670
|
+
continue;
|
|
20671
|
+
}
|
|
20672
|
+
const debtAllowed = vault.allowableDebtMarketIds.length === 0 || vault.allowableDebtMarketIds.includes(marketId);
|
|
20673
|
+
const collateralAllowed = vault.allowableCollateralMarketIds.length === 0 || vault.allowableCollateralMarketIds.includes(marketId);
|
|
20674
|
+
if (isReceipt || !debtAllowed && !collateralAllowed) {
|
|
20675
|
+
configs[mode] = { category: mode, label, ...DISABLED };
|
|
20676
|
+
continue;
|
|
20677
|
+
}
|
|
20678
|
+
configs[mode] = {
|
|
20679
|
+
category: mode,
|
|
20680
|
+
label,
|
|
20681
|
+
...base,
|
|
20682
|
+
debtDisabled: isClosing || !debtAllowed,
|
|
20683
|
+
collateralDisabled: borrowOnly || !collateralAllowed,
|
|
20684
|
+
liquidationPenalty: BASE_LIQUIDATION_PENALTY,
|
|
20685
|
+
closeFactor: 1
|
|
20686
|
+
};
|
|
20687
|
+
}
|
|
20641
20688
|
if (!emode?.categories) return configs;
|
|
20642
20689
|
const marketCategory = emode.marketCategories?.[marketId];
|
|
20643
20690
|
for (const [cat, param] of Object.entries(emode.categories)) {
|
|
20644
|
-
if (marketCategory === cat) {
|
|
20691
|
+
if (marketCategory === cat && !isReceipt) {
|
|
20645
20692
|
const f = dolomiteFactors(0, param.marginRatioOverride);
|
|
20646
20693
|
configs[cat] = {
|
|
20647
20694
|
category: cat,
|
|
@@ -20668,7 +20715,9 @@ function buildDolomiteConfigs(marketId, marginPremium, R, isClosing, emode) {
|
|
|
20668
20715
|
}
|
|
20669
20716
|
return configs;
|
|
20670
20717
|
}
|
|
20671
|
-
function resolveDolomiteMode(heldMarketIds, emode) {
|
|
20718
|
+
function resolveDolomiteMode(heldMarketIds, emode, isolationMarketId) {
|
|
20719
|
+
if (isolationMarketId !== void 0)
|
|
20720
|
+
return dolomiteIsolationMode(isolationMarketId);
|
|
20672
20721
|
if (!emode?.marketCategories || heldMarketIds.length === 0) return "0";
|
|
20673
20722
|
const cats = /* @__PURE__ */ new Set();
|
|
20674
20723
|
for (const m of heldMarketIds) {
|
|
@@ -20678,6 +20727,59 @@ function resolveDolomiteMode(heldMarketIds, emode) {
|
|
|
20678
20727
|
}
|
|
20679
20728
|
return cats.size === 1 ? [...cats][0] : "0";
|
|
20680
20729
|
}
|
|
20730
|
+
var marketUids = (chainId, lender, ids) => ids.map((id) => createMarketUid(chainId, lender, String(id)));
|
|
20731
|
+
function resolveDolomiteRowIdentity(chainId, lender, marketId, token, tokenList = {}) {
|
|
20732
|
+
const lower4 = token.toLowerCase();
|
|
20733
|
+
const meta = tokenList[lower4];
|
|
20734
|
+
const table = dolomiteIsolationMarket(
|
|
20735
|
+
chainId,
|
|
20736
|
+
marketId
|
|
20737
|
+
);
|
|
20738
|
+
const receiptUnderlying = meta?.props?.receipt?.protocol === "dolomite-isolation" ? meta.props.receipt.underlying?.toLowerCase() : void 0;
|
|
20739
|
+
const underlying = table?.underlying?.toLowerCase() ?? receiptUnderlying;
|
|
20740
|
+
if (!underlying) {
|
|
20741
|
+
return {
|
|
20742
|
+
name: lenderShortName(lender) + " " + (meta?.symbol ?? ""),
|
|
20743
|
+
asset: meta,
|
|
20744
|
+
yieldKey: toOracleKey(meta?.assetGroup ?? null)
|
|
20745
|
+
};
|
|
20746
|
+
}
|
|
20747
|
+
const underlyingMeta = tokenList[underlying];
|
|
20748
|
+
const symbol = meta?.symbol ?? (underlyingMeta?.symbol ? "d" + underlyingMeta.symbol : table?.underlyingSymbol ? "d" + table.underlyingSymbol : "");
|
|
20749
|
+
const asset = meta && !meta.logoURI && underlyingMeta?.logoURI ? { ...meta, logoURI: underlyingMeta.logoURI } : meta;
|
|
20750
|
+
const isolation = table ? {
|
|
20751
|
+
factory: table.factory,
|
|
20752
|
+
underlying,
|
|
20753
|
+
underlyingSymbol: table.underlyingSymbol,
|
|
20754
|
+
underlyingDecimals: table.underlyingDecimals,
|
|
20755
|
+
allowedDebtMarketUids: table.allowableDebtMarketIds.length > 0 ? marketUids(chainId, lender, table.allowableDebtMarketIds) : void 0,
|
|
20756
|
+
allowedCollateralMarketUids: table.allowableCollateralMarketIds.length > 0 ? marketUids(chainId, lender, table.allowableCollateralMarketIds) : void 0,
|
|
20757
|
+
wrapper: table.wrapper,
|
|
20758
|
+
unwrapper: table.unwrapper,
|
|
20759
|
+
wrapperInputMarketUids: marketUids(
|
|
20760
|
+
chainId,
|
|
20761
|
+
lender,
|
|
20762
|
+
table.wrapperInputMarketIds
|
|
20763
|
+
),
|
|
20764
|
+
unwrapperOutputMarketUids: marketUids(
|
|
20765
|
+
chainId,
|
|
20766
|
+
lender,
|
|
20767
|
+
table.unwrapperOutputMarketIds
|
|
20768
|
+
),
|
|
20769
|
+
async: table.async,
|
|
20770
|
+
executionFeeWei: table.executionFeeWei
|
|
20771
|
+
} : void 0;
|
|
20772
|
+
return {
|
|
20773
|
+
name: lenderShortName(lender) + " " + symbol,
|
|
20774
|
+
asset,
|
|
20775
|
+
// The underlying's group; fall back to the dToken's own group only when
|
|
20776
|
+
// the underlying is unlisted (then nothing is keyed on it anyway).
|
|
20777
|
+
yieldKey: toOracleKey(
|
|
20778
|
+
underlyingMeta?.assetGroup ?? meta?.assetGroup ?? null
|
|
20779
|
+
),
|
|
20780
|
+
isolation
|
|
20781
|
+
};
|
|
20782
|
+
}
|
|
20681
20783
|
|
|
20682
20784
|
// src/lending/public-data/dolomite/publicCallParse.ts
|
|
20683
20785
|
var BASE = 10n ** 18n;
|
|
@@ -20701,6 +20803,7 @@ var getDolomitePublicDataConverter = (lender, chainId, _prices, additionalYields
|
|
|
20701
20803
|
const R = Number(parseRawAmount(toBig(data[0]?.value), 18));
|
|
20702
20804
|
const earningsRate = Number(parseRawAmount(toBig(data[1]?.value), 18));
|
|
20703
20805
|
const emode = dolomiteEmode()?.[chainId];
|
|
20806
|
+
const isolation = dolomiteIsolation()?.[chainId];
|
|
20704
20807
|
const result = {};
|
|
20705
20808
|
marketIds.forEach((marketId, m) => {
|
|
20706
20809
|
const base = GLOBAL_COUNT + MARKET_STRIDE * m;
|
|
@@ -20732,15 +20835,29 @@ var getDolomitePublicDataConverter = (lender, chainId, _prices, additionalYields
|
|
|
20732
20835
|
parseRawAmount(toBig(data[base + 5 /* marginPremium */]?.value), 18)
|
|
20733
20836
|
);
|
|
20734
20837
|
const isClosing = Boolean(data[base + 1 /* isClosing */]);
|
|
20735
|
-
const config = buildDolomiteConfigs(
|
|
20838
|
+
const config = buildDolomiteConfigs(
|
|
20839
|
+
marketId,
|
|
20840
|
+
p,
|
|
20841
|
+
R,
|
|
20842
|
+
isClosing,
|
|
20843
|
+
emode,
|
|
20844
|
+
isolation
|
|
20845
|
+
);
|
|
20736
20846
|
const liquidity = Number(totalDeposits) - Number(totalDebt);
|
|
20737
20847
|
const marketUid = createMarketUid(chainId, lender, String(marketId));
|
|
20848
|
+
const identity = resolveDolomiteRowIdentity(
|
|
20849
|
+
chainId,
|
|
20850
|
+
lender,
|
|
20851
|
+
marketId,
|
|
20852
|
+
underlying,
|
|
20853
|
+
tokenList
|
|
20854
|
+
);
|
|
20738
20855
|
result[marketUid] = {
|
|
20739
20856
|
marketUid,
|
|
20740
|
-
name:
|
|
20857
|
+
name: identity.name,
|
|
20741
20858
|
poolId: underlying,
|
|
20742
20859
|
underlying,
|
|
20743
|
-
asset:
|
|
20860
|
+
asset: identity.asset,
|
|
20744
20861
|
marketId,
|
|
20745
20862
|
totalDeposits,
|
|
20746
20863
|
totalDebt,
|
|
@@ -20756,7 +20873,9 @@ var getDolomitePublicDataConverter = (lender, chainId, _prices, additionalYields
|
|
|
20756
20873
|
variableBorrowRate,
|
|
20757
20874
|
stableBorrowRate: 0,
|
|
20758
20875
|
collateralActive: true,
|
|
20759
|
-
|
|
20876
|
+
// By ASSET GROUP (the map's key), the underlying's for an isolation
|
|
20877
|
+
// market — see `isolation.ts`.
|
|
20878
|
+
intrinsicYield: additionalYields?.intrinsicYields?.[identity.yieldKey] ?? 0,
|
|
20760
20879
|
rewards: [],
|
|
20761
20880
|
config,
|
|
20762
20881
|
closeFactor: 1,
|
|
@@ -20772,7 +20891,11 @@ var getDolomitePublicDataConverter = (lender, chainId, _prices, additionalYields
|
|
|
20772
20891
|
// and the term sheet then printed a red "Currently unavailable" over
|
|
20773
20892
|
// the collateral leg of a loop that builds and executes fine. The
|
|
20774
20893
|
// borrow half is already carried correctly by `config[*].debtDisabled`.
|
|
20775
|
-
depositsEnabled: true
|
|
20894
|
+
depositsEnabled: true,
|
|
20895
|
+
...identity.isolation && {
|
|
20896
|
+
isolation: identity.isolation,
|
|
20897
|
+
allowedDebtMarketUids: identity.isolation.allowedDebtMarketUids
|
|
20898
|
+
}
|
|
20776
20899
|
};
|
|
20777
20900
|
});
|
|
20778
20901
|
return { data: result, chainId };
|
|
@@ -29528,6 +29651,7 @@ async function fetchDolomiteMarketsFromSubgraph(chainId) {
|
|
|
29528
29651
|
function convertDolomiteSubgraphMarkets(raw, chainId, prices, additionalYields, tokenList = {}) {
|
|
29529
29652
|
const R = raw.liquidationRatio > 0 ? raw.liquidationRatio - 1 : 0;
|
|
29530
29653
|
const emode = dolomiteEmode()?.[chainId];
|
|
29654
|
+
const isolation = dolomiteIsolation()?.[chainId];
|
|
29531
29655
|
const result = {};
|
|
29532
29656
|
for (const info of raw.riskInfos) {
|
|
29533
29657
|
const underlying = info.token.id.toLowerCase();
|
|
@@ -29547,15 +29671,27 @@ function convertDolomiteSubgraphMarkets(raw, chainId, prices, additionalYields,
|
|
|
29547
29671
|
p,
|
|
29548
29672
|
R,
|
|
29549
29673
|
isClosing,
|
|
29550
|
-
emode
|
|
29674
|
+
emode,
|
|
29675
|
+
isolation
|
|
29676
|
+
);
|
|
29677
|
+
const marketUid = createMarketUid(
|
|
29678
|
+
chainId,
|
|
29679
|
+
LENDER,
|
|
29680
|
+
String(info.token.marketId)
|
|
29681
|
+
);
|
|
29682
|
+
const identity = resolveDolomiteRowIdentity(
|
|
29683
|
+
chainId,
|
|
29684
|
+
LENDER,
|
|
29685
|
+
info.token.marketId,
|
|
29686
|
+
underlying,
|
|
29687
|
+
tokenList
|
|
29551
29688
|
);
|
|
29552
|
-
const marketUid = createMarketUid(chainId, LENDER, String(info.token.marketId));
|
|
29553
29689
|
result[marketUid] = {
|
|
29554
29690
|
marketUid,
|
|
29555
|
-
name: lenderShortName(LENDER) + " " + (
|
|
29691
|
+
name: meta ? identity.name : lenderShortName(LENDER) + " " + (info.token.symbol ?? ""),
|
|
29556
29692
|
poolId: underlying,
|
|
29557
29693
|
underlying,
|
|
29558
|
-
asset:
|
|
29694
|
+
asset: identity.asset,
|
|
29559
29695
|
marketId: info.token.marketId,
|
|
29560
29696
|
totalDeposits,
|
|
29561
29697
|
totalDebt,
|
|
@@ -29571,14 +29707,22 @@ function convertDolomiteSubgraphMarkets(raw, chainId, prices, additionalYields,
|
|
|
29571
29707
|
variableBorrowRate,
|
|
29572
29708
|
stableBorrowRate: 0,
|
|
29573
29709
|
collateralActive: true,
|
|
29574
|
-
|
|
29710
|
+
// Keyed by ASSET GROUP like every other lender (the map is
|
|
29711
|
+
// `intrinsicYields[assetGroup]`, never by address) — and for an
|
|
29712
|
+
// isolation market by the UNDERLYING's group, since a dGM earns what
|
|
29713
|
+
// its GM earns.
|
|
29714
|
+
intrinsicYield: additionalYields?.intrinsicYields?.[identity.yieldKey] ?? 0,
|
|
29575
29715
|
rewards: [],
|
|
29576
29716
|
config,
|
|
29577
29717
|
closeFactor: 1,
|
|
29578
29718
|
borrowingEnabled: !isClosing,
|
|
29579
29719
|
// Deposits are NOT gated by this flag — see the note in `publicCallParse`.
|
|
29580
29720
|
// The subgraph names it `isBorrowingDisabled`, which says so outright.
|
|
29581
|
-
depositsEnabled: true
|
|
29721
|
+
depositsEnabled: true,
|
|
29722
|
+
...identity.isolation && {
|
|
29723
|
+
isolation: identity.isolation,
|
|
29724
|
+
allowedDebtMarketUids: identity.isolation.allowedDebtMarketUids
|
|
29725
|
+
}
|
|
29582
29726
|
};
|
|
29583
29727
|
}
|
|
29584
29728
|
return { data: result, chainId };
|
|
@@ -31223,30 +31367,68 @@ var buildGearboxV3UserCall = (chainId, _lender, account) => {
|
|
|
31223
31367
|
};
|
|
31224
31368
|
var SUBGRAPH_CACHE_TTL_MS = 3e4;
|
|
31225
31369
|
var SUBGRAPH_TIMEOUT_MS2 = 1e4;
|
|
31370
|
+
var DOLOMITE_ISO_ID_PREFIX = "iso:";
|
|
31371
|
+
function parseDolomiteSubAccountId(id) {
|
|
31372
|
+
if (id.startsWith(DOLOMITE_ISO_ID_PREFIX)) {
|
|
31373
|
+
const [, marketId, number] = id.split(":");
|
|
31374
|
+
return { isolationMarketId: marketId, number };
|
|
31375
|
+
}
|
|
31376
|
+
return { number: id };
|
|
31377
|
+
}
|
|
31378
|
+
function toDolomiteSubAccountId(number, isolationMarketId) {
|
|
31379
|
+
return isolationMarketId ? `${DOLOMITE_ISO_ID_PREFIX}${isolationMarketId}:${number}` : number;
|
|
31380
|
+
}
|
|
31381
|
+
function dolomiteVaultAddress(chainId, marketId, user) {
|
|
31382
|
+
const m = dolomiteIsolationMarket(chainId, marketId);
|
|
31383
|
+
if (!m?.vaultInitCodeHash) return void 0;
|
|
31384
|
+
return getCreate2Address({
|
|
31385
|
+
from: m.factory,
|
|
31386
|
+
salt: keccak256(encodePacked(["address"], [user])),
|
|
31387
|
+
bytecodeHash: m.vaultInitCodeHash
|
|
31388
|
+
}).toLowerCase();
|
|
31389
|
+
}
|
|
31226
31390
|
var subgraphCache = /* @__PURE__ */ new Map();
|
|
31227
|
-
function
|
|
31391
|
+
function fetchDolomiteSubAccounts(chainId, owner) {
|
|
31228
31392
|
const key3 = `${chainId}:${owner.toLowerCase()}`;
|
|
31229
31393
|
const cached = subgraphCache.get(key3);
|
|
31230
31394
|
if (cached) return cached.promise;
|
|
31231
|
-
const promise =
|
|
31232
|
-
const timer = setTimeout(
|
|
31395
|
+
const promise = fetchSubAccountsFromSubgraph(chainId, owner).then((accounts) => withDefault(owner, accounts)).catch(() => withDefault(owner, []));
|
|
31396
|
+
const timer = setTimeout(
|
|
31397
|
+
() => subgraphCache.delete(key3),
|
|
31398
|
+
SUBGRAPH_CACHE_TTL_MS
|
|
31399
|
+
);
|
|
31233
31400
|
subgraphCache.set(key3, { promise, timer });
|
|
31234
31401
|
return promise;
|
|
31235
31402
|
}
|
|
31236
|
-
function
|
|
31237
|
-
const
|
|
31238
|
-
|
|
31239
|
-
|
|
31403
|
+
async function fetchDolomiteAccountNumbers(chainId, owner) {
|
|
31404
|
+
const accounts = await fetchDolomiteSubAccounts(chainId, owner);
|
|
31405
|
+
return accounts.filter((a) => !a.isolationMarketId).map((a) => a.number);
|
|
31406
|
+
}
|
|
31407
|
+
function withDefault(owner, accounts) {
|
|
31408
|
+
const seen = /* @__PURE__ */ new Set();
|
|
31409
|
+
const out = [];
|
|
31410
|
+
const push2 = (a) => {
|
|
31411
|
+
if (seen.has(a.id)) return;
|
|
31412
|
+
seen.add(a.id);
|
|
31413
|
+
out.push(a);
|
|
31414
|
+
};
|
|
31415
|
+
push2({ id: "0", owner, number: "0" });
|
|
31416
|
+
accounts.forEach(push2);
|
|
31417
|
+
return out;
|
|
31240
31418
|
}
|
|
31241
|
-
async function
|
|
31419
|
+
async function fetchSubAccountsFromSubgraph(chainId, owner) {
|
|
31242
31420
|
const url = DOLOMITE_SUBGRAPH_URLS[chainId];
|
|
31243
|
-
if (!url) return [
|
|
31421
|
+
if (!url) return [];
|
|
31244
31422
|
const query3 = `{
|
|
31245
31423
|
marginAccounts(
|
|
31246
31424
|
first: 1000
|
|
31247
|
-
where: {
|
|
31425
|
+
where: { and: [
|
|
31426
|
+
{ effectiveUser: "${owner.toLowerCase()}" },
|
|
31427
|
+
{ or: [{ hasSupplyValue: true }, { hasBorrowValue: true }] }
|
|
31428
|
+
] }
|
|
31248
31429
|
) {
|
|
31249
31430
|
accountNumber
|
|
31431
|
+
user { id isolationModeVault { marketId } }
|
|
31250
31432
|
}
|
|
31251
31433
|
}`;
|
|
31252
31434
|
const controller = new AbortController();
|
|
@@ -31258,21 +31440,67 @@ async function fetchAccountNumbersFromSubgraph(chainId, owner) {
|
|
|
31258
31440
|
body: JSON.stringify({ query: query3 }),
|
|
31259
31441
|
signal: controller.signal
|
|
31260
31442
|
});
|
|
31261
|
-
if (!response.ok)
|
|
31443
|
+
if (!response.ok) {
|
|
31444
|
+
console.warn(
|
|
31445
|
+
`[dolomite] sub-account query for ${owner} on chain ${chainId} answered HTTP ${response.status}; serving the default account only`
|
|
31446
|
+
);
|
|
31447
|
+
return [];
|
|
31448
|
+
}
|
|
31262
31449
|
const data = await response.json();
|
|
31450
|
+
if (data?.errors?.length) {
|
|
31451
|
+
console.warn(
|
|
31452
|
+
`[dolomite] sub-account query for ${owner} on chain ${chainId} rejected: ${data.errors.map((e) => e.message).join("; ")}; serving the default account only`
|
|
31453
|
+
);
|
|
31454
|
+
return [];
|
|
31455
|
+
}
|
|
31263
31456
|
const accounts = data?.data?.marginAccounts;
|
|
31264
|
-
if (!accounts || accounts.length === 0) return [
|
|
31265
|
-
|
|
31457
|
+
if (!accounts || accounts.length === 0) return [];
|
|
31458
|
+
const lowerOwner = owner.toLowerCase();
|
|
31459
|
+
return accounts.map((a) => {
|
|
31460
|
+
const number = String(a.accountNumber);
|
|
31461
|
+
const accountOwner = a.user.id.toLowerCase();
|
|
31462
|
+
const isolationMarketId = accountOwner !== lowerOwner ? a.user.isolationModeVault?.marketId : void 0;
|
|
31463
|
+
return {
|
|
31464
|
+
id: toDolomiteSubAccountId(number, isolationMarketId),
|
|
31465
|
+
owner: accountOwner,
|
|
31466
|
+
number,
|
|
31467
|
+
isolationMarketId
|
|
31468
|
+
};
|
|
31469
|
+
});
|
|
31266
31470
|
} finally {
|
|
31267
31471
|
clearTimeout(timeout);
|
|
31268
31472
|
}
|
|
31269
31473
|
}
|
|
31270
31474
|
var RESOLVED_STORE_TTL_MS2 = 6e4;
|
|
31271
31475
|
var resolvedStore = /* @__PURE__ */ new Map();
|
|
31476
|
+
function toSubAccount(chainId, account, id) {
|
|
31477
|
+
const parsed = parseDolomiteSubAccountId(id);
|
|
31478
|
+
if (parsed.isolationMarketId === void 0) {
|
|
31479
|
+
return [{ id, owner: account, number: parsed.number }];
|
|
31480
|
+
}
|
|
31481
|
+
const vault = dolomiteVaultAddress(chainId, parsed.isolationMarketId, account);
|
|
31482
|
+
if (!vault) {
|
|
31483
|
+
console.warn(
|
|
31484
|
+
`[dolomite] cannot derive the vault for position ${id} on chain ${chainId} (no isolation table / init-code hash); skipped`
|
|
31485
|
+
);
|
|
31486
|
+
return [];
|
|
31487
|
+
}
|
|
31488
|
+
return [
|
|
31489
|
+
{
|
|
31490
|
+
id: toDolomiteSubAccountId(parsed.number, parsed.isolationMarketId),
|
|
31491
|
+
owner: vault,
|
|
31492
|
+
number: parsed.number,
|
|
31493
|
+
isolationMarketId: parsed.isolationMarketId
|
|
31494
|
+
}
|
|
31495
|
+
];
|
|
31496
|
+
}
|
|
31497
|
+
function getResolvedDolomiteSubAccounts(chainId, account) {
|
|
31498
|
+
return resolvedStore.get(`${chainId}:${account.toLowerCase()}`)?.accounts;
|
|
31499
|
+
}
|
|
31272
31500
|
function getResolvedDolomiteAccountNumbers(chainId, account) {
|
|
31273
|
-
return
|
|
31501
|
+
return getResolvedDolomiteSubAccounts(chainId, account)?.map((a) => a.id);
|
|
31274
31502
|
}
|
|
31275
|
-
function
|
|
31503
|
+
function storeResolved(chainId, account, accounts) {
|
|
31276
31504
|
const key3 = `${chainId}:${account.toLowerCase()}`;
|
|
31277
31505
|
const existing = resolvedStore.get(key3);
|
|
31278
31506
|
if (existing) clearTimeout(existing.timer);
|
|
@@ -31280,17 +31508,20 @@ function storeResolvedNumbers(chainId, account, numbers) {
|
|
|
31280
31508
|
() => resolvedStore.delete(key3),
|
|
31281
31509
|
RESOLVED_STORE_TTL_MS2
|
|
31282
31510
|
);
|
|
31283
|
-
resolvedStore.set(key3, {
|
|
31511
|
+
resolvedStore.set(key3, { accounts, timer });
|
|
31284
31512
|
}
|
|
31285
31513
|
var buildDolomiteUserCall = async (chainId, _lender, account, accountNumbers) => {
|
|
31286
31514
|
const margin = dolomiteConfigs()?.[chainId]?.dolomiteMargin;
|
|
31287
31515
|
if (!margin) return [];
|
|
31288
|
-
const
|
|
31289
|
-
|
|
31290
|
-
|
|
31516
|
+
const accounts = accountNumbers ? withDefault(
|
|
31517
|
+
account,
|
|
31518
|
+
accountNumbers.flatMap((id) => toSubAccount(chainId, account, id))
|
|
31519
|
+
) : await fetchDolomiteSubAccounts(chainId, account);
|
|
31520
|
+
storeResolved(chainId, account, accounts);
|
|
31521
|
+
return accounts.map(({ owner, number }) => ({
|
|
31291
31522
|
address: margin,
|
|
31292
31523
|
name: "getAccountBalances",
|
|
31293
|
-
params: [{ owner
|
|
31524
|
+
params: [{ owner, number }]
|
|
31294
31525
|
}));
|
|
31295
31526
|
};
|
|
31296
31527
|
var midnightMarketCallCount = (collateralCount) => 2 + collateralCount;
|
|
@@ -33961,7 +34192,7 @@ function createMorphoEntryFromMarketWithLens(balanceInfo, metaMap, chainId, lend
|
|
|
33961
34192
|
// src/lending/user-data/utils/createEulerMultiAccountTypeUserState.ts
|
|
33962
34193
|
function createEulerMultiAccountTypeUserState(payload, lenderData, histData) {
|
|
33963
34194
|
const subAccountIndexes = Object.keys(payload.lendingPositions ?? {});
|
|
33964
|
-
const
|
|
34195
|
+
const marketUids2 = getMarketUidsFromMeta(lenderData);
|
|
33965
34196
|
const { chainId, account } = payload;
|
|
33966
34197
|
const data = [];
|
|
33967
34198
|
for (let j = 0; j < subAccountIndexes.length; j++) {
|
|
@@ -33984,8 +34215,8 @@ function createEulerMultiAccountTypeUserState(payload, lenderData, histData) {
|
|
|
33984
34215
|
let collateral = 0;
|
|
33985
34216
|
let borrowDiscountedCollateral = 0;
|
|
33986
34217
|
let adjustedDebt = 0;
|
|
33987
|
-
for (let i = 0; i <
|
|
33988
|
-
const marketUid =
|
|
34218
|
+
for (let i = 0; i < marketUids2.length; i++) {
|
|
34219
|
+
const marketUid = marketUids2[i];
|
|
33989
34220
|
if (!lenderData?.[marketUid] || !payload.lendingPositions[subAccountIndex][marketUid])
|
|
33990
34221
|
continue;
|
|
33991
34222
|
const pos = payload.lendingPositions[subAccountIndex][marketUid];
|
|
@@ -34044,8 +34275,8 @@ function createEulerMultiAccountTypeUserState(payload, lenderData, histData) {
|
|
|
34044
34275
|
rewards: {}
|
|
34045
34276
|
};
|
|
34046
34277
|
const creditLine = Math.max(0, borrowDiscountedCollateral - adjustedDebt);
|
|
34047
|
-
for (let i = 0; i <
|
|
34048
|
-
const marketUid =
|
|
34278
|
+
for (let i = 0; i < marketUids2.length; i++) {
|
|
34279
|
+
const marketUid = marketUids2[i];
|
|
34049
34280
|
if (!lenderData?.[marketUid]) continue;
|
|
34050
34281
|
const { configs, flags, borrowLiquidity, withdrawLiquidity } = lenderData[marketUid];
|
|
34051
34282
|
const config = configs?.[configKey];
|
|
@@ -35107,8 +35338,10 @@ var getGearboxV3UserDataConverter = (_lender, chainId, account, meta) => {
|
|
|
35107
35338
|
];
|
|
35108
35339
|
};
|
|
35109
35340
|
var getDolomiteUserDataConverter = (lender, chainId, account, metaMap) => {
|
|
35110
|
-
const
|
|
35111
|
-
|
|
35341
|
+
const subAccounts = getResolvedDolomiteSubAccounts(chainId, account) ?? [
|
|
35342
|
+
{ id: "0", owner: account, number: "0" }
|
|
35343
|
+
];
|
|
35344
|
+
const expectedNumberOfCalls = subAccounts.length;
|
|
35112
35345
|
const emode = dolomiteEmode()?.[chainId];
|
|
35113
35346
|
return [
|
|
35114
35347
|
(_data) => {
|
|
@@ -35118,7 +35351,7 @@ var getDolomiteUserDataConverter = (lender, chainId, account, metaMap) => {
|
|
|
35118
35351
|
const modes = {};
|
|
35119
35352
|
_data.forEach((res, i) => {
|
|
35120
35353
|
if (isFailedCall(res)) return;
|
|
35121
|
-
const id =
|
|
35354
|
+
const id = subAccounts[i].id;
|
|
35122
35355
|
histData[id] = { totalDebt24h: 0, totalDeposits24h: 0 };
|
|
35123
35356
|
lendingPositions[id] = {};
|
|
35124
35357
|
const marketIds = res?.[0 /* markets */] ?? [];
|
|
@@ -35127,7 +35360,8 @@ var getDolomiteUserDataConverter = (lender, chainId, account, metaMap) => {
|
|
|
35127
35360
|
const pars = res?.[2 /* pars */] ?? [];
|
|
35128
35361
|
modes[id] = resolveDolomiteMode(
|
|
35129
35362
|
marketIds.map((m) => String(m)),
|
|
35130
|
-
emode
|
|
35363
|
+
emode,
|
|
35364
|
+
subAccounts[i].isolationMarketId
|
|
35131
35365
|
);
|
|
35132
35366
|
tokens.forEach((token, k) => {
|
|
35133
35367
|
const wei = weis[k];
|
|
@@ -51392,20 +51626,19 @@ var stEurGroup = {
|
|
|
51392
51626
|
chains: {
|
|
51393
51627
|
"1": {
|
|
51394
51628
|
address: "0x004626a008b1acdc4c74ab51644093b155e59a23",
|
|
51395
|
-
underlying: "
|
|
51629
|
+
underlying: "0x1a7e4e63778b4f12a199c062f3efdd288afcbce8"
|
|
51396
51630
|
},
|
|
51397
51631
|
"42161": {
|
|
51398
51632
|
address: "0x004626a008b1acdc4c74ab51644093b155e59a23",
|
|
51399
|
-
underlying: "
|
|
51633
|
+
underlying: "0xfa5ed56a203466cbbc2430a43c66b9d8723528e7"
|
|
51400
51634
|
},
|
|
51401
|
-
// Gnosis — `0x1aBa…` EURA exists on chain 100 per Angle docs.
|
|
51402
51635
|
"100": {
|
|
51403
51636
|
address: "0x004626a008b1acdc4c74ab51644093b155e59a23",
|
|
51404
|
-
underlying: "
|
|
51637
|
+
underlying: "0x4b1e2c2762667331bc91648052f646d1b0d35984"
|
|
51405
51638
|
},
|
|
51406
51639
|
"59144": {
|
|
51407
51640
|
address: "0x004626a008b1acdc4c74ab51644093b155e59a23",
|
|
51408
|
-
underlying: "
|
|
51641
|
+
underlying: "0x1a7e4e63778b4f12a199c062f3efdd288afcbce8"
|
|
51409
51642
|
}
|
|
51410
51643
|
}
|
|
51411
51644
|
};
|
|
@@ -52511,7 +52744,12 @@ var SINGLE_CHAIN_ENTRIES = {
|
|
|
52511
52744
|
},
|
|
52512
52745
|
{
|
|
52513
52746
|
address: "0x1202f5c7b4b9e47a1a484e8b270be34dbbc75055",
|
|
52514
|
-
|
|
52747
|
+
// `asset()` is USR itself: wstUSR is a 4626 over USR (deposit USR, get
|
|
52748
|
+
// wstUSR) that holds the rebasing stUSR internally. The row carried
|
|
52749
|
+
// stUSR `0x6c8984bc…` as its underlying until 2026-09-18, which would
|
|
52750
|
+
// have had the generic deposit route pull a token the vault never asks
|
|
52751
|
+
// for.
|
|
52752
|
+
underlying: "0x66a1e37c9b0eaddca17d3662d6c05f4decf3e110",
|
|
52515
52753
|
symbol: "wstUSR",
|
|
52516
52754
|
brand: "Resolv",
|
|
52517
52755
|
description: "USR is Resolv's delta-neutral synthetic dollar (ETH collateral hedged with perpetual shorts; the RLP insurance layer absorbs losses first). stUSR stakes it and rebases; wstUSR is the non-rebasing wrapper. Instant unwrap with no cooldown.",
|
|
@@ -53625,32 +53863,32 @@ var fetchGmxRawData = async (chainId, period, apiUrlOverride) => {
|
|
|
53625
53863
|
};
|
|
53626
53864
|
|
|
53627
53865
|
// src/yields/intrinsic/fetchers/gmx.ts
|
|
53628
|
-
var GMX_CHAIN =
|
|
53629
|
-
var
|
|
53630
|
-
|
|
53631
|
-
|
|
53632
|
-
|
|
53633
|
-
|
|
53634
|
-
|
|
53635
|
-
var glv_wbtc_usdc_address = "0xdf03eed325b82bc1d4db8b49c30ecc9e05104b96";
|
|
53636
|
-
var glv_weth_usdc_address = "0x528a5bac7e746c9a509a1f4f6df58a03d44279f9";
|
|
53866
|
+
var GMX_CHAIN = String(Chain.ARBITRUM_ONE);
|
|
53867
|
+
var LEGACY_KEYS = {
|
|
53868
|
+
"0x70d95587d40a2caf56bd97485ab3eec10bee6336": "GMX Market ETH/USD::GM [WETH-USDC]",
|
|
53869
|
+
"0x47c031236e19d024b42f8ae6780e44a573170703": "GMX Market BTC/USD::GM [WBTC-USDC]",
|
|
53870
|
+
"0xdf03eed325b82bc1d4db8b49c30ecc9e05104b96": "GMX Liquidity Vault [WBTC-USDC]::GLV [WBTC-USDC]",
|
|
53871
|
+
"0x528a5bac7e746c9a509a1f4f6df58a03d44279f9": "GMX Liquidity Vault [WETH-USDC]::GLV [WETH-USDC]"
|
|
53872
|
+
};
|
|
53637
53873
|
var gmxFetcher = {
|
|
53638
53874
|
label: "GMX",
|
|
53639
53875
|
fetch: async () => {
|
|
53640
|
-
const { apy } = await
|
|
53876
|
+
const [{ apy }, lists] = await Promise.all([
|
|
53877
|
+
fetchGmxRawData(GMX_CHAIN, GMX_DEFAULT_APY_PERIOD),
|
|
53878
|
+
getListsMulti([GMX_CHAIN]).catch(() => ({}))
|
|
53879
|
+
]);
|
|
53880
|
+
const list = lists?.[GMX_CHAIN]?.list ?? {};
|
|
53641
53881
|
const rData = {};
|
|
53642
|
-
|
|
53643
|
-
const a = addr4.toLowerCase();
|
|
53644
|
-
if (a === gmx_eth_usd_address) rData[gmx_eth_usd] = apyToApr(d.apy) * 100;
|
|
53645
|
-
if (a === gmx_btc_usd_address) rData[gmx_btc_usd] = apyToApr(d.apy) * 100;
|
|
53646
|
-
}
|
|
53647
|
-
for (const [addr4, d] of Object.entries(apy.glvs ?? {})) {
|
|
53882
|
+
const put = (addr4, d) => {
|
|
53648
53883
|
const a = addr4.toLowerCase();
|
|
53649
|
-
|
|
53650
|
-
|
|
53651
|
-
if (
|
|
53652
|
-
|
|
53653
|
-
|
|
53884
|
+
const apr = apyToApr(d.apy) * 100;
|
|
53885
|
+
const group = list[a]?.assetGroup;
|
|
53886
|
+
if (group) rData[group] = apr;
|
|
53887
|
+
const legacy = LEGACY_KEYS[a];
|
|
53888
|
+
if (legacy && legacy !== group) rData[legacy] = apr;
|
|
53889
|
+
};
|
|
53890
|
+
for (const [addr4, d] of Object.entries(apy.markets ?? {})) put(addr4, d);
|
|
53891
|
+
for (const [addr4, d] of Object.entries(apy.glvs ?? {})) put(addr4, d);
|
|
53654
53892
|
return rData;
|
|
53655
53893
|
}
|
|
53656
53894
|
};
|
|
@@ -54275,6 +54513,28 @@ var INTRINSIC_FETCHERS = (() => {
|
|
|
54275
54513
|
return [...seen];
|
|
54276
54514
|
})();
|
|
54277
54515
|
|
|
54516
|
+
// src/yields/intrinsic/receipts.ts
|
|
54517
|
+
var RECEIPT_CHAINS = ["42161", "5000", "80094"];
|
|
54518
|
+
async function propagateReceiptYields(intrinsicYields) {
|
|
54519
|
+
let lists;
|
|
54520
|
+
try {
|
|
54521
|
+
lists = await getListsMulti(RECEIPT_CHAINS);
|
|
54522
|
+
} catch {
|
|
54523
|
+
return;
|
|
54524
|
+
}
|
|
54525
|
+
for (const chainId of RECEIPT_CHAINS) {
|
|
54526
|
+
const list = lists?.[chainId]?.list ?? {};
|
|
54527
|
+
for (const token of Object.values(list)) {
|
|
54528
|
+
const receipt = token?.props?.receipt;
|
|
54529
|
+
if (!receipt?.underlying || !token.assetGroup) continue;
|
|
54530
|
+
if (intrinsicYields[token.assetGroup] !== void 0) continue;
|
|
54531
|
+
const underlying = list[String(receipt.underlying).toLowerCase()];
|
|
54532
|
+
const rate = underlying?.assetGroup ? intrinsicYields[underlying.assetGroup] : void 0;
|
|
54533
|
+
if (rate !== void 0) intrinsicYields[token.assetGroup] = rate;
|
|
54534
|
+
}
|
|
54535
|
+
}
|
|
54536
|
+
}
|
|
54537
|
+
|
|
54278
54538
|
// src/yields/intrinsic/index.ts
|
|
54279
54539
|
async function fetchIntrinsicYields() {
|
|
54280
54540
|
const wstethPromise = safeFetch(wstethFetcher.label, wstethFetcher.fetch);
|
|
@@ -54289,6 +54549,7 @@ async function fetchIntrinsicYields() {
|
|
|
54289
54549
|
for (const result of results) {
|
|
54290
54550
|
if (result) Object.assign(intrinsicYields, result);
|
|
54291
54551
|
}
|
|
54552
|
+
await propagateReceiptYields(intrinsicYields);
|
|
54292
54553
|
return intrinsicYields;
|
|
54293
54554
|
}
|
|
54294
54555
|
|
|
@@ -81239,6 +81500,6 @@ function earnPositionTotals(items) {
|
|
|
81239
81500
|
};
|
|
81240
81501
|
}
|
|
81241
81502
|
|
|
81242
|
-
export { ApiBookSource, DEFAULT_MIDNIGHT_API, DEFAULT_OUTLIER_GUARD, DEFAULT_PROFILE_ID, DEFAULT_STALE_REJECT_SECONDS, DEFAULT_TERMMAX_API, DEFAULT_TERM_ORDER_STORE, EARN_DESCRIPTIONS, EARN_LABELS, EARN_RATE_SOURCE_BY_PROVIDER, EMPTY_BALANCE, EXACTLY_LENDER_KEY, FLYING_TULIP_LENDER_KEY, FRACTION_RATE_PROVIDERS, GMX_API_HOSTS, GMX_READ_CONTRACTS, GMX_SUPPORTED_CHAINS, HYPERCORE_VAULT_REGISTRY, IDLE_MARKET_ID, INTERFACE_IDS, LAGOON_API_URL, LAGOON_CHAIN_IDS, MORPHO_LENS, MULTICALL_FAILURE, MaxParamThresholds, PASSTHROUGH_RATE_EPSILON, PENDLE_ASSETS_URL, PENDLE_CHAIN_IDS, PENDLE_MARKETS_URL, SDK_FRACTION_RATE_PROVIDERS, SPECTRA_NETWORKS, SPECTRA_RATE_MAX_PERCENT, SPECTRA_RATE_MIN_PERCENT, STABLECOIN_SYMBOLS, STCELO_MANAGER_ADDRESS, TELLER_CALLS_PER_BID, DECIMAL_BASE as TERMMAX_DECIMAL_BASE, TERMMAX_LIQUIDATION_PENALTY, TERMMAX_LIQUIDATION_WINDOW_SECS, TERMMAX_LIQUIDATOR_BONUS, TERMMAX_MARKETS_PER_CALL, TERMMAX_PARTIAL_CLOSE_FACTOR, TERMMAX_PARTIAL_LIQUIDATION_THRESHOLD_USD, TERM_ADAPTERS, TERM_PROFILES, TERM_SHEET_SCHEMA_VERSION, TermMaxApiSource, TermSubgraphSource, UPSHIFT_CHAIN_IDS, UPSHIFT_VAULTS_URL, VAULT_PROVIDERS, VAULT_PROVIDER_PROFILE, VAULT_PROVIDER_TRAITS, VAULT_SHARE_PRICE_PROBE, VAULT_VENUE_PREFIX, VOLATILE_VAULT_OVERRIDES, YEARN_CHAIN_IDS, YEARN_YDAEMON_BASE, __resetResupplyUserCaches, accountDepositListKey, accountWithdrawalListKey, appendSnapshot, applyEarnSanity, applyPositionDelta, attachImplications, attachPricesToFlashLiquidity, borrowDescription, borrowFindings, borrowHeadline, buildExposures2 as buildExposures, buildFluidFTokensCall, buildLendingPositionUid, buildLiquityUserCall, buildLoopResult, buildMorphoTypeCall, buildMorphoTypeUserCallWithLens, buildPortfolioTotals, buildSumerAccumulators, buildSummaries, buildTellerUserCall, buildTermMaxUserCall, buildTermSheet, buildTermSheetsForGroup, buildVaultEarnUid, buildVaultLookup, buildVaultTermSheet, calculateLeverage, calculateNetApr, calculateOverallNetApr, calculateWeightedAverage, classifyFreshness, classifyReliability, classifyVault, clearPendleMarketsCache, clearSpectraMarketsCache, collateralSymbolsByVenue, collectFeedObservations, computeBorrowDelta2 as computeBorrowDelta, computeCloseTradeDeltas, computeCollateralSwapDeltas, computeDebtSwapDeltas, computeDepositDelta2 as computeDepositDelta, computeEModeAnalysis, computeOpenTradeDeltas, computePostTradeMetrics, computeRepayDelta2 as computeRepayDelta, computeSumerBorrowDelta, computeSumerDepositDelta, computeSumerRepayDelta, computeSumerWaterfall, computeSumerWithdrawDelta, computeVaultApr, computeWithdrawDelta2 as computeWithdrawDelta, computeZapTradeDeltas, consensusReference, convertCoolerMarketsToResponse, convertDssMarketsToResponse, convertExactlyMarketsToResponse, convertFlyingTulipMarketsToResponse, convertFrankencoinMarketsToResponse, convertFraxlendPairsToResponse, convertInverseMarketsToResponse, convertLenderUserDataResult, convertLiquityMarketsToResponse, convertLlamaLendMarketsToResponse, convertResupplyMarketsToResponse, convertRiverMarketsToResponse, convertTellerMarketsToResponse, convertTermMarketsToResponse, convertTermMaxMarketsToResponse, convertUsddMarketsToResponse, createMarketUid, createMidnightBookSource, createMulticallRpcCall, createRawRpcCalls, createTermBookSource, createTermMaxDataSource, decodeListaMarkets, decodeMarkets, decodePackedListaUserDataset, decodePackedMorphoUserDataset, deriveBorrowTags, deriveSupplyTags, detectInterfaceKinds, dexResolverFor, disambiguateEarnNames, dssIlkBytes32, dssKeyParts, dssLenderKey, duration, earnDescription, earnLabel, earnMarketFromPool, earnMarketFromVault, earnMarketLabel, earnPositionFromLenderEntry, earnPositionFromVaultBalance, earnPositionTotals, earnRateAtMaturity, earnRowSubtitle, earnUidFromMarketUid, earnVaultTerms, earnVenueKind, encodeBalanceFetcherCalldata, enrichTermSheet, enrichmentIndexFromRows, exactlyPairLtv, exactlyPenaltyRateToAprPercent, exactlyWadRateToPercent, feePhrase, feedKeyOf, feedStatKey, fetchCoolerMarkets, fetchDolomiteAccountNumbers, fetchDssMarkets, fetchEulerEarnVaults, fetchEulerEarnVaultsFromSubgraph, fetchEulerSubAccountIndexes, fetchExactlyMarkets, fetchFlashLiquidityForChain, fetchFluidDexState, fetchFluidFTokens, fetchFlyingTulipMarkets, fetchFrankencoinMarkets, fetchFraxlendPairs, fetchGeneralYields, fetchGeneralYieldsByMarketUid, fetchGmxExecutionFees, fetchGmxTickerPrices, fetchGmxVaults, fetchHypercoreVaults, fetchInverseMarkets, fetchLagoonApiVaults, fetchLagoonVaults, fetchLiquityMarkets, fetchListaVaultsFromChain, fetchLlamaLendMarkets, fetchMorphoUserBalances, fetchMorphoUserPositionMarkets, fetchMorphoVaults, fetchMorphoVaultsFromApi, fetchMorphoVaultsFromChain, fetchOraclePrices, fetchPendleApiAssets, fetchPendleApiMarkets, fetchPendlePrices, fetchPendlePtMarkets, fetchResupplyMarkets, fetchRiverMarkets, fetchSiloVaults, fetchSpectraApiMarkets, fetchSpectraPtMarkets, fetchTellerMarkets, fetchTermMarkets, fetchTermMaxMarkets, fetchTermStoreOrders, fetchTokenBalances, fetchTokenMetadata, fetchUpshiftApiVaults, fetchUpshiftVaults, fetchUsddMarkets, fetchYearnApiVaults, fetchYearnVaults, fillableRemaining, filterActiveLenders, filterLendersByProtocol, finalizeInfo, findingsFor, formatRaw, frankencoinKeyParts, frankencoinLenderKey, fraxlendAssetPerCollateral, fraxlendKeyParts, fraxlendLenderKey, fuseLenderData, generateLendingPools, getAavesForChain, getAssetConfig, getBalanceForMarketUid, getBorrowCapacity, getCachedFluidDexState, getCachedLiquityTroves, getCachedTellerBids, getCachedTermMaxDiscovery, getCachedTermMaxMarket, getCachedTermMaxMarkets, getCoreValidators, getFluidFTokensConverter, getGmxApiHost, getGmxReadContracts, getGmxUserPositions, getHealthFactor, getHypercoreUserPositions, getHypercoreVaultRegistry, getLenderAssets, getLenderPublicData, getLenderPublicDataAll, getLenderPublicDataViaApi, getLenderUserDataMulti, getLenderUserDataResult, getLendersForChain, getLstDelegation, getLstValidators, getLstWithdrawalRegistry, getLstWithdrawalRequests, getMaxAmountClose, getMaxAmountCollateralSwap, getMaxAmountDebtSwap, getMaxAmountOpen, getMergedUserData, getMorphoTypeMarketConverter, getReadFailurePolicy, getResolvedDolomiteAccountNumbers, getStCeloValidatorGroups, getSubAccountAddress, getSubAccountIndex, getTermProfile, getVaultPublicDataAll, getVaultWithdrawalRequests, hasCritical, hasEulerEarnVaultSubgraph, hasLagoonVaults, hasMorphoPositionIndex, hasMorphoUserApi, hasMorphoUserSubgraph, hasPendleMarkets, hasSpectraMarkets, hasUpshiftVaults, hasYearnVaults, ilkToKeySegment, implausibleRatePercent, inverseKeyParts, inverseLenderKey, isBoundNeed, isFailedCall, isIlliquid, isLendingPosition, isLiveMarket as isLivePendleMarket, isLiveSpectraMarket, isMaturedTerm, isSecondaryMarketOnly, isStablecoinSymbol, isUnearnableEarnRate, isUnrealizableEarnRate, isVaultPosition, isVaultVenue, isYearnV3, keySegmentToIlk, keysFromMaps, lenderApiOnly, lenderFamily, liquityCandidateTroveIds, liquityKeyParts, liquityLenderKey, llamaLendKeyParts, llamaLendLenderKey, meetsLiquidityFloor, mergeDeep, multicall3Abi2 as multicall3Abi, nanTo, needsLenderApproval, needsTokenApproval, noOpResult, normalizeToBytes, organizeUserQueries, parseBalanceFetcherResult, parseEarnUid, parseMergedResult, parseMulticallRpcResponses, parseExpirySeconds as parsePendleExpirySeconds, parseRawRpcBatchResponses, parseRawRpcResponses, parseCurveFee as parseSpectraCurveFee, parsePtRate as parseSpectraPtRate, parseTermMaxLtv, parseTokenBalanceResult, pct, assetKey as pendleAssetKey, pickPool as pickSpectraPool, positivePart2 as positivePart, predictInverseEscrow, prepareLenderUserDataRpcCalls, prepareMergedMulticallParams, prepareMergedRpcCalls, prepareMulticallInputs, prepareTokenBalanceRpcCalls, priceGlvVaults, priceGmMarkets, probeAaveFeedTimestamps, pruneFeedStats, rankFindings, ratePercent, readVaultSharePrices, rejectOutliers as rejectPriceOutliers, repairImpossibleTvl, resolveAdapter, resolveDerivation, resolveEarnIdentity, resolveModeConfig, resolveStCeloDepositGroup, resolveVaultProfileId, resupplyKeyParts, resupplyLenderKey, resupplyMarketLabel, riverKeyParts, riverLenderKey, sanePercent as saneSpectraPercent, savingsAddresses, savingsBalanceKind, secondaryMarketVault, selectAssetGroupPrices, setMysticApiKey, shortDate, spectraAddress, spectraNetwork, spectraPoolsUrl, splitChainScopedAddress as splitPendleChainScopedAddress, stampCapabilities, stampEarnSubtitles, stampVaultClassification, stampVaultTermSheets, stripLeadingBrand, supplyDescription, supplyFindings, supplyHeadline, swapRoutedProvidersArePriceConsistent, tellerBpsToPercent, tellerImpliedLtv, tellerLenderKey, tellerPoolFromLenderKey, termApiBaseUrl, termLenderKey, termMaxApiBase, borrowNif as termMaxBorrowNif, curveApr as termMaxCurveApr, curveAprNumber as termMaxCurveAprNumber, daysToMaturity as termMaxDaysToMaturity, lendNif as termMaxLendNif, mintGtFeeRatio as termMaxMintGtFeeRatio, ratioToNumber as termMaxRatioToNumber, ratioToPercent as termMaxRatioToPercent, termOfferRateToAprPct, termOrderStoreBaseUrl, tickToAprNumber, tickToPrice, toDigest, toTermFillNow, toTermSheetInput, toVaultTermInput, trancheFromCounterparty, tryParseEarnUid, unflattenLenderData, updateFeedStats, usdValue, usddIlkBytes32, usddKeyParts, usddLenderKey, validateTermSheet, validateTermSheets, validateUserData, vaultSharesToAssets, vaultTermInputFromEarnMarket, vaultTermInputFromSourceRow, vaultTraits, vaultVenue, venueBrand, venueBrandKey, withMaturityLabel, withTrancheLabel };
|
|
81503
|
+
export { ApiBookSource, DEFAULT_MIDNIGHT_API, DEFAULT_OUTLIER_GUARD, DEFAULT_PROFILE_ID, DEFAULT_STALE_REJECT_SECONDS, DEFAULT_TERMMAX_API, DEFAULT_TERM_ORDER_STORE, DOLOMITE_ISO_ID_PREFIX, EARN_DESCRIPTIONS, EARN_LABELS, EARN_RATE_SOURCE_BY_PROVIDER, EMPTY_BALANCE, EXACTLY_LENDER_KEY, FLYING_TULIP_LENDER_KEY, FRACTION_RATE_PROVIDERS, GMX_API_HOSTS, GMX_READ_CONTRACTS, GMX_SUPPORTED_CHAINS, HYPERCORE_VAULT_REGISTRY, IDLE_MARKET_ID, INTERFACE_IDS, LAGOON_API_URL, LAGOON_CHAIN_IDS, MORPHO_LENS, MULTICALL_FAILURE, MaxParamThresholds, PASSTHROUGH_RATE_EPSILON, PENDLE_ASSETS_URL, PENDLE_CHAIN_IDS, PENDLE_MARKETS_URL, SDK_FRACTION_RATE_PROVIDERS, SPECTRA_NETWORKS, SPECTRA_RATE_MAX_PERCENT, SPECTRA_RATE_MIN_PERCENT, STABLECOIN_SYMBOLS, STCELO_MANAGER_ADDRESS, TELLER_CALLS_PER_BID, DECIMAL_BASE as TERMMAX_DECIMAL_BASE, TERMMAX_LIQUIDATION_PENALTY, TERMMAX_LIQUIDATION_WINDOW_SECS, TERMMAX_LIQUIDATOR_BONUS, TERMMAX_MARKETS_PER_CALL, TERMMAX_PARTIAL_CLOSE_FACTOR, TERMMAX_PARTIAL_LIQUIDATION_THRESHOLD_USD, TERM_ADAPTERS, TERM_PROFILES, TERM_SHEET_SCHEMA_VERSION, TermMaxApiSource, TermSubgraphSource, UPSHIFT_CHAIN_IDS, UPSHIFT_VAULTS_URL, VAULT_PROVIDERS, VAULT_PROVIDER_PROFILE, VAULT_PROVIDER_TRAITS, VAULT_SHARE_PRICE_PROBE, VAULT_VENUE_PREFIX, VOLATILE_VAULT_OVERRIDES, YEARN_CHAIN_IDS, YEARN_YDAEMON_BASE, __resetResupplyUserCaches, accountDepositListKey, accountWithdrawalListKey, appendSnapshot, applyEarnSanity, applyPositionDelta, attachImplications, attachPricesToFlashLiquidity, borrowDescription, borrowFindings, borrowHeadline, buildExposures2 as buildExposures, buildFluidFTokensCall, buildLendingPositionUid, buildLiquityUserCall, buildLoopResult, buildMorphoTypeCall, buildMorphoTypeUserCallWithLens, buildPortfolioTotals, buildSumerAccumulators, buildSummaries, buildTellerUserCall, buildTermMaxUserCall, buildTermSheet, buildTermSheetsForGroup, buildVaultEarnUid, buildVaultLookup, buildVaultTermSheet, calculateLeverage, calculateNetApr, calculateOverallNetApr, calculateWeightedAverage, classifyFreshness, classifyReliability, classifyVault, clearPendleMarketsCache, clearSpectraMarketsCache, collateralSymbolsByVenue, collectFeedObservations, computeBorrowDelta2 as computeBorrowDelta, computeCloseTradeDeltas, computeCollateralSwapDeltas, computeDebtSwapDeltas, computeDepositDelta2 as computeDepositDelta, computeEModeAnalysis, computeOpenTradeDeltas, computePostTradeMetrics, computeRepayDelta2 as computeRepayDelta, computeSumerBorrowDelta, computeSumerDepositDelta, computeSumerRepayDelta, computeSumerWaterfall, computeSumerWithdrawDelta, computeVaultApr, computeWithdrawDelta2 as computeWithdrawDelta, computeZapTradeDeltas, consensusReference, convertCoolerMarketsToResponse, convertDssMarketsToResponse, convertExactlyMarketsToResponse, convertFlyingTulipMarketsToResponse, convertFrankencoinMarketsToResponse, convertFraxlendPairsToResponse, convertInverseMarketsToResponse, convertLenderUserDataResult, convertLiquityMarketsToResponse, convertLlamaLendMarketsToResponse, convertResupplyMarketsToResponse, convertRiverMarketsToResponse, convertTellerMarketsToResponse, convertTermMarketsToResponse, convertTermMaxMarketsToResponse, convertUsddMarketsToResponse, createMarketUid, createMidnightBookSource, createMulticallRpcCall, createRawRpcCalls, createTermBookSource, createTermMaxDataSource, decodeListaMarkets, decodeMarkets, decodePackedListaUserDataset, decodePackedMorphoUserDataset, deriveBorrowTags, deriveSupplyTags, detectInterfaceKinds, dexResolverFor, disambiguateEarnNames, dolomiteVaultAddress, dssIlkBytes32, dssKeyParts, dssLenderKey, duration, earnDescription, earnLabel, earnMarketFromPool, earnMarketFromVault, earnMarketLabel, earnPositionFromLenderEntry, earnPositionFromVaultBalance, earnPositionTotals, earnRateAtMaturity, earnRowSubtitle, earnUidFromMarketUid, earnVaultTerms, earnVenueKind, encodeBalanceFetcherCalldata, enrichTermSheet, enrichmentIndexFromRows, exactlyPairLtv, exactlyPenaltyRateToAprPercent, exactlyWadRateToPercent, feePhrase, feedKeyOf, feedStatKey, fetchCoolerMarkets, fetchDolomiteAccountNumbers, fetchDolomiteSubAccounts, fetchDssMarkets, fetchEulerEarnVaults, fetchEulerEarnVaultsFromSubgraph, fetchEulerSubAccountIndexes, fetchExactlyMarkets, fetchFlashLiquidityForChain, fetchFluidDexState, fetchFluidFTokens, fetchFlyingTulipMarkets, fetchFrankencoinMarkets, fetchFraxlendPairs, fetchGeneralYields, fetchGeneralYieldsByMarketUid, fetchGmxExecutionFees, fetchGmxTickerPrices, fetchGmxVaults, fetchHypercoreVaults, fetchInverseMarkets, fetchLagoonApiVaults, fetchLagoonVaults, fetchLiquityMarkets, fetchListaVaultsFromChain, fetchLlamaLendMarkets, fetchMorphoUserBalances, fetchMorphoUserPositionMarkets, fetchMorphoVaults, fetchMorphoVaultsFromApi, fetchMorphoVaultsFromChain, fetchOraclePrices, fetchPendleApiAssets, fetchPendleApiMarkets, fetchPendlePrices, fetchPendlePtMarkets, fetchResupplyMarkets, fetchRiverMarkets, fetchSiloVaults, fetchSpectraApiMarkets, fetchSpectraPtMarkets, fetchTellerMarkets, fetchTermMarkets, fetchTermMaxMarkets, fetchTermStoreOrders, fetchTokenBalances, fetchTokenMetadata, fetchUpshiftApiVaults, fetchUpshiftVaults, fetchUsddMarkets, fetchYearnApiVaults, fetchYearnVaults, fillableRemaining, filterActiveLenders, filterLendersByProtocol, finalizeInfo, findingsFor, formatRaw, frankencoinKeyParts, frankencoinLenderKey, fraxlendAssetPerCollateral, fraxlendKeyParts, fraxlendLenderKey, fuseLenderData, generateLendingPools, getAavesForChain, getAssetConfig, getBalanceForMarketUid, getBorrowCapacity, getCachedFluidDexState, getCachedLiquityTroves, getCachedTellerBids, getCachedTermMaxDiscovery, getCachedTermMaxMarket, getCachedTermMaxMarkets, getCoreValidators, getFluidFTokensConverter, getGmxApiHost, getGmxReadContracts, getGmxUserPositions, getHealthFactor, getHypercoreUserPositions, getHypercoreVaultRegistry, getLenderAssets, getLenderPublicData, getLenderPublicDataAll, getLenderPublicDataViaApi, getLenderUserDataMulti, getLenderUserDataResult, getLendersForChain, getLstDelegation, getLstValidators, getLstWithdrawalRegistry, getLstWithdrawalRequests, getMaxAmountClose, getMaxAmountCollateralSwap, getMaxAmountDebtSwap, getMaxAmountOpen, getMergedUserData, getMorphoTypeMarketConverter, getReadFailurePolicy, getResolvedDolomiteAccountNumbers, getResolvedDolomiteSubAccounts, getStCeloValidatorGroups, getSubAccountAddress, getSubAccountIndex, getTermProfile, getVaultPublicDataAll, getVaultWithdrawalRequests, hasCritical, hasEulerEarnVaultSubgraph, hasLagoonVaults, hasMorphoPositionIndex, hasMorphoUserApi, hasMorphoUserSubgraph, hasPendleMarkets, hasSpectraMarkets, hasUpshiftVaults, hasYearnVaults, ilkToKeySegment, implausibleRatePercent, inverseKeyParts, inverseLenderKey, isBoundNeed, isFailedCall, isIlliquid, isLendingPosition, isLiveMarket as isLivePendleMarket, isLiveSpectraMarket, isMaturedTerm, isSecondaryMarketOnly, isStablecoinSymbol, isUnearnableEarnRate, isUnrealizableEarnRate, isVaultPosition, isVaultVenue, isYearnV3, keySegmentToIlk, keysFromMaps, lenderApiOnly, lenderFamily, liquityCandidateTroveIds, liquityKeyParts, liquityLenderKey, llamaLendKeyParts, llamaLendLenderKey, meetsLiquidityFloor, mergeDeep, multicall3Abi2 as multicall3Abi, nanTo, needsLenderApproval, needsTokenApproval, noOpResult, normalizeToBytes, organizeUserQueries, parseBalanceFetcherResult, parseDolomiteSubAccountId, parseEarnUid, parseMergedResult, parseMulticallRpcResponses, parseExpirySeconds as parsePendleExpirySeconds, parseRawRpcBatchResponses, parseRawRpcResponses, parseCurveFee as parseSpectraCurveFee, parsePtRate as parseSpectraPtRate, parseTermMaxLtv, parseTokenBalanceResult, pct, assetKey as pendleAssetKey, pickPool as pickSpectraPool, positivePart2 as positivePart, predictInverseEscrow, prepareLenderUserDataRpcCalls, prepareMergedMulticallParams, prepareMergedRpcCalls, prepareMulticallInputs, prepareTokenBalanceRpcCalls, priceGlvVaults, priceGmMarkets, probeAaveFeedTimestamps, pruneFeedStats, rankFindings, ratePercent, readVaultSharePrices, rejectOutliers as rejectPriceOutliers, repairImpossibleTvl, resolveAdapter, resolveDerivation, resolveDolomiteRowIdentity, resolveEarnIdentity, resolveModeConfig, resolveStCeloDepositGroup, resolveVaultProfileId, resupplyKeyParts, resupplyLenderKey, resupplyMarketLabel, riverKeyParts, riverLenderKey, sanePercent as saneSpectraPercent, savingsAddresses, savingsBalanceKind, secondaryMarketVault, selectAssetGroupPrices, setMysticApiKey, shortDate, spectraAddress, spectraNetwork, spectraPoolsUrl, splitChainScopedAddress as splitPendleChainScopedAddress, stampCapabilities, stampEarnSubtitles, stampVaultClassification, stampVaultTermSheets, stripLeadingBrand, supplyDescription, supplyFindings, supplyHeadline, swapRoutedProvidersArePriceConsistent, tellerBpsToPercent, tellerImpliedLtv, tellerLenderKey, tellerPoolFromLenderKey, termApiBaseUrl, termLenderKey, termMaxApiBase, borrowNif as termMaxBorrowNif, curveApr as termMaxCurveApr, curveAprNumber as termMaxCurveAprNumber, daysToMaturity as termMaxDaysToMaturity, lendNif as termMaxLendNif, mintGtFeeRatio as termMaxMintGtFeeRatio, ratioToNumber as termMaxRatioToNumber, ratioToPercent as termMaxRatioToPercent, termOfferRateToAprPct, termOrderStoreBaseUrl, tickToAprNumber, tickToPrice, toDigest, toDolomiteSubAccountId, toTermFillNow, toTermSheetInput, toVaultTermInput, trancheFromCounterparty, tryParseEarnUid, unflattenLenderData, updateFeedStats, usdValue, usddIlkBytes32, usddKeyParts, usddLenderKey, validateTermSheet, validateTermSheets, validateUserData, vaultSharesToAssets, vaultTermInputFromEarnMarket, vaultTermInputFromSourceRow, vaultTraits, vaultVenue, venueBrand, venueBrandKey, withMaturityLabel, withTrancheLabel };
|
|
81243
81504
|
//# sourceMappingURL=index.js.map
|
|
81244
81505
|
//# sourceMappingURL=index.js.map
|