@1delta/data-sdk 0.0.42 → 0.0.44

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 CHANGED
@@ -69,6 +69,7 @@ var LENDER_DATA_DEFAULTS = () => ({
69
69
  morphoBundler3: {},
70
70
  initConfig: {},
71
71
  listaNativeProvider: {},
72
+ listaCollateralProviders: {},
72
73
  midnightConfig: {},
73
74
  midnightMarkets: {},
74
75
  termConfig: {},
@@ -94,6 +95,7 @@ var LENDER_DATA_DEFAULTS = () => ({
94
95
  llamaLendMarkets: {},
95
96
  resupplyConfig: {},
96
97
  curvanceConfig: {},
98
+ fraxlendConfig: {},
97
99
  eulerConfigs: {},
98
100
  eulerVaults: {},
99
101
  dolomiteConfigs: {},
@@ -301,6 +303,32 @@ var initConfig = () => getGlobalData2()?.initConfig;
301
303
 
302
304
  // src/lending/lista.ts
303
305
  var listaNativeProvider = () => getGlobalData2()?.listaNativeProvider;
306
+ var listaCollateralProviders = () => getGlobalData2()?.listaCollateralProviders;
307
+ var listaCollateralProvider = (chainId, provider) => {
308
+ if (!provider) return void 0;
309
+ return listaCollateralProviders()?.[String(chainId)]?.[provider.toLowerCase()];
310
+ };
311
+ var listaSmartLpByCollateral = (chainId, collateralToken) => {
312
+ if (!collateralToken) return void 0;
313
+ const chain = listaCollateralProviders()?.[String(chainId)];
314
+ if (!chain) return void 0;
315
+ const needle = collateralToken.toLowerCase();
316
+ for (const [address, entry] of Object.entries(chain)) {
317
+ if (entry.kind !== "smart-lp") continue;
318
+ if (entry.collateralToken.toLowerCase() === needle) {
319
+ return { ...entry, address };
320
+ }
321
+ }
322
+ return void 0;
323
+ };
324
+ var isListaSmartLpAsset = (entry, asset) => {
325
+ const needle = asset.toLowerCase();
326
+ if (entry.dexLp && entry.dexLp.toLowerCase() === needle) return true;
327
+ return (entry.coins ?? []).some(
328
+ (c) => c.address.toLowerCase() === needle || // the pool spells its native coin with the same 0xEeee… sentinel
329
+ c.isNative && needle === "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"
330
+ );
331
+ };
304
332
 
305
333
  // src/lending/midnight.ts
306
334
  var midnightConfig = () => getGlobalData2()?.midnightConfig;
@@ -710,6 +738,123 @@ var curvancePositionManager = (lender, chainId, marketManager, kind) => {
710
738
  return pms.simplePositionManager ?? pms.vaultPositionManager ?? pms.nativeVaultPositionManager ?? pms.pendlePtPositionManager;
711
739
  };
712
740
 
741
+ // src/lending/fraxlend.ts
742
+ var FRAXLEND_ETHEREUM_CONFIG = {
743
+ deployer: "0xD6E9D27C75Afd88ad24Cd5EdccdC76fd2fc3A751",
744
+ /**
745
+ * `0xA49fD918…` — approved on exactly 3 of the 71 pairs (the 95 % LTV
746
+ * yield-bearing-stablecoin carry markets, flagged below). It is NOT an
747
+ * aggregator router: on those pairs the collateral is an ERC-4626 over the
748
+ * pair's own asset, so the "swap" is a vault deposit and `path` is just
749
+ * `[asset, collateral]`.
750
+ *
751
+ * The legacy 2022 grants (`0xc14d5506…` = FraxswapRouterV2, `0x1c6ca5de…`)
752
+ * sit only on dead FraxlendV1 pairs and are deliberately not carried here.
753
+ */
754
+ leverageSwapper: "0xA49fD918238b1a7003659138Fb91f194306B595b",
755
+ pairs: [
756
+ // --- the book: 62 % of supply, 69 % of borrows, and NO swapper ---
757
+ {
758
+ address: "0xaB3cb84c310186B2Fa4B4503624A5D90b5DcB22D",
759
+ symbol: "ffrxUSD(sfrxETH)-58",
760
+ label: "frxUSD / sfrxETH"
761
+ },
762
+ {
763
+ address: "0x78bB3aEC3d855431bd9289fD98dA13F9ebB7ef15",
764
+ symbol: "fFRAX(sfrxETH)-16",
765
+ label: "FRAX / sfrxETH"
766
+ },
767
+ // --- LEVERAGE-ENABLED (swapper approved at curation; still probe live) ---
768
+ {
769
+ address: "0xC045A53936D793839BFCA146058976ef4285161E",
770
+ symbol: "ffrxUSD(sfrxUSD)-69",
771
+ label: "frxUSD / sfrxUSD"
772
+ },
773
+ {
774
+ address: "0x28Cdf6Ce79702AAeFbF217cF98cbD11f5639B9f1",
775
+ symbol: "ffrxUSD(sUSDe)-59",
776
+ label: "frxUSD / sUSDe"
777
+ },
778
+ {
779
+ address: "0x8087346b8865e5B0bF9F8A49742c2D83f6a50a6c",
780
+ symbol: "ffrxUSD(scrvUSD)-61",
781
+ label: "frxUSD / scrvUSD"
782
+ },
783
+ // --- the rest of the listed set ---
784
+ {
785
+ address: "0x470c677AF6CCE089ac38245332BfA03b22b4caeD",
786
+ symbol: "ffrxUSD(WFRAX)-68",
787
+ label: "frxUSD / WFRAX"
788
+ },
789
+ {
790
+ // A Frax BOND collateral with a real maturity, and it sits at ~100 %
791
+ // utilization — withdrawals will revert on liquidity, which is a
792
+ // supply-side UX problem, not a config error.
793
+ address: "0x1c0C222989a37247D974937782cebc8bF4f25733",
794
+ symbol: "fFRAX(FXB_20261231)-24",
795
+ label: "FRAX / FXB Dec-2026"
796
+ },
797
+ {
798
+ address: "0x8E5f09de0cD7841239410F929A905E214443d9E0",
799
+ symbol: "ffrxUSD(WBTC)-62",
800
+ label: "frxUSD / WBTC"
801
+ },
802
+ {
803
+ address: "0xb5a46f712F03808aE5c4B885C6F598fA06442684",
804
+ symbol: "fFRAX(wstETH)-28",
805
+ label: "FRAX / wstETH"
806
+ },
807
+ {
808
+ address: "0xc6CadA314389430d396C7b0C70c6281e99ca7fe8",
809
+ symbol: "fFRAX(UNI)-19",
810
+ label: "FRAX / UNI"
811
+ },
812
+ {
813
+ address: "0xb5Ae5b75C0DF5632c572A657109375646Ce66f90",
814
+ symbol: "fFRAX(sUSDe)-31",
815
+ label: "FRAX / sUSDe"
816
+ },
817
+ {
818
+ address: "0xA201E7bBb7Ca60ab88514d12dD91fC6748E6D050",
819
+ symbol: "ffrxUSD(srRoyUSDC)-70",
820
+ label: "frxUSD / srRoyUSDC"
821
+ },
822
+ {
823
+ address: "0x7093F6141293F7C4F67E5efD922aC934402E452d",
824
+ symbol: "fFRAX(LINK)-27",
825
+ label: "FRAX / LINK"
826
+ }
827
+ ]
828
+ };
829
+ var FRAXLEND_BUILTIN = {
830
+ FRAXLEND: { "1": FRAXLEND_ETHEREUM_CONFIG }
831
+ };
832
+ var fraxlendConfig = () => getGlobalData2()?.fraxlendConfig;
833
+ var fraxlendConfigFor = (lender, chainId) => {
834
+ const published = getGlobalData2()?.fraxlendConfig?.[lender]?.[String(chainId)];
835
+ if (published?.pairs?.length) return published;
836
+ return FRAXLEND_BUILTIN[lender]?.[String(chainId)];
837
+ };
838
+ var fraxlendLendersByChain = (chainId) => {
839
+ const chain = String(chainId);
840
+ const cfg = getGlobalData2()?.fraxlendConfig ?? {};
841
+ const keys = /* @__PURE__ */ new Set();
842
+ for (const lender of Object.keys(cfg)) {
843
+ if (cfg[lender]?.[chain]?.pairs?.length) keys.add(lender);
844
+ }
845
+ for (const lender of Object.keys(FRAXLEND_BUILTIN)) {
846
+ if (FRAXLEND_BUILTIN[lender]?.[chain]?.pairs?.length) keys.add(lender);
847
+ }
848
+ return [...keys];
849
+ };
850
+ var fraxlendPairsFor = (lender, chainId) => fraxlendConfigFor(lender, chainId)?.pairs ?? [];
851
+ var fraxlendPairKey = (chainId, pair) => `FRAXLEND_${String(chainId)}_${pair.toLowerCase()}`;
852
+ var parseFraxlendPairKey = (lender) => {
853
+ const m = /^FRAXLEND_(\d+)_(0x[0-9a-fA-F]{40})$/.exec(lender);
854
+ if (!m) return void 0;
855
+ return { chainId: m[1], pair: m[2].toLowerCase() };
856
+ };
857
+
713
858
  // src/tokens.ts
714
859
  var getListUrl = (chainId) => `https://raw.githubusercontent.com/1delta-DAO/token-lists/main/${chainId}.json`;
715
860
  async function fetchTokenList(chainId) {
@@ -742,6 +887,7 @@ async function fetchMainTokensMap() {
742
887
  }
743
888
 
744
889
  exports.CURVANCE_MONAD_CONFIG = CURVANCE_MONAD_CONFIG;
890
+ exports.FRAXLEND_ETHEREUM_CONFIG = FRAXLEND_ETHEREUM_CONFIG;
745
891
  exports.GEARBOX_ACCOUNT_COMPRESSOR_V310 = GEARBOX_ACCOUNT_COMPRESSOR_V310;
746
892
  exports.RESUPPLY_ETHEREUM_CONFIG = RESUPPLY_ETHEREUM_CONFIG;
747
893
  exports.aaveOracles = aaveOracles;
@@ -803,6 +949,11 @@ exports.frankencoinConfigFor = frankencoinConfigFor;
803
949
  exports.frankencoinLendersByChain = frankencoinLendersByChain;
804
950
  exports.frankencoinMarketByPosition = frankencoinMarketByPosition;
805
951
  exports.frankencoinMarkets = frankencoinMarkets;
952
+ exports.fraxlendConfig = fraxlendConfig;
953
+ exports.fraxlendConfigFor = fraxlendConfigFor;
954
+ exports.fraxlendLendersByChain = fraxlendLendersByChain;
955
+ exports.fraxlendPairKey = fraxlendPairKey;
956
+ exports.fraxlendPairsFor = fraxlendPairsFor;
806
957
  exports.gearboxAccountCompressor = gearboxAccountCompressor;
807
958
  exports.gearboxAddressProviderV310 = gearboxAddressProviderV310;
808
959
  exports.gearboxBotListV3 = gearboxBotListV3;
@@ -827,6 +978,7 @@ exports.inverseConfigFor = inverseConfigFor;
827
978
  exports.inverseLendersByChain = inverseLendersByChain;
828
979
  exports.inverseMarketByAddress = inverseMarketByAddress;
829
980
  exports.inverseMarkets = inverseMarkets;
981
+ exports.isListaSmartLpAsset = isListaSmartLpAsset;
830
982
  exports.liquityBranchByIndex = liquityBranchByIndex;
831
983
  exports.liquityBranchByTroveManager = liquityBranchByTroveManager;
832
984
  exports.liquityBranchesByChain = liquityBranchesByChain;
@@ -834,7 +986,10 @@ exports.liquityConfig = liquityConfig;
834
986
  exports.liquityConfigFor = liquityConfigFor;
835
987
  exports.liquityLendersByChain = liquityLendersByChain;
836
988
  exports.liquityMarkets = liquityMarkets;
989
+ exports.listaCollateralProvider = listaCollateralProvider;
990
+ exports.listaCollateralProviders = listaCollateralProviders;
837
991
  exports.listaNativeProvider = listaNativeProvider;
992
+ exports.listaSmartLpByCollateral = listaSmartLpByCollateral;
838
993
  exports.llamaLendApiBaseUrl = llamaLendApiBaseUrl;
839
994
  exports.llamaLendChainData = llamaLendChainData;
840
995
  exports.llamaLendConfig = llamaLendConfig;
@@ -859,6 +1014,7 @@ exports.morphoTypeMarkets = morphoTypeMarkets;
859
1014
  exports.morphoTypeOracles = morphoTypeOracles;
860
1015
  exports.morphoTypeVaults = morphoTypeVaults;
861
1016
  exports.parseAaveV4SpokeLenderKey = parseAaveV4SpokeLenderKey;
1017
+ exports.parseFraxlendPairKey = parseFraxlendPairKey;
862
1018
  exports.parseGearboxV3LenderKey = parseGearboxV3LenderKey;
863
1019
  exports.parseLlamaLendLenderKey = parseLlamaLendLenderKey;
864
1020
  exports.parseSiloV2LenderKey = parseSiloV2LenderKey;
package/dist/index.mjs CHANGED
@@ -67,6 +67,7 @@ var LENDER_DATA_DEFAULTS = () => ({
67
67
  morphoBundler3: {},
68
68
  initConfig: {},
69
69
  listaNativeProvider: {},
70
+ listaCollateralProviders: {},
70
71
  midnightConfig: {},
71
72
  midnightMarkets: {},
72
73
  termConfig: {},
@@ -92,6 +93,7 @@ var LENDER_DATA_DEFAULTS = () => ({
92
93
  llamaLendMarkets: {},
93
94
  resupplyConfig: {},
94
95
  curvanceConfig: {},
96
+ fraxlendConfig: {},
95
97
  eulerConfigs: {},
96
98
  eulerVaults: {},
97
99
  dolomiteConfigs: {},
@@ -299,6 +301,32 @@ var initConfig = () => getGlobalData2()?.initConfig;
299
301
 
300
302
  // src/lending/lista.ts
301
303
  var listaNativeProvider = () => getGlobalData2()?.listaNativeProvider;
304
+ var listaCollateralProviders = () => getGlobalData2()?.listaCollateralProviders;
305
+ var listaCollateralProvider = (chainId, provider) => {
306
+ if (!provider) return void 0;
307
+ return listaCollateralProviders()?.[String(chainId)]?.[provider.toLowerCase()];
308
+ };
309
+ var listaSmartLpByCollateral = (chainId, collateralToken) => {
310
+ if (!collateralToken) return void 0;
311
+ const chain = listaCollateralProviders()?.[String(chainId)];
312
+ if (!chain) return void 0;
313
+ const needle = collateralToken.toLowerCase();
314
+ for (const [address, entry] of Object.entries(chain)) {
315
+ if (entry.kind !== "smart-lp") continue;
316
+ if (entry.collateralToken.toLowerCase() === needle) {
317
+ return { ...entry, address };
318
+ }
319
+ }
320
+ return void 0;
321
+ };
322
+ var isListaSmartLpAsset = (entry, asset) => {
323
+ const needle = asset.toLowerCase();
324
+ if (entry.dexLp && entry.dexLp.toLowerCase() === needle) return true;
325
+ return (entry.coins ?? []).some(
326
+ (c) => c.address.toLowerCase() === needle || // the pool spells its native coin with the same 0xEeee… sentinel
327
+ c.isNative && needle === "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"
328
+ );
329
+ };
302
330
 
303
331
  // src/lending/midnight.ts
304
332
  var midnightConfig = () => getGlobalData2()?.midnightConfig;
@@ -708,6 +736,123 @@ var curvancePositionManager = (lender, chainId, marketManager, kind) => {
708
736
  return pms.simplePositionManager ?? pms.vaultPositionManager ?? pms.nativeVaultPositionManager ?? pms.pendlePtPositionManager;
709
737
  };
710
738
 
739
+ // src/lending/fraxlend.ts
740
+ var FRAXLEND_ETHEREUM_CONFIG = {
741
+ deployer: "0xD6E9D27C75Afd88ad24Cd5EdccdC76fd2fc3A751",
742
+ /**
743
+ * `0xA49fD918…` — approved on exactly 3 of the 71 pairs (the 95 % LTV
744
+ * yield-bearing-stablecoin carry markets, flagged below). It is NOT an
745
+ * aggregator router: on those pairs the collateral is an ERC-4626 over the
746
+ * pair's own asset, so the "swap" is a vault deposit and `path` is just
747
+ * `[asset, collateral]`.
748
+ *
749
+ * The legacy 2022 grants (`0xc14d5506…` = FraxswapRouterV2, `0x1c6ca5de…`)
750
+ * sit only on dead FraxlendV1 pairs and are deliberately not carried here.
751
+ */
752
+ leverageSwapper: "0xA49fD918238b1a7003659138Fb91f194306B595b",
753
+ pairs: [
754
+ // --- the book: 62 % of supply, 69 % of borrows, and NO swapper ---
755
+ {
756
+ address: "0xaB3cb84c310186B2Fa4B4503624A5D90b5DcB22D",
757
+ symbol: "ffrxUSD(sfrxETH)-58",
758
+ label: "frxUSD / sfrxETH"
759
+ },
760
+ {
761
+ address: "0x78bB3aEC3d855431bd9289fD98dA13F9ebB7ef15",
762
+ symbol: "fFRAX(sfrxETH)-16",
763
+ label: "FRAX / sfrxETH"
764
+ },
765
+ // --- LEVERAGE-ENABLED (swapper approved at curation; still probe live) ---
766
+ {
767
+ address: "0xC045A53936D793839BFCA146058976ef4285161E",
768
+ symbol: "ffrxUSD(sfrxUSD)-69",
769
+ label: "frxUSD / sfrxUSD"
770
+ },
771
+ {
772
+ address: "0x28Cdf6Ce79702AAeFbF217cF98cbD11f5639B9f1",
773
+ symbol: "ffrxUSD(sUSDe)-59",
774
+ label: "frxUSD / sUSDe"
775
+ },
776
+ {
777
+ address: "0x8087346b8865e5B0bF9F8A49742c2D83f6a50a6c",
778
+ symbol: "ffrxUSD(scrvUSD)-61",
779
+ label: "frxUSD / scrvUSD"
780
+ },
781
+ // --- the rest of the listed set ---
782
+ {
783
+ address: "0x470c677AF6CCE089ac38245332BfA03b22b4caeD",
784
+ symbol: "ffrxUSD(WFRAX)-68",
785
+ label: "frxUSD / WFRAX"
786
+ },
787
+ {
788
+ // A Frax BOND collateral with a real maturity, and it sits at ~100 %
789
+ // utilization — withdrawals will revert on liquidity, which is a
790
+ // supply-side UX problem, not a config error.
791
+ address: "0x1c0C222989a37247D974937782cebc8bF4f25733",
792
+ symbol: "fFRAX(FXB_20261231)-24",
793
+ label: "FRAX / FXB Dec-2026"
794
+ },
795
+ {
796
+ address: "0x8E5f09de0cD7841239410F929A905E214443d9E0",
797
+ symbol: "ffrxUSD(WBTC)-62",
798
+ label: "frxUSD / WBTC"
799
+ },
800
+ {
801
+ address: "0xb5a46f712F03808aE5c4B885C6F598fA06442684",
802
+ symbol: "fFRAX(wstETH)-28",
803
+ label: "FRAX / wstETH"
804
+ },
805
+ {
806
+ address: "0xc6CadA314389430d396C7b0C70c6281e99ca7fe8",
807
+ symbol: "fFRAX(UNI)-19",
808
+ label: "FRAX / UNI"
809
+ },
810
+ {
811
+ address: "0xb5Ae5b75C0DF5632c572A657109375646Ce66f90",
812
+ symbol: "fFRAX(sUSDe)-31",
813
+ label: "FRAX / sUSDe"
814
+ },
815
+ {
816
+ address: "0xA201E7bBb7Ca60ab88514d12dD91fC6748E6D050",
817
+ symbol: "ffrxUSD(srRoyUSDC)-70",
818
+ label: "frxUSD / srRoyUSDC"
819
+ },
820
+ {
821
+ address: "0x7093F6141293F7C4F67E5efD922aC934402E452d",
822
+ symbol: "fFRAX(LINK)-27",
823
+ label: "FRAX / LINK"
824
+ }
825
+ ]
826
+ };
827
+ var FRAXLEND_BUILTIN = {
828
+ FRAXLEND: { "1": FRAXLEND_ETHEREUM_CONFIG }
829
+ };
830
+ var fraxlendConfig = () => getGlobalData2()?.fraxlendConfig;
831
+ var fraxlendConfigFor = (lender, chainId) => {
832
+ const published = getGlobalData2()?.fraxlendConfig?.[lender]?.[String(chainId)];
833
+ if (published?.pairs?.length) return published;
834
+ return FRAXLEND_BUILTIN[lender]?.[String(chainId)];
835
+ };
836
+ var fraxlendLendersByChain = (chainId) => {
837
+ const chain = String(chainId);
838
+ const cfg = getGlobalData2()?.fraxlendConfig ?? {};
839
+ const keys = /* @__PURE__ */ new Set();
840
+ for (const lender of Object.keys(cfg)) {
841
+ if (cfg[lender]?.[chain]?.pairs?.length) keys.add(lender);
842
+ }
843
+ for (const lender of Object.keys(FRAXLEND_BUILTIN)) {
844
+ if (FRAXLEND_BUILTIN[lender]?.[chain]?.pairs?.length) keys.add(lender);
845
+ }
846
+ return [...keys];
847
+ };
848
+ var fraxlendPairsFor = (lender, chainId) => fraxlendConfigFor(lender, chainId)?.pairs ?? [];
849
+ var fraxlendPairKey = (chainId, pair) => `FRAXLEND_${String(chainId)}_${pair.toLowerCase()}`;
850
+ var parseFraxlendPairKey = (lender) => {
851
+ const m = /^FRAXLEND_(\d+)_(0x[0-9a-fA-F]{40})$/.exec(lender);
852
+ if (!m) return void 0;
853
+ return { chainId: m[1], pair: m[2].toLowerCase() };
854
+ };
855
+
711
856
  // src/tokens.ts
712
857
  var getListUrl = (chainId) => `https://raw.githubusercontent.com/1delta-DAO/token-lists/main/${chainId}.json`;
713
858
  async function fetchTokenList(chainId) {
@@ -739,4 +884,4 @@ async function fetchMainTokensMap() {
739
884
  return await data.json();
740
885
  }
741
886
 
742
- export { CURVANCE_MONAD_CONFIG, GEARBOX_ACCOUNT_COMPRESSOR_V310, RESUPPLY_ETHEREUM_CONFIG, aaveOracles, aaveOraclesConfig, aavePools, aaveReserves, aaveTokens, aaveV4Oracles, aaveV4Peripherals, aaveV4SpokeLenderKey, aaveV4Spokes, aaveWethGateway, chainLogoURI, chains, compoundV2Oracles, compoundV2OraclesConfig, compoundV2Pools, compoundV2Reserves, compoundV2TokenArray, compoundV2Tokens, compoundV3BaseData, compoundV3Bulker, compoundV3OraclesData, compoundV3Pools, compoundV3Reserves, curvanceConfig, curvanceConfigFor, curvanceLendersByChain, curvancePositionManager, curvancePositionManagersFor, dolomiteChains, dolomiteConfigs, dolomiteEmode, dolomiteMarketIdByToken, dssChainData, dssConfigFor, dssDebtJoin, dssDebtToken, dssMarketByIlk, eulerConfigs, eulerVaults, exactlyConfig, exactlyMarketByAddress, exactlyMarketByAsset, exactlyMarkets, exactlyMarketsByChain, fetchMainTokensMap, fetchTokenList, fetchTokenListFile, fetchTokenLists, findAaveV4PositionManager, fluidChains, fluidResolvers, fluidVaultEntries, fluidVaults, frankencoinChainData, frankencoinConfig, frankencoinConfigFor, frankencoinLendersByChain, frankencoinMarketByPosition, frankencoinMarkets, gearboxAccountCompressor, gearboxAddressProviderV310, gearboxBotListV3, gearboxChains, gearboxMarketCompressor, gearboxMarketConfigurators, gearboxResolvers, gearboxV3LenderKey, getAaveV4GatewayAddresses, getAaveV4PositionManagers, getAaveV4SpokeEntry, getAaveV4SpokePeripherals, getChainEntries, getSiloV2MarketEntry, getSiloV3MarketEntry, initConfig, initializeChainData, initializeLenderData, inverseChainData, inverseConfig, inverseConfigFor, inverseLendersByChain, inverseMarketByAddress, inverseMarkets, liquityBranchByIndex, liquityBranchByTroveManager, liquityBranchesByChain, liquityConfig, liquityConfigFor, liquityLendersByChain, liquityMarkets, listaNativeProvider, llamaLendApiBaseUrl, llamaLendChainData, llamaLendConfig, llamaLendConfigFor, llamaLendLenderKey, llamaLendLendersByChain, llamaLendLeverageZap, llamaLendMarketByController, llamaLendMarketByVault, llamaLendMarkets, llamaLendSupportsDelegation, llamaLendSupportsLeverage, midnightApiBaseOverride, midnightConfig, midnightMarketById, midnightMarkets, midnightMarketsByChain, morphoBundler3, morphoOracles, morphoPools, morphoTypeMarkets, morphoTypeOracles, morphoTypeVaults, parseAaveV4SpokeLenderKey, parseGearboxV3LenderKey, parseLlamaLendLenderKey, parseSiloV2LenderKey, parseSiloV3LenderKey, parseTermMaxLenderKey, resolveMidnightApiBase, resolveTermApiBase, resupplyConfig, resupplyConfigFor, resupplyLendersByChain, riverChainData, riverConfig, riverConfigFor, riverLendersByChain, riverMarketByIndex, riverMarkets, setMidnightApiBase, setTermApiBase, siloMarkets, siloMarketsV3, siloPeripherals, siloPeripheralsV3, siloV2LenderKey, siloV3LenderKey, skyChainData, skyConfig, skyConfigFor, skyLendersByChain, skyMarkets, tellerConfig, tellerConfigByChain, tellerPoolByAddress, tellerPools, tellerPoolsByChain, termApiBaseOverride, termConfig, termMarketById, termMarkets, termMarketsByChain, termMaxApiBaseUrl, termMaxChainIds, termMaxConfig, termMaxConfigByChain, termMaxLenderKey, usddChainData, usddConfig, usddConfigFor, usddLendersByChain, usddMarketByIlk, usddMarkets };
887
+ export { CURVANCE_MONAD_CONFIG, FRAXLEND_ETHEREUM_CONFIG, GEARBOX_ACCOUNT_COMPRESSOR_V310, RESUPPLY_ETHEREUM_CONFIG, aaveOracles, aaveOraclesConfig, aavePools, aaveReserves, aaveTokens, aaveV4Oracles, aaveV4Peripherals, aaveV4SpokeLenderKey, aaveV4Spokes, aaveWethGateway, chainLogoURI, chains, compoundV2Oracles, compoundV2OraclesConfig, compoundV2Pools, compoundV2Reserves, compoundV2TokenArray, compoundV2Tokens, compoundV3BaseData, compoundV3Bulker, compoundV3OraclesData, compoundV3Pools, compoundV3Reserves, curvanceConfig, curvanceConfigFor, curvanceLendersByChain, curvancePositionManager, curvancePositionManagersFor, dolomiteChains, dolomiteConfigs, dolomiteEmode, dolomiteMarketIdByToken, dssChainData, dssConfigFor, dssDebtJoin, dssDebtToken, dssMarketByIlk, eulerConfigs, eulerVaults, exactlyConfig, exactlyMarketByAddress, exactlyMarketByAsset, exactlyMarkets, exactlyMarketsByChain, fetchMainTokensMap, fetchTokenList, fetchTokenListFile, fetchTokenLists, findAaveV4PositionManager, fluidChains, fluidResolvers, fluidVaultEntries, fluidVaults, frankencoinChainData, frankencoinConfig, frankencoinConfigFor, frankencoinLendersByChain, frankencoinMarketByPosition, frankencoinMarkets, fraxlendConfig, fraxlendConfigFor, fraxlendLendersByChain, fraxlendPairKey, fraxlendPairsFor, gearboxAccountCompressor, gearboxAddressProviderV310, gearboxBotListV3, gearboxChains, gearboxMarketCompressor, gearboxMarketConfigurators, gearboxResolvers, gearboxV3LenderKey, getAaveV4GatewayAddresses, getAaveV4PositionManagers, getAaveV4SpokeEntry, getAaveV4SpokePeripherals, getChainEntries, getSiloV2MarketEntry, getSiloV3MarketEntry, initConfig, initializeChainData, initializeLenderData, inverseChainData, inverseConfig, inverseConfigFor, inverseLendersByChain, inverseMarketByAddress, inverseMarkets, isListaSmartLpAsset, liquityBranchByIndex, liquityBranchByTroveManager, liquityBranchesByChain, liquityConfig, liquityConfigFor, liquityLendersByChain, liquityMarkets, listaCollateralProvider, listaCollateralProviders, listaNativeProvider, listaSmartLpByCollateral, llamaLendApiBaseUrl, llamaLendChainData, llamaLendConfig, llamaLendConfigFor, llamaLendLenderKey, llamaLendLendersByChain, llamaLendLeverageZap, llamaLendMarketByController, llamaLendMarketByVault, llamaLendMarkets, llamaLendSupportsDelegation, llamaLendSupportsLeverage, midnightApiBaseOverride, midnightConfig, midnightMarketById, midnightMarkets, midnightMarketsByChain, morphoBundler3, morphoOracles, morphoPools, morphoTypeMarkets, morphoTypeOracles, morphoTypeVaults, parseAaveV4SpokeLenderKey, parseFraxlendPairKey, parseGearboxV3LenderKey, parseLlamaLendLenderKey, parseSiloV2LenderKey, parseSiloV3LenderKey, parseTermMaxLenderKey, resolveMidnightApiBase, resolveTermApiBase, resupplyConfig, resupplyConfigFor, resupplyLendersByChain, riverChainData, riverConfig, riverConfigFor, riverLendersByChain, riverMarketByIndex, riverMarkets, setMidnightApiBase, setTermApiBase, siloMarkets, siloMarketsV3, siloPeripherals, siloPeripheralsV3, siloV2LenderKey, siloV3LenderKey, skyChainData, skyConfig, skyConfigFor, skyLendersByChain, skyMarkets, tellerConfig, tellerConfigByChain, tellerPoolByAddress, tellerPools, tellerPoolsByChain, termApiBaseOverride, termConfig, termMarketById, termMarkets, termMarketsByChain, termMaxApiBaseUrl, termMaxChainIds, termMaxConfig, termMaxConfigByChain, termMaxLenderKey, usddChainData, usddConfig, usddConfigFor, usddLendersByChain, usddMarketByIlk, usddMarkets };
@@ -0,0 +1,85 @@
1
+ /** One curated Fraxlend pair. Everything not listed here (asset, collateral,
2
+ * LTV, rates, caps, pause flags) is read from the pair itself — these fields
3
+ * exist only to curate and to label. */
4
+ export type FraxlendPairEntry = {
5
+ /** The `FraxlendPair` contract. Doubles as the market id: the lender key is
6
+ * `FRAXLEND_<chainId>_<address>`. */
7
+ address: string;
8
+ /** The pair's own `symbol()`, e.g. `ffrxUSD(sfrxETH)-58`. Carried for
9
+ * labelling and to make a stale allowlist obvious in a diff — NOT used for
10
+ * dispatch. */
11
+ symbol?: string;
12
+ /** Human label for the UI, e.g. `frxUSD / sfrxETH`. */
13
+ label?: string;
14
+ /** Set false to keep a pair in the roster for READS (existing positions
15
+ * stay serviceable, repay/withdraw keep working) while refusing new
16
+ * borrows. The Lista lesson: a market in run-off must not vanish, or users
17
+ * with open debt lose the UI that closes it. */
18
+ borrowEnabled?: boolean;
19
+ };
20
+ /** Per-chain, protocol-level Fraxlend addresses. */
21
+ export type FraxlendConfigChain = {
22
+ /** `FraxlendPairDeployer` — the on-chain pair registry. Carried for
23
+ * AUDITING the allowlist against the chain (a generator can diff the two
24
+ * and flag new listed pairs). NEVER use it for runtime discovery. */
25
+ deployer?: string | null;
26
+ /**
27
+ * The swapper Frax has whitelisted for native leverage, as of the last
28
+ * audit. This is a HINT for the generator and for diagnostics — the runtime
29
+ * MUST still probe `pair.swappers(addr)` per pair, because the mapping is
30
+ * owner-mutable in both directions and is set per pair, not globally.
31
+ * Treating this address as "leverage is available" without the probe would
32
+ * advertise a loop that reverts `BadSwapper()`.
33
+ */
34
+ leverageSwapper?: string | null;
35
+ /** The curated pair roster. Absent or empty ⇒ the provider publishes
36
+ * nothing on this chain (fail closed — never fall back to the deployer). */
37
+ pairs: FraxlendPairEntry[];
38
+ };
39
+ export type FraxlendConfigType = {
40
+ [lender: string]: {
41
+ [chainId: string]: FraxlendConfigChain;
42
+ };
43
+ };
44
+ /**
45
+ * Built-in Ethereum seed.
46
+ *
47
+ * Published `config/fraxlend.json` metadata WINS over this (see
48
+ * `fraxlendConfigFor`); the seed exists so the provider is live before the
49
+ * metadata PR lands, which is the Resupply/Curvance precedent.
50
+ *
51
+ * Curated 2026-08-11 by profiling all 71 deployer pairs on-chain: every pair
52
+ * below held more than ~1,000 units of supply, which reproduces exactly the
53
+ * 13-pair set that frax.com/lend lists. Everything excluded is either a
54
+ * FraxlendV1 contract, a frozen market, or dust (the next-largest omitted pair
55
+ * holds ~900 units and the long tail bottoms out at 2).
56
+ *
57
+ * Totals at curation: ~$8.4M supplied / ~$5.1M borrowed, and ONE pair
58
+ * (`0xaB3cb84c…`, frxUSD/sfrxETH) is 62 % of supply and 69 % of borrows.
59
+ */
60
+ export declare const FRAXLEND_ETHEREUM_CONFIG: FraxlendConfigChain;
61
+ export declare const fraxlendConfig: () => FraxlendConfigType;
62
+ /**
63
+ * Deployment seed for one Fraxlend lender on a chain. Published metadata wins;
64
+ * the built-in Ethereum row is the fallback so the provider works before
65
+ * `config/fraxlend.json` exists.
66
+ *
67
+ * Gated on a NON-EMPTY `pairs` array, not merely on the key existing: an
68
+ * allowlist-driven provider with an empty roster must publish nothing rather
69
+ * than fall through to on-chain discovery.
70
+ */
71
+ export declare const fraxlendConfigFor: (lender: string, chainId: string | number) => FraxlendConfigChain | undefined;
72
+ /** All Fraxlend lender keys with a non-empty roster on a chain (drives
73
+ * getLendersForChain). Union of published metadata and the built-in row. */
74
+ export declare const fraxlendLendersByChain: (chainId: string | number) => string[];
75
+ /** The curated pair roster for a lender/chain, or `[]`. */
76
+ export declare const fraxlendPairsFor: (lender: string, chainId: string | number) => FraxlendPairEntry[];
77
+ /** Build the per-pair lender key. Lower-cased address so the key is stable
78
+ * regardless of how the allowlist was checksummed. */
79
+ export declare const fraxlendPairKey: (chainId: string | number, pair: string) => string;
80
+ /** Inverse of {@link fraxlendPairKey}. Returns undefined for the bare
81
+ * `FRAXLEND` dispatch key. */
82
+ export declare const parseFraxlendPairKey: (lender: string) => {
83
+ chainId: string;
84
+ pair: string;
85
+ } | undefined;
@@ -37,3 +37,4 @@ export * from './dss';
37
37
  export * from './llamalend';
38
38
  export * from './resupply';
39
39
  export * from './curvance';
40
+ export * from './fraxlend';
@@ -4,3 +4,77 @@ export type ListaNativeProviderType = {
4
4
  };
5
5
  };
6
6
  export declare const listaNativeProvider: () => ListaNativeProviderType;
7
+ /**
8
+ * SHAPE of a per-market Lista collateral provider.
9
+ *
10
+ * Moolah gates collateral behind `providers(id, collateralToken)`: when it is
11
+ * non-zero, only that contract may `supplyCollateral` / `withdrawCollateral`
12
+ * (and on withdraw the receiver must be the provider itself). Two INCOMPATIBLE
13
+ * shapes are deployed and nothing on-chain announces which one an address is:
14
+ *
15
+ * - `erc20` — forwards Moolah's own selectors verbatim and takes the
16
+ * collateral token itself (the slisBNB provider).
17
+ * - `native` — the chain-level provider from `listaNativeProvider()`: same
18
+ * selectors plus WBNB/WETH-native variants.
19
+ * - `smart-lp` — Lista's `SmartProvider`. A DIFFERENT ABI: it zaps a two-coin
20
+ * StableSwap pool, so the inputs are the POOL COINS, not the
21
+ * collateral token — which is `onlyMoolah`-transferable and can
22
+ * never be held or approved by a user.
23
+ *
24
+ * Encoding one shape for the other calls a selector the contract does not
25
+ * implement, i.e. an empty revert. Callers therefore resolve the shape here and
26
+ * must FAIL CLOSED on a provider that is absent.
27
+ */
28
+ export type ListaCollateralProviderKind = 'erc20' | 'native' | 'smart-lp';
29
+ export type ListaSmartLpCoin = {
30
+ address: string;
31
+ symbol: string;
32
+ decimals: number;
33
+ /** the pool holds the chain's native coin behind the 0xEeee… sentinel */
34
+ isNative: boolean;
35
+ };
36
+ export type ListaCollateralProvider = {
37
+ kind: ListaCollateralProviderKind;
38
+ collateralToken: string;
39
+ collateralSymbol: string;
40
+ collateralDecimals: number;
41
+ /** `smart-lp` only — the StableSwap pool the provider zaps through */
42
+ dex?: string;
43
+ /** `smart-lp` only — the pool's info/quoting contract */
44
+ dexInfo?: string;
45
+ /** `smart-lp` only — the pool's LP token (1:1 with the collateral receipt) */
46
+ dexLp?: string;
47
+ /**
48
+ * `smart-lp` only — pool coin order, which comes from `dex.coins(i)` and
49
+ * NOT from the collateral symbol: "USDT & USDe-SmartLP" is `[USDe, USDT]`.
50
+ */
51
+ coins?: [ListaSmartLpCoin, ListaSmartLpCoin];
52
+ };
53
+ /** chainId -> provider address (lowercase) -> shape */
54
+ export type ListaCollateralProvidersType = {
55
+ [chainId: string]: {
56
+ [provider: string]: ListaCollateralProvider;
57
+ };
58
+ };
59
+ export declare const listaCollateralProviders: () => ListaCollateralProvidersType;
60
+ /**
61
+ * Resolve a provider address (as returned live by the Lista lens on
62
+ * `params.market.collateralProvider`) to its shape. `undefined` means the
63
+ * roster has never seen it — treat that as UNSUPPORTED, never as
64
+ * "assume Morpho-shaped".
65
+ */
66
+ export declare const listaCollateralProvider: (chainId: string | number, provider: string | undefined) => ListaCollateralProvider | undefined;
67
+ /**
68
+ * Reverse lookup: the SmartLP provider serving a given collateral token, with
69
+ * its own address folded in.
70
+ *
71
+ * Callers that hold a market's `collateralProvider` should use
72
+ * {@link listaCollateralProvider} — it is authoritative. This exists for the
73
+ * paths that only know the ASSET (routing decisions taken before market data
74
+ * is fetched, e.g. "can the direct route pay this market with USDT?").
75
+ */
76
+ export declare const listaSmartLpByCollateral: (chainId: string | number, collateralToken: string | undefined) => (ListaCollateralProvider & {
77
+ address: string;
78
+ }) | undefined;
79
+ /** Is `asset` one of the provider's two pool coins, or its LP token? */
80
+ export declare const isListaSmartLpAsset: (entry: ListaCollateralProvider, asset: string) => boolean;
@@ -33,11 +33,12 @@ import type { FrankencoinConfigType, FrankencoinMarketsType } from './frankencoi
33
33
  import type { GearboxResolversType } from './gearbox';
34
34
  import type { InitConfigType } from './initProtocol';
35
35
  import type { InverseConfigType, InverseMarketsType } from './inverse';
36
- import type { ListaNativeProviderType } from './lista';
36
+ import type { ListaCollateralProvidersType, ListaNativeProviderType } from './lista';
37
37
  import type { LiquityConfigType, LiquityMarketsType } from './liquity';
38
38
  import type { LlamaLendConfigType, LlamaLendMarketsType } from './llamalend';
39
39
  import type { MidnightConfigType, MidnightMarketsType } from './midnight';
40
40
  import type { MorphoBundler3Type, MorphoOracles, MorphoPoolsType, MorphoTypeMarkets, MorphoTypeOracles, MorphoTypeVaultsType } from './morpho';
41
+ import type { FraxlendConfigType } from './fraxlend';
41
42
  import type { ResupplyConfigType } from './resupply';
42
43
  import type { RiverConfigType, RiverMarketsType } from './river';
43
44
  import type { SiloMarketsType, SiloPeripheralsType } from './silo';
@@ -78,6 +79,7 @@ export interface GlobalLenderDataRegistry {
78
79
  morphoBundler3: MorphoBundler3Type;
79
80
  initConfig: InitConfigType;
80
81
  listaNativeProvider: ListaNativeProviderType;
82
+ listaCollateralProviders: ListaCollateralProvidersType;
81
83
  midnightConfig: MidnightConfigType;
82
84
  midnightMarkets: MidnightMarketsType;
83
85
  termConfig: TermConfigType;
@@ -103,6 +105,7 @@ export interface GlobalLenderDataRegistry {
103
105
  llamaLendMarkets: LlamaLendMarketsType;
104
106
  resupplyConfig: ResupplyConfigType;
105
107
  curvanceConfig: CurvanceConfigType;
108
+ fraxlendConfig: FraxlendConfigType;
106
109
  eulerConfigs: EulerConfigsType;
107
110
  eulerVaults: EulerVaultsType;
108
111
  dolomiteConfigs: DolomiteConfigsType;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.0.42",
7
+ "version": "0.0.44",
8
8
  "description": "Hold and initialize lending protocol data across a stack",
9
9
  "files": [
10
10
  "dist"