@1delta/data-sdk 0.0.42 → 0.0.43

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
@@ -94,6 +94,7 @@ var LENDER_DATA_DEFAULTS = () => ({
94
94
  llamaLendMarkets: {},
95
95
  resupplyConfig: {},
96
96
  curvanceConfig: {},
97
+ fraxlendConfig: {},
97
98
  eulerConfigs: {},
98
99
  eulerVaults: {},
99
100
  dolomiteConfigs: {},
@@ -710,6 +711,123 @@ var curvancePositionManager = (lender, chainId, marketManager, kind) => {
710
711
  return pms.simplePositionManager ?? pms.vaultPositionManager ?? pms.nativeVaultPositionManager ?? pms.pendlePtPositionManager;
711
712
  };
712
713
 
714
+ // src/lending/fraxlend.ts
715
+ var FRAXLEND_ETHEREUM_CONFIG = {
716
+ deployer: "0xD6E9D27C75Afd88ad24Cd5EdccdC76fd2fc3A751",
717
+ /**
718
+ * `0xA49fD918…` — approved on exactly 3 of the 71 pairs (the 95 % LTV
719
+ * yield-bearing-stablecoin carry markets, flagged below). It is NOT an
720
+ * aggregator router: on those pairs the collateral is an ERC-4626 over the
721
+ * pair's own asset, so the "swap" is a vault deposit and `path` is just
722
+ * `[asset, collateral]`.
723
+ *
724
+ * The legacy 2022 grants (`0xc14d5506…` = FraxswapRouterV2, `0x1c6ca5de…`)
725
+ * sit only on dead FraxlendV1 pairs and are deliberately not carried here.
726
+ */
727
+ leverageSwapper: "0xA49fD918238b1a7003659138Fb91f194306B595b",
728
+ pairs: [
729
+ // --- the book: 62 % of supply, 69 % of borrows, and NO swapper ---
730
+ {
731
+ address: "0xaB3cb84c310186B2Fa4B4503624A5D90b5DcB22D",
732
+ symbol: "ffrxUSD(sfrxETH)-58",
733
+ label: "frxUSD / sfrxETH"
734
+ },
735
+ {
736
+ address: "0x78bB3aEC3d855431bd9289fD98dA13F9ebB7ef15",
737
+ symbol: "fFRAX(sfrxETH)-16",
738
+ label: "FRAX / sfrxETH"
739
+ },
740
+ // --- LEVERAGE-ENABLED (swapper approved at curation; still probe live) ---
741
+ {
742
+ address: "0xC045A53936D793839BFCA146058976ef4285161E",
743
+ symbol: "ffrxUSD(sfrxUSD)-69",
744
+ label: "frxUSD / sfrxUSD"
745
+ },
746
+ {
747
+ address: "0x28Cdf6Ce79702AAeFbF217cF98cbD11f5639B9f1",
748
+ symbol: "ffrxUSD(sUSDe)-59",
749
+ label: "frxUSD / sUSDe"
750
+ },
751
+ {
752
+ address: "0x8087346b8865e5B0bF9F8A49742c2D83f6a50a6c",
753
+ symbol: "ffrxUSD(scrvUSD)-61",
754
+ label: "frxUSD / scrvUSD"
755
+ },
756
+ // --- the rest of the listed set ---
757
+ {
758
+ address: "0x470c677AF6CCE089ac38245332BfA03b22b4caeD",
759
+ symbol: "ffrxUSD(WFRAX)-68",
760
+ label: "frxUSD / WFRAX"
761
+ },
762
+ {
763
+ // A Frax BOND collateral with a real maturity, and it sits at ~100 %
764
+ // utilization — withdrawals will revert on liquidity, which is a
765
+ // supply-side UX problem, not a config error.
766
+ address: "0x1c0C222989a37247D974937782cebc8bF4f25733",
767
+ symbol: "fFRAX(FXB_20261231)-24",
768
+ label: "FRAX / FXB Dec-2026"
769
+ },
770
+ {
771
+ address: "0x8E5f09de0cD7841239410F929A905E214443d9E0",
772
+ symbol: "ffrxUSD(WBTC)-62",
773
+ label: "frxUSD / WBTC"
774
+ },
775
+ {
776
+ address: "0xb5a46f712F03808aE5c4B885C6F598fA06442684",
777
+ symbol: "fFRAX(wstETH)-28",
778
+ label: "FRAX / wstETH"
779
+ },
780
+ {
781
+ address: "0xc6CadA314389430d396C7b0C70c6281e99ca7fe8",
782
+ symbol: "fFRAX(UNI)-19",
783
+ label: "FRAX / UNI"
784
+ },
785
+ {
786
+ address: "0xb5Ae5b75C0DF5632c572A657109375646Ce66f90",
787
+ symbol: "fFRAX(sUSDe)-31",
788
+ label: "FRAX / sUSDe"
789
+ },
790
+ {
791
+ address: "0xA201E7bBb7Ca60ab88514d12dD91fC6748E6D050",
792
+ symbol: "ffrxUSD(srRoyUSDC)-70",
793
+ label: "frxUSD / srRoyUSDC"
794
+ },
795
+ {
796
+ address: "0x7093F6141293F7C4F67E5efD922aC934402E452d",
797
+ symbol: "fFRAX(LINK)-27",
798
+ label: "FRAX / LINK"
799
+ }
800
+ ]
801
+ };
802
+ var FRAXLEND_BUILTIN = {
803
+ FRAXLEND: { "1": FRAXLEND_ETHEREUM_CONFIG }
804
+ };
805
+ var fraxlendConfig = () => getGlobalData2()?.fraxlendConfig;
806
+ var fraxlendConfigFor = (lender, chainId) => {
807
+ const published = getGlobalData2()?.fraxlendConfig?.[lender]?.[String(chainId)];
808
+ if (published?.pairs?.length) return published;
809
+ return FRAXLEND_BUILTIN[lender]?.[String(chainId)];
810
+ };
811
+ var fraxlendLendersByChain = (chainId) => {
812
+ const chain = String(chainId);
813
+ const cfg = getGlobalData2()?.fraxlendConfig ?? {};
814
+ const keys = /* @__PURE__ */ new Set();
815
+ for (const lender of Object.keys(cfg)) {
816
+ if (cfg[lender]?.[chain]?.pairs?.length) keys.add(lender);
817
+ }
818
+ for (const lender of Object.keys(FRAXLEND_BUILTIN)) {
819
+ if (FRAXLEND_BUILTIN[lender]?.[chain]?.pairs?.length) keys.add(lender);
820
+ }
821
+ return [...keys];
822
+ };
823
+ var fraxlendPairsFor = (lender, chainId) => fraxlendConfigFor(lender, chainId)?.pairs ?? [];
824
+ var fraxlendPairKey = (chainId, pair) => `FRAXLEND_${String(chainId)}_${pair.toLowerCase()}`;
825
+ var parseFraxlendPairKey = (lender) => {
826
+ const m = /^FRAXLEND_(\d+)_(0x[0-9a-fA-F]{40})$/.exec(lender);
827
+ if (!m) return void 0;
828
+ return { chainId: m[1], pair: m[2].toLowerCase() };
829
+ };
830
+
713
831
  // src/tokens.ts
714
832
  var getListUrl = (chainId) => `https://raw.githubusercontent.com/1delta-DAO/token-lists/main/${chainId}.json`;
715
833
  async function fetchTokenList(chainId) {
@@ -742,6 +860,7 @@ async function fetchMainTokensMap() {
742
860
  }
743
861
 
744
862
  exports.CURVANCE_MONAD_CONFIG = CURVANCE_MONAD_CONFIG;
863
+ exports.FRAXLEND_ETHEREUM_CONFIG = FRAXLEND_ETHEREUM_CONFIG;
745
864
  exports.GEARBOX_ACCOUNT_COMPRESSOR_V310 = GEARBOX_ACCOUNT_COMPRESSOR_V310;
746
865
  exports.RESUPPLY_ETHEREUM_CONFIG = RESUPPLY_ETHEREUM_CONFIG;
747
866
  exports.aaveOracles = aaveOracles;
@@ -803,6 +922,11 @@ exports.frankencoinConfigFor = frankencoinConfigFor;
803
922
  exports.frankencoinLendersByChain = frankencoinLendersByChain;
804
923
  exports.frankencoinMarketByPosition = frankencoinMarketByPosition;
805
924
  exports.frankencoinMarkets = frankencoinMarkets;
925
+ exports.fraxlendConfig = fraxlendConfig;
926
+ exports.fraxlendConfigFor = fraxlendConfigFor;
927
+ exports.fraxlendLendersByChain = fraxlendLendersByChain;
928
+ exports.fraxlendPairKey = fraxlendPairKey;
929
+ exports.fraxlendPairsFor = fraxlendPairsFor;
806
930
  exports.gearboxAccountCompressor = gearboxAccountCompressor;
807
931
  exports.gearboxAddressProviderV310 = gearboxAddressProviderV310;
808
932
  exports.gearboxBotListV3 = gearboxBotListV3;
@@ -859,6 +983,7 @@ exports.morphoTypeMarkets = morphoTypeMarkets;
859
983
  exports.morphoTypeOracles = morphoTypeOracles;
860
984
  exports.morphoTypeVaults = morphoTypeVaults;
861
985
  exports.parseAaveV4SpokeLenderKey = parseAaveV4SpokeLenderKey;
986
+ exports.parseFraxlendPairKey = parseFraxlendPairKey;
862
987
  exports.parseGearboxV3LenderKey = parseGearboxV3LenderKey;
863
988
  exports.parseLlamaLendLenderKey = parseLlamaLendLenderKey;
864
989
  exports.parseSiloV2LenderKey = parseSiloV2LenderKey;
package/dist/index.mjs CHANGED
@@ -92,6 +92,7 @@ var LENDER_DATA_DEFAULTS = () => ({
92
92
  llamaLendMarkets: {},
93
93
  resupplyConfig: {},
94
94
  curvanceConfig: {},
95
+ fraxlendConfig: {},
95
96
  eulerConfigs: {},
96
97
  eulerVaults: {},
97
98
  dolomiteConfigs: {},
@@ -708,6 +709,123 @@ var curvancePositionManager = (lender, chainId, marketManager, kind) => {
708
709
  return pms.simplePositionManager ?? pms.vaultPositionManager ?? pms.nativeVaultPositionManager ?? pms.pendlePtPositionManager;
709
710
  };
710
711
 
712
+ // src/lending/fraxlend.ts
713
+ var FRAXLEND_ETHEREUM_CONFIG = {
714
+ deployer: "0xD6E9D27C75Afd88ad24Cd5EdccdC76fd2fc3A751",
715
+ /**
716
+ * `0xA49fD918…` — approved on exactly 3 of the 71 pairs (the 95 % LTV
717
+ * yield-bearing-stablecoin carry markets, flagged below). It is NOT an
718
+ * aggregator router: on those pairs the collateral is an ERC-4626 over the
719
+ * pair's own asset, so the "swap" is a vault deposit and `path` is just
720
+ * `[asset, collateral]`.
721
+ *
722
+ * The legacy 2022 grants (`0xc14d5506…` = FraxswapRouterV2, `0x1c6ca5de…`)
723
+ * sit only on dead FraxlendV1 pairs and are deliberately not carried here.
724
+ */
725
+ leverageSwapper: "0xA49fD918238b1a7003659138Fb91f194306B595b",
726
+ pairs: [
727
+ // --- the book: 62 % of supply, 69 % of borrows, and NO swapper ---
728
+ {
729
+ address: "0xaB3cb84c310186B2Fa4B4503624A5D90b5DcB22D",
730
+ symbol: "ffrxUSD(sfrxETH)-58",
731
+ label: "frxUSD / sfrxETH"
732
+ },
733
+ {
734
+ address: "0x78bB3aEC3d855431bd9289fD98dA13F9ebB7ef15",
735
+ symbol: "fFRAX(sfrxETH)-16",
736
+ label: "FRAX / sfrxETH"
737
+ },
738
+ // --- LEVERAGE-ENABLED (swapper approved at curation; still probe live) ---
739
+ {
740
+ address: "0xC045A53936D793839BFCA146058976ef4285161E",
741
+ symbol: "ffrxUSD(sfrxUSD)-69",
742
+ label: "frxUSD / sfrxUSD"
743
+ },
744
+ {
745
+ address: "0x28Cdf6Ce79702AAeFbF217cF98cbD11f5639B9f1",
746
+ symbol: "ffrxUSD(sUSDe)-59",
747
+ label: "frxUSD / sUSDe"
748
+ },
749
+ {
750
+ address: "0x8087346b8865e5B0bF9F8A49742c2D83f6a50a6c",
751
+ symbol: "ffrxUSD(scrvUSD)-61",
752
+ label: "frxUSD / scrvUSD"
753
+ },
754
+ // --- the rest of the listed set ---
755
+ {
756
+ address: "0x470c677AF6CCE089ac38245332BfA03b22b4caeD",
757
+ symbol: "ffrxUSD(WFRAX)-68",
758
+ label: "frxUSD / WFRAX"
759
+ },
760
+ {
761
+ // A Frax BOND collateral with a real maturity, and it sits at ~100 %
762
+ // utilization — withdrawals will revert on liquidity, which is a
763
+ // supply-side UX problem, not a config error.
764
+ address: "0x1c0C222989a37247D974937782cebc8bF4f25733",
765
+ symbol: "fFRAX(FXB_20261231)-24",
766
+ label: "FRAX / FXB Dec-2026"
767
+ },
768
+ {
769
+ address: "0x8E5f09de0cD7841239410F929A905E214443d9E0",
770
+ symbol: "ffrxUSD(WBTC)-62",
771
+ label: "frxUSD / WBTC"
772
+ },
773
+ {
774
+ address: "0xb5a46f712F03808aE5c4B885C6F598fA06442684",
775
+ symbol: "fFRAX(wstETH)-28",
776
+ label: "FRAX / wstETH"
777
+ },
778
+ {
779
+ address: "0xc6CadA314389430d396C7b0C70c6281e99ca7fe8",
780
+ symbol: "fFRAX(UNI)-19",
781
+ label: "FRAX / UNI"
782
+ },
783
+ {
784
+ address: "0xb5Ae5b75C0DF5632c572A657109375646Ce66f90",
785
+ symbol: "fFRAX(sUSDe)-31",
786
+ label: "FRAX / sUSDe"
787
+ },
788
+ {
789
+ address: "0xA201E7bBb7Ca60ab88514d12dD91fC6748E6D050",
790
+ symbol: "ffrxUSD(srRoyUSDC)-70",
791
+ label: "frxUSD / srRoyUSDC"
792
+ },
793
+ {
794
+ address: "0x7093F6141293F7C4F67E5efD922aC934402E452d",
795
+ symbol: "fFRAX(LINK)-27",
796
+ label: "FRAX / LINK"
797
+ }
798
+ ]
799
+ };
800
+ var FRAXLEND_BUILTIN = {
801
+ FRAXLEND: { "1": FRAXLEND_ETHEREUM_CONFIG }
802
+ };
803
+ var fraxlendConfig = () => getGlobalData2()?.fraxlendConfig;
804
+ var fraxlendConfigFor = (lender, chainId) => {
805
+ const published = getGlobalData2()?.fraxlendConfig?.[lender]?.[String(chainId)];
806
+ if (published?.pairs?.length) return published;
807
+ return FRAXLEND_BUILTIN[lender]?.[String(chainId)];
808
+ };
809
+ var fraxlendLendersByChain = (chainId) => {
810
+ const chain = String(chainId);
811
+ const cfg = getGlobalData2()?.fraxlendConfig ?? {};
812
+ const keys = /* @__PURE__ */ new Set();
813
+ for (const lender of Object.keys(cfg)) {
814
+ if (cfg[lender]?.[chain]?.pairs?.length) keys.add(lender);
815
+ }
816
+ for (const lender of Object.keys(FRAXLEND_BUILTIN)) {
817
+ if (FRAXLEND_BUILTIN[lender]?.[chain]?.pairs?.length) keys.add(lender);
818
+ }
819
+ return [...keys];
820
+ };
821
+ var fraxlendPairsFor = (lender, chainId) => fraxlendConfigFor(lender, chainId)?.pairs ?? [];
822
+ var fraxlendPairKey = (chainId, pair) => `FRAXLEND_${String(chainId)}_${pair.toLowerCase()}`;
823
+ var parseFraxlendPairKey = (lender) => {
824
+ const m = /^FRAXLEND_(\d+)_(0x[0-9a-fA-F]{40})$/.exec(lender);
825
+ if (!m) return void 0;
826
+ return { chainId: m[1], pair: m[2].toLowerCase() };
827
+ };
828
+
711
829
  // src/tokens.ts
712
830
  var getListUrl = (chainId) => `https://raw.githubusercontent.com/1delta-DAO/token-lists/main/${chainId}.json`;
713
831
  async function fetchTokenList(chainId) {
@@ -739,4 +857,4 @@ async function fetchMainTokensMap() {
739
857
  return await data.json();
740
858
  }
741
859
 
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 };
860
+ 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, 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, 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';
@@ -38,6 +38,7 @@ 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';
@@ -103,6 +104,7 @@ export interface GlobalLenderDataRegistry {
103
104
  llamaLendMarkets: LlamaLendMarketsType;
104
105
  resupplyConfig: ResupplyConfigType;
105
106
  curvanceConfig: CurvanceConfigType;
107
+ fraxlendConfig: FraxlendConfigType;
106
108
  eulerConfigs: EulerConfigsType;
107
109
  eulerVaults: EulerVaultsType;
108
110
  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.43",
8
8
  "description": "Hold and initialize lending protocol data across a stack",
9
9
  "files": [
10
10
  "dist"