@1delta/margin-fetcher 5.0.81 → 5.0.83
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.js +46 -9
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -6825,7 +6825,8 @@ var addressesCompoundV3 = {
|
|
|
6825
6825
|
[Chain.UNICHAIN]: "0x0bd7473CbBf81d9dD936c61117eD230d95006CA2",
|
|
6826
6826
|
[Chain.LINEA]: "0x7a59ddbB76521E8982Fa3A08598C9a83b14A6C07",
|
|
6827
6827
|
[Chain.SCROLL]: "0x32198Ee619fAd24169fa94A149Cb5205701C6AB1",
|
|
6828
|
-
[Chain.PLASMA_MAINNET]: "0x0bd7473CbBf81d9dD936c61117eD230d95006CA2"
|
|
6828
|
+
[Chain.PLASMA_MAINNET]: "0x0bd7473CbBf81d9dD936c61117eD230d95006CA2",
|
|
6829
|
+
[Chain.RONIN_MAINNET]: "0x0bd7473CbBf81d9dD936c61117eD230d95006CA2"
|
|
6829
6830
|
},
|
|
6830
6831
|
cometRewards: {
|
|
6831
6832
|
[Chain.POLYGON_MAINNET]: "0x45939657d1CA34A8FA39A924B71D28Fe8431e581",
|
|
@@ -6836,7 +6837,10 @@ var addressesCompoundV3 = {
|
|
|
6836
6837
|
[Chain.ETHEREUM_MAINNET]: "0x1B0e765F6224C21223AeA2af16c1C46E38885a40",
|
|
6837
6838
|
[Chain.SCROLL]: "0x70167D30964cbFDc315ECAe02441Af747bE0c5Ee",
|
|
6838
6839
|
[Chain.LINEA]: "0x2c7118c4C88B9841FCF839074c26Ae8f035f2921",
|
|
6839
|
-
[Chain.UNICHAIN]: "0x6f7D514bbD4aFf3BcD1140B7344b32f063dEe486"
|
|
6840
|
+
[Chain.UNICHAIN]: "0x6f7D514bbD4aFf3BcD1140B7344b32f063dEe486",
|
|
6841
|
+
// Compound's own `deployments/ronin/{weth,wron}/roots.json`, code-checked
|
|
6842
|
+
// 2026-09-16 (lens deployed the same day, 5204 bytes).
|
|
6843
|
+
[Chain.RONIN_MAINNET]: "0x31CdEe8609Bc15fD33cc525f101B70a81b2B1E59"
|
|
6840
6844
|
}
|
|
6841
6845
|
};
|
|
6842
6846
|
function getCompoundV3BaseAsset(lender, chainId) {
|
|
@@ -29916,7 +29920,19 @@ var MORPHO_UNLISTED_CHAINS = /* @__PURE__ */ new Set([
|
|
|
29916
29920
|
// markets, $524k supplied / $351k borrowed, no runaway rates (the
|
|
29917
29921
|
// highest borrow APR on the chain is 21.9 %).
|
|
29918
29922
|
// See LONGBOW.md.
|
|
29919
|
-
"4663"
|
|
29923
|
+
"4663",
|
|
29924
|
+
// World Chain. blue-api indexes it, but 0 of its 30 markets are listed —
|
|
29925
|
+
// Morpho's frontend simply does not carry the chain, so `listed` says
|
|
29926
|
+
// nothing about the book (the Longbow shape again). Looked at 2026-09-16:
|
|
29927
|
+
// $59.5M supplied / $45.0M borrowed, of which the real two-sided markets are
|
|
29928
|
+
// USDC/WBTC $3.9M, USDC/WETH $3.6M, WETH/WBTC $2.1M, USDC/WLD $1.6M and
|
|
29929
|
+
// WETH/ezETH $1.1M at 0.1–4.6 % borrow APY; the $35.8M USDC/sdeUSD market is
|
|
29930
|
+
// pinned at 100 % utilization (297,994 % APY, $0 liquid) and is exactly what
|
|
29931
|
+
// `earn/rateSanity.ts` exists to drop. Token-list gaps on 480 at enablement:
|
|
29932
|
+
// sdeUSD and ezETH (collateral of two markets) — those rows price at $0 with
|
|
29933
|
+
// a blank LTV until token-lists carries them. `lender-metadata`'s
|
|
29934
|
+
// `SERVES_UNLISTED_CHAINS` was updated in the same change.
|
|
29935
|
+
"480"
|
|
29920
29936
|
]);
|
|
29921
29937
|
function morphoIncludesUnlisted(chainId) {
|
|
29922
29938
|
return MORPHO_UNLISTED_CHAINS.has(chainId);
|
|
@@ -30156,6 +30172,7 @@ var buildAaveV2UserCall = (chainId, lender, account) => {
|
|
|
30156
30172
|
}
|
|
30157
30173
|
};
|
|
30158
30174
|
var POSITION_LENS_V6 = "0x110ff05D2822DBBe1a5404d2a485267e2Ed962C6";
|
|
30175
|
+
var POSITION_LENS_V7 = "0x388d62698c8E69e9D12cfe1DbDC822AF07d04408";
|
|
30159
30176
|
var LENS_FAMILY = {
|
|
30160
30177
|
COMPOUND_V2: 1,
|
|
30161
30178
|
SILO: 2,
|
|
@@ -30220,12 +30237,21 @@ var LENS_FAMILY = {
|
|
|
30220
30237
|
};
|
|
30221
30238
|
var V6_WITHHELD = /* @__PURE__ */ new Set([LENS_FAMILY.AAVE_V4]);
|
|
30222
30239
|
var ALL_FAMILIES = new Set(
|
|
30223
|
-
Object.values(LENS_FAMILY).filter(
|
|
30240
|
+
Object.values(LENS_FAMILY).filter(
|
|
30241
|
+
(f) => !V6_WITHHELD.has(f)
|
|
30242
|
+
)
|
|
30243
|
+
);
|
|
30244
|
+
var V7_FAMILIES = new Set(
|
|
30245
|
+
Object.values(LENS_FAMILY)
|
|
30224
30246
|
);
|
|
30225
30247
|
var v6 = () => ({
|
|
30226
30248
|
address: POSITION_LENS_V6,
|
|
30227
30249
|
families: ALL_FAMILIES
|
|
30228
30250
|
});
|
|
30251
|
+
var v7 = () => ({
|
|
30252
|
+
address: POSITION_LENS_V7,
|
|
30253
|
+
families: V7_FAMILIES
|
|
30254
|
+
});
|
|
30229
30255
|
var POSITION_LENS = {
|
|
30230
30256
|
[Chain.ETHEREUM_MAINNET]: v6(),
|
|
30231
30257
|
[Chain.ARBITRUM_ONE]: v6(),
|
|
@@ -30248,7 +30274,12 @@ var POSITION_LENS = {
|
|
|
30248
30274
|
[Chain.FLARE_MAINNET]: v6(),
|
|
30249
30275
|
[Chain.KAIA_MAINNET]: v6(),
|
|
30250
30276
|
[Chain.CORE_BLOCKCHAIN_MAINNET]: v6(),
|
|
30251
|
-
[Chain.MONAD_MAINNET]: v6()
|
|
30277
|
+
[Chain.MONAD_MAINNET]: v6(),
|
|
30278
|
+
// v7 from day one — deployed 2026-09-16, never ran an older version.
|
|
30279
|
+
[Chain.ARC]: v7(),
|
|
30280
|
+
[Chain.TEMPO_MAINNET_PRESTO]: v7(),
|
|
30281
|
+
[Chain.WORLD_CHAIN]: v7(),
|
|
30282
|
+
[Chain.RONIN_MAINNET]: v7()
|
|
30252
30283
|
};
|
|
30253
30284
|
var getPositionLensFor = (chainId, family) => {
|
|
30254
30285
|
const dep = POSITION_LENS[chainId];
|
|
@@ -56565,8 +56596,15 @@ var CHAINLINK_DECIMALS = 8;
|
|
|
56565
56596
|
var USD_PRICED_OVERRIDES = {
|
|
56566
56597
|
[Lender.COMPOUND_V3_AERO]: /* @__PURE__ */ new Set(["8453"]),
|
|
56567
56598
|
// BASE - prices already in USD
|
|
56568
|
-
[Lender.COMPOUND_V3_USDBC]: /* @__PURE__ */ new Set(["8453"])
|
|
56599
|
+
[Lender.COMPOUND_V3_USDBC]: /* @__PURE__ */ new Set(["8453"]),
|
|
56569
56600
|
// BASE - prices already in USD
|
|
56601
|
+
// Ronin WRON comet quotes in USD, NOT in its WRON base. Verified on-chain
|
|
56602
|
+
// 2026-09-16 (comet 0xc0Afdb…c0c0): USDC feed reads 1.00000071, WETH
|
|
56603
|
+
// 2415.66, WRON 0.0479 — all USD. Without this override every feed gets
|
|
56604
|
+
// multiplied by WRON/USD (~0.05), which shipped WRON at 9.4e-7 USD. Do NOT
|
|
56605
|
+
// generalize from the sibling WETH comet (0x4006eD…6DFE): that one IS
|
|
56606
|
+
// base-quoted (constant feed on WETH, RON/ETH = 2e-5) and needs the scaling.
|
|
56607
|
+
[Lender.COMPOUND_V3_WRON]: /* @__PURE__ */ new Set(["2020"])
|
|
56570
56608
|
};
|
|
56571
56609
|
function getCompoundV3Calls(chainId) {
|
|
56572
56610
|
const oraclesData = compoundV3OraclesData() ?? {};
|
|
@@ -56628,9 +56666,8 @@ function parseCompoundV3Results(data, meta, context) {
|
|
|
56628
56666
|
const baseAssetLc = queryMeta.baseAsset.toLowerCase();
|
|
56629
56667
|
const baseOracleKey = tokenList?.[baseAssetLc]?.assetGroup ?? `${chainId}-${baseAssetLc}`;
|
|
56630
56668
|
const baseAssetUSD = usdPrices[baseOracleKey] ?? usdPrices[baseAssetLc];
|
|
56631
|
-
if (baseAssetUSD)
|
|
56632
|
-
|
|
56633
|
-
}
|
|
56669
|
+
if (!baseAssetUSD) return;
|
|
56670
|
+
priceUSD = rawPrice * baseAssetUSD;
|
|
56634
56671
|
}
|
|
56635
56672
|
const updatedAtRaw = Array.isArray(rawResult) ? Number(rawResult[UPDATED_AT_INDEX]) : 0;
|
|
56636
56673
|
entries.push({
|