diff --git a/src/config/ab.ts b/src/config/ab.ts index 4637e07602..c4b4f71b78 100644 --- a/src/config/ab.ts +++ b/src/config/ab.ts @@ -11,6 +11,7 @@ type AbStorage = { const abFlagsConfig = { // testExampleAb: 0.5, + testMoreMarkets: 0.5, }; export type AbFlag = string; //keyof typeof abFlagsConfig; diff --git a/src/config/static/markets.ts b/src/config/static/markets.ts index 8024ab9114..6030df0dad 100644 --- a/src/config/static/markets.ts +++ b/src/config/static/markets.ts @@ -8,6 +8,7 @@ import { parse } from "date-fns"; import { ARBITRUM, AVALANCHE, AVALANCHE_FUJI } from "./chains"; +import { getIsFlagEnabled } from "config/ab"; const p = (date: string) => parse(date, "dd MMM yyyy", new Date()); @@ -532,6 +533,517 @@ export const MARKETS: Record> = { longTokenAddress: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", }, + + // ------ DUPLICATED MARKETS ------ + + // BTC/USD [WBTC.e-USDC] + ...(getIsFlagEnabled("testMoreMarkets") + ? { + "1-0x47c031236e19d024b42f8AE6780E44A573170703": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0x47c031236e19d024b42f8AE6780E44A573170703", + indexTokenAddress: "0x47904963fc8b2340414262125aF798B9655E58Cd", + longTokenAddress: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // ETH/USD [WETH-USDC] + "1-0x70d95587d40A2caf56bd97485aB3Eec10Bee6336": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0x70d95587d40A2caf56bd97485aB3Eec10Bee6336", + indexTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // DOGE/USD [WETH-USDC] + "1-0x6853EA96FF216fAb11D2d930CE3C508556A4bdc4": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0x6853EA96FF216fAb11D2d930CE3C508556A4bdc4", + indexTokenAddress: "0xC4da4c24fd591125c3F47b340b6f4f76111883d8", + longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // SOL/USD [SOL-USDC] + "1-0x09400D9DB990D5ed3f35D7be61DfAEB900Af03C9": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0x09400D9DB990D5ed3f35D7be61DfAEB900Af03C9", + indexTokenAddress: "0x2bcC6D6CdBbDC0a4071e48bb3B969b06B3330c07", + longTokenAddress: "0x2bcC6D6CdBbDC0a4071e48bb3B969b06B3330c07", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // LTC/USD [WETH-USDC] + "1-0xD9535bB5f58A1a75032416F2dFe7880C30575a41": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0xD9535bB5f58A1a75032416F2dFe7880C30575a41", + indexTokenAddress: "0xB46A094Bc4B0adBD801E14b9DB95e05E28962764", + longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // UNI/USD [UNI-USDC] + "1-0xc7Abb2C5f3BF3CEB389dF0Eecd6120D451170B50": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0xc7Abb2C5f3BF3CEB389dF0Eecd6120D451170B50", + indexTokenAddress: "0xFa7F8980b0f1E64A2062791cc3b0871572f1F7f0", + longTokenAddress: "0xFa7F8980b0f1E64A2062791cc3b0871572f1F7f0", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // LINK/USD [LINK-USDC] + "1-0x7f1fa204bb700853D36994DA19F830b6Ad18455C": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0x7f1fa204bb700853D36994DA19F830b6Ad18455C", + indexTokenAddress: "0xf97f4df75117a78c1A5a0DBb814Af92458539FB4", + longTokenAddress: "0xf97f4df75117a78c1A5a0DBb814Af92458539FB4", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // ARB/USD [ARB-USDC] + "1-0xC25cEf6061Cf5dE5eb761b50E4743c1F5D7E5407": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0xC25cEf6061Cf5dE5eb761b50E4743c1F5D7E5407", + indexTokenAddress: "0x912CE59144191C1204E64559FE8253a0e49E6548", + longTokenAddress: "0x912CE59144191C1204E64559FE8253a0e49E6548", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // SWAP-ONLY [USDC-USDC.e] + "1-0x9C2433dFD71096C435Be9465220BB2B189375eA7": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0x9C2433dFD71096C435Be9465220BB2B189375eA7", + indexTokenAddress: "0x0000000000000000000000000000000000000000", + longTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + shortTokenAddress: "0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8", + }, + // SWAP-ONLY [USDC-USDT] + "1-0xB686BcB112660343E6d15BDb65297e110C8311c4": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0xB686BcB112660343E6d15BDb65297e110C8311c4", + indexTokenAddress: "0x0000000000000000000000000000000000000000", + longTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + shortTokenAddress: "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9", + }, + // SWAP-ONLY [USDC-DAI] + "1-0xe2fEDb9e6139a182B98e7C2688ccFa3e9A53c665": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0xe2fEDb9e6139a182B98e7C2688ccFa3e9A53c665", + indexTokenAddress: "0x0000000000000000000000000000000000000000", + longTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + shortTokenAddress: "0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1", + }, + // XRP/USD [WETH-USDC] + "1-0x0CCB4fAa6f1F1B30911619f1184082aB4E25813c": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0x0CCB4fAa6f1F1B30911619f1184082aB4E25813c", + indexTokenAddress: "0xc14e065b0067dE91534e032868f5Ac6ecf2c6868", + longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // BNB/USD [BNB-USDC] + "1-0x2d340912Aa47e33c90Efb078e69E70EFe2B34b9B": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0x2d340912Aa47e33c90Efb078e69E70EFe2B34b9B", + indexTokenAddress: "0xa9004A5421372E1D83fB1f85b0fc986c912f91f3", + longTokenAddress: "0xa9004A5421372E1D83fB1f85b0fc986c912f91f3", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // AAVE [AAVE-USDC] + "1-0x1CbBa6346F110c8A5ea739ef2d1eb182990e4EB2": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0x1CbBa6346F110c8A5ea739ef2d1eb182990e4EB2", + indexTokenAddress: "0xba5DdD1f9d7F570dc94a51479a000E3BCE967196", + longTokenAddress: "0xba5DdD1f9d7F570dc94a51479a000E3BCE967196", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // ATOM [WETH-USDC] + "1-0x248C35760068cE009a13076D573ed3497A47bCD4": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0x248C35760068cE009a13076D573ed3497A47bCD4", + indexTokenAddress: "0x7D7F1765aCbaF847b9A1f7137FE8Ed4931FbfEbA", + longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // NEAR [WETH-USDC] + "1-0x63Dc80EE90F26363B3FCD609007CC9e14c8991BE": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0x63Dc80EE90F26363B3FCD609007CC9e14c8991BE", + indexTokenAddress: "0x1FF7F3EFBb9481Cbd7db4F932cBCD4467144237C", + longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // AVAX [WAVAX-USDC] + "1-0x7BbBf946883a5701350007320F525c5379B8178A": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0x7BbBf946883a5701350007320F525c5379B8178A", + indexTokenAddress: "0x565609fAF65B92F7be02468acF86f8979423e514", + longTokenAddress: "0x565609fAF65B92F7be02468acF86f8979423e514", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // OP [OP-USDC] + "1-0x4fDd333FF9cA409df583f306B6F5a7fFdE790739": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0x4fDd333FF9cA409df583f306B6F5a7fFdE790739", + indexTokenAddress: "0xaC800FD6159c2a2CB8fC31EF74621eB430287a5A", + longTokenAddress: "0xaC800FD6159c2a2CB8fC31EF74621eB430287a5A", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // BTC/USD [WBTC.e-WBTC.e] + "1-0x7C11F78Ce78768518D743E81Fdfa2F860C6b9A77": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0x7C11F78Ce78768518D743E81Fdfa2F860C6b9A77", + indexTokenAddress: "0x47904963fc8b2340414262125aF798B9655E58Cd", + longTokenAddress: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", + shortTokenAddress: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", + }, + // ETH/USD [WETH-WETH] + "1-0x450bb6774Dd8a756274E0ab4107953259d2ac541": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0x450bb6774Dd8a756274E0ab4107953259d2ac541", + indexTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + shortTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + }, + // GMX/USD [GMX-USDC] + "1-0x55391D178Ce46e7AC8eaAEa50A72D1A5a8A622Da": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0x55391D178Ce46e7AC8eaAEa50A72D1A5a8A622Da", + indexTokenAddress: "0xfc5A1A6EB076a2C7aD06eD22C90d7E710E35ad0a", + longTokenAddress: "0xfc5A1A6EB076a2C7aD06eD22C90d7E710E35ad0a", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // PEPE [PEPE-USDC] + "1-0x2b477989A149B17073D9C9C82eC9cB03591e20c6": { + enabled: true, + listingDate: p("17 Jul 2024"), + marketTokenAddress: "0x2b477989A149B17073D9C9C82eC9cB03591e20c6", + indexTokenAddress: "0x25d887Ce7a35172C62FeBFD67a1856F20FaEbB00", + longTokenAddress: "0x25d887Ce7a35172C62FeBFD67a1856F20FaEbB00", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // WIF [WIF-USDC] + "1-0x0418643F94Ef14917f1345cE5C460C37dE463ef7": { + enabled: true, + listingDate: p("17 Jul 2024"), + marketTokenAddress: "0x0418643F94Ef14917f1345cE5C460C37dE463ef7", + indexTokenAddress: "0xA1b91fe9FD52141Ff8cac388Ce3F10BFDc1dE79d", + longTokenAddress: "0xA1b91fe9FD52141Ff8cac388Ce3F10BFDc1dE79d", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // ETH/USD [wstETH-USDe] + "1-0x0Cf1fb4d1FF67A3D8Ca92c9d6643F8F9be8e03E5": { + enabled: true, + listingDate: p("31 Jul 2024"), + marketTokenAddress: "0x0Cf1fb4d1FF67A3D8Ca92c9d6643F8F9be8e03E5", + indexTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + longTokenAddress: "0x5979D7b546E38E414F7E9822514be443A4800529", + shortTokenAddress: "0x5d3a1Ff2b6BAb83b63cd9AD0787074081a52ef34", + }, + // SWAP-ONLY [wstETH-WETH] + "1-0xb56E5E2eB50cf5383342914b0C85Fe62DbD861C8": { + enabled: true, + listingDate: p("31 Jul 2024"), + marketTokenAddress: "0xb56E5E2eB50cf5383342914b0C85Fe62DbD861C8", + indexTokenAddress: "0x0000000000000000000000000000000000000000", + longTokenAddress: "0x5979D7b546E38E414F7E9822514be443A4800529", + shortTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + }, + // SWAP-ONLY [USDe-USDC] + "1-0x45aD16Aaa28fb66Ef74d5ca0Ab9751F2817c81a4": { + enabled: true, + listingDate: p("31 Jul 2024"), + marketTokenAddress: "0x45aD16Aaa28fb66Ef74d5ca0Ab9751F2817c81a4", + indexTokenAddress: "0x0000000000000000000000000000000000000000", + longTokenAddress: "0x5d3a1Ff2b6BAb83b63cd9AD0787074081a52ef34", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // SHIB/USD [WETH-USDC] + "1-0xB62369752D8Ad08392572db6d0cc872127888beD": { + enabled: true, + listingDate: p("7 Aug 2024"), + marketTokenAddress: "0xB62369752D8Ad08392572db6d0cc872127888beD", + indexTokenAddress: "0x3E57D02f9d196873e55727382974b02EdebE6bfd", + longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // STX/USD [wBTC-USDC] + "1-0xD9377d9B9a2327C7778867203deeA73AB8a68b6B": { + enabled: true, + listingDate: p("14 Aug 2024"), + marketTokenAddress: "0xD9377d9B9a2327C7778867203deeA73AB8a68b6B", + indexTokenAddress: "0xBaf07cF91D413C0aCB2b7444B9Bf13b4e03c9D71", + longTokenAddress: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // ORDI/USD [wBTC-USDC] + "1-0x93385F7C646A3048051914BDFaC25F4d620aeDF1": { + enabled: true, + listingDate: p("14 Aug 2024"), + marketTokenAddress: "0x93385F7C646A3048051914BDFaC25F4d620aeDF1", + indexTokenAddress: "0x1E15d08f3CA46853B692EE28AE9C7a0b88a9c994", + longTokenAddress: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // BTC/USD [tBTC] + "1-0xd62068697bCc92AF253225676D618B0C9f17C663": { + enabled: true, + listingDate: p("11 Sep 2024"), + marketTokenAddress: "0xd62068697bCc92AF253225676D618B0C9f17C663", + indexTokenAddress: "0x47904963fc8b2340414262125aF798B9655E58Cd", + longTokenAddress: "0x6c84a8f1c29108F47a79964b5Fe888D4f4D0dE40", + shortTokenAddress: "0x6c84a8f1c29108F47a79964b5Fe888D4f4D0dE40", + }, + // EIGEN/USD [WETH-USDC] + "1-0xD4b737892baB8446Ea1e8Bb901db092fb1EC1791": { + enabled: true, + listingDate: p("10 Oct 2024"), + marketTokenAddress: "0xD4b737892baB8446Ea1e8Bb901db092fb1EC1791", + indexTokenAddress: "0x606C3e5075e5555e79Aa15F1E9FACB776F96C248", + longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // SATS/USD [WBTC-USDC] + "1-0x8ea4Fb801493DaD8724F90Fb2e279534fa591366": { + enabled: true, + listingDate: p("10 Oct 2024"), + marketTokenAddress: "0x8ea4Fb801493DaD8724F90Fb2e279534fa591366", + indexTokenAddress: "0x2cD2eB61D17b78239Fcd19aafF72981B5D5eF319", + longTokenAddress: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // POL/USD [ETH-USDC] + "1-0xD0a1AFDDE31Eb51e8b53bdCE989EB8C2404828a4": { + enabled: true, + listingDate: p("17 Oct 2024"), + marketTokenAddress: "0xD0a1AFDDE31Eb51e8b53bdCE989EB8C2404828a4", + indexTokenAddress: "0x9c74772b713a1B032aEB173E28683D937E51921c", + longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // AAVE/USD [ETH-USDC] + "1-0x77B2eC357b56c7d05a87971dB0188DBb0C7836a5": { + enabled: true, + listingDate: p("17 Oct 2024"), + marketTokenAddress: "0x77B2eC357b56c7d05a87971dB0188DBb0C7836a5", + indexTokenAddress: "0xba5DdD1f9d7F570dc94a51479a000E3BCE967196", + longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // PEPE/USD [ETH-USDC] + "1-0x0Bb2a83F995E1E1eae9D7fDCE68Ab1ac55b2cc85": { + enabled: true, + listingDate: p("17 Oct 2024"), + marketTokenAddress: "0x0Bb2a83F995E1E1eae9D7fDCE68Ab1ac55b2cc85", + indexTokenAddress: "0x25d887Ce7a35172C62FeBFD67a1856F20FaEbB00", + longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // UNI/USD [ETH-USDC] + "1-0xD8471b9Ea126272E6d32B5e4782Ed76DB7E554a4": { + enabled: true, + listingDate: p("17 Oct 2024"), + marketTokenAddress: "0xD8471b9Ea126272E6d32B5e4782Ed76DB7E554a4", + indexTokenAddress: "0xFa7F8980b0f1E64A2062791cc3b0871572f1F7f0", + longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // APE/USD [APE-USDC] + "1-0xdAB21c4d1F569486334C93685Da2b3F9b0A078e8": { + enabled: true, + listingDate: p("24 Oct 2024"), + marketTokenAddress: "0xdAB21c4d1F569486334C93685Da2b3F9b0A078e8", + indexTokenAddress: "0x7f9FBf9bDd3F4105C478b996B648FE6e828a1e98", + longTokenAddress: "0x7f9FBf9bDd3F4105C478b996B648FE6e828a1e98", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // SUI/USD [WETH-USDC] + "1-0x6Ecf2133E2C9751cAAdCb6958b9654baE198a797": { + enabled: true, + listingDate: p("24 Oct 2024"), + marketTokenAddress: "0x6Ecf2133E2C9751cAAdCb6958b9654baE198a797", + indexTokenAddress: "0x197aa2DE1313c7AD50184234490E12409B2a1f95", + longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // SEI/USD [WETH-USDC] + "1-0xB489711B1cB86afDA48924730084e23310EB4883": { + enabled: true, + listingDate: p("24 Oct 2024"), + marketTokenAddress: "0xB489711B1cB86afDA48924730084e23310EB4883", + indexTokenAddress: "0x55e85A147a1029b985384822c0B2262dF8023452", + longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // APT/USD [WETH-USDC] + "1-0x66A69c8eb98A7efE22A22611d1967dfec786a708": { + enabled: true, + listingDate: p("31 Oct 2024"), + marketTokenAddress: "0x66A69c8eb98A7efE22A22611d1967dfec786a708", + indexTokenAddress: "0x3f8f0dCE4dCE4d0D1d0871941e79CDA82cA50d0B", + longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // TIA/USD [WETH-USDC] + "1-0xBeB1f4EBC9af627Ca1E5a75981CE1AE97eFeDA22": { + enabled: true, + listingDate: p("31 Oct 2024"), + marketTokenAddress: "0xBeB1f4EBC9af627Ca1E5a75981CE1AE97eFeDA22", + indexTokenAddress: "0x38676f62d166f5CE7De8433F51c6B3D6D9d66C19", + longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // TRX/USD [WETH-USDC] + "1-0x3680D7bFE9260D3c5DE81AEB2194c119a59A99D1": { + enabled: true, + listingDate: p("7 Nov 2024"), + marketTokenAddress: "0x3680D7bFE9260D3c5DE81AEB2194c119a59A99D1", + indexTokenAddress: "0xb06aa7E4af937C130dDade66f6ed7642716fe07A", + longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // TON/USD [WETH-USDC] + "1-0x15c6eBD4175ffF9EE3c2615c556fCf62D2d9499c": { + enabled: true, + listingDate: p("7 Nov 2024"), + marketTokenAddress: "0x15c6eBD4175ffF9EE3c2615c556fCf62D2d9499c", + indexTokenAddress: "0xB2f7cefaeEb08Aa347705ac829a7b8bE2FB560f3", + longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // WLD/USD [WETH-USDC] + "1-0x872b5D567a2469Ed92D252eaCB0EB3BB0769e05b": { + enabled: true, + listingDate: p("15 Nov 2024"), + marketTokenAddress: "0x872b5D567a2469Ed92D252eaCB0EB3BB0769e05b", + indexTokenAddress: "0x75B9AdD873641b253718810E6c65dB6d72311FD0", + longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // BONK/USD [WETH-USDC] + "1-0xFaC5fF56c269432706d47DC82Ab082E9AE7D989E": { + enabled: true, + listingDate: p("15 Nov 2024"), + marketTokenAddress: "0xFaC5fF56c269432706d47DC82Ab082E9AE7D989E", + indexTokenAddress: "0x1FD10E767187A92f0AB2ABDEEF4505e319cA06B2", + longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // TAO/USD [WBTC-USDC] + "1-0xe55e1A29985488A2c8846a91E925c2B7C6564db1": { + enabled: true, + listingDate: p("15 Nov 2024"), + marketTokenAddress: "0xe55e1A29985488A2c8846a91E925c2B7C6564db1", + indexTokenAddress: "0x938aef36CAaFbcB37815251B602168087eC14648", + longTokenAddress: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // BOME/USD [WBTC/USDC] + "1-0x71237F8C3d1484495A136022E16840b70fF84a69": { + enabled: true, + listingDate: p("21 Nov 2024"), + marketTokenAddress: "0x71237F8C3d1484495A136022E16840b70fF84a69", + indexTokenAddress: "0x3Eea56A1ccCdbfB70A26aD381C71Ee17E4c8A15F", + longTokenAddress: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // FLOKI/USD [WBTC/USDC] + "1-0xfD46a5702D4d97cE0164375744c65F0c31A3901b": { + enabled: true, + listingDate: p("21 Nov 2024"), + marketTokenAddress: "0xfD46a5702D4d97cE0164375744c65F0c31A3901b", + indexTokenAddress: "0x6792c5B8962ffbDD020c6b6FD0Be7b182e0e33a3", + longTokenAddress: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // MEME/USD [WBTC/USDC] + "1-0x6CB901Cc64c024C3Fe4404c940FF9a3Acc229D2C": { + enabled: true, + listingDate: p("21 Nov 2024"), + marketTokenAddress: "0x6CB901Cc64c024C3Fe4404c940FF9a3Acc229D2C", + indexTokenAddress: "0xaF770F03518686a365300ab35AD860e99967B2f0", + longTokenAddress: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // MEW/USD [WBTC/USDC] + "1-0x71B7fF592a974e2B501D8A7a11f5c42DcD365244": { + enabled: true, + listingDate: p("21 Nov 2024"), + marketTokenAddress: "0x71B7fF592a974e2B501D8A7a11f5c42DcD365244", + indexTokenAddress: "0x5503CF72f54b6d692d36BBCD391516A7dE068687", + longTokenAddress: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // GMX [GMX] + "1-0xbD48149673724f9cAeE647bb4e9D9dDaF896Efeb": { + enabled: true, + listingDate: p("22 Nov 2024"), + marketTokenAddress: "0xbD48149673724f9cAeE647bb4e9D9dDaF896Efeb", + indexTokenAddress: "0xfc5A1A6EB076a2C7aD06eD22C90d7E710E35ad0a", + longTokenAddress: "0xfc5A1A6EB076a2C7aD06eD22C90d7E710E35ad0a", + shortTokenAddress: "0xfc5A1A6EB076a2C7aD06eD22C90d7E710E35ad0a", + }, + // PENDLE/USD [PENDLE/USDC] + "1-0x784292E87715d93afD7cb8C941BacaFAAA9A5102": { + enabled: true, + listingDate: p("22 Nov 2024"), + marketTokenAddress: "0x784292E87715d93afD7cb8C941BacaFAAA9A5102", + indexTokenAddress: "0x0c880f6761F1af8d9Aa9C466984b80DAb9a8c9e8", + longTokenAddress: "0x0c880f6761F1af8d9Aa9C466984b80DAb9a8c9e8", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // ADA/USD [WBTC/USDC] + "1-0xcaCb964144f9056A8f99447a303E60b4873Ca9B4": { + enabled: true, + listingDate: p("28 Nov 2024"), + marketTokenAddress: "0xcaCb964144f9056A8f99447a303E60b4873Ca9B4", + indexTokenAddress: "0x53186c8419BEB83fE4Da74F7875041a1287337ED", + longTokenAddress: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // BCH/USD [WBTC/USDC] + "1-0x62feB8Ec060A7dE5b32BbbF4AC70050f8a043C17": { + enabled: true, + listingDate: p("28 Nov 2024"), + marketTokenAddress: "0x62feB8Ec060A7dE5b32BbbF4AC70050f8a043C17", + indexTokenAddress: "0xc33D9C096e74aa4f571E9417b69a19C4A1e72ef2", + longTokenAddress: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // DOT/USD [WBTC/USDC] + "1-0x7B2D09fca2395713dcc2F67323e4876F27b9ecB2": { + enabled: true, + listingDate: p("28 Nov 2024"), + marketTokenAddress: "0x7B2D09fca2395713dcc2F67323e4876F27b9ecB2", + indexTokenAddress: "0xE958f107b467d5172573F761d26931D658C1b436", + longTokenAddress: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + // ICP/USD [WBTC/USDC] + "1-0xdc4e96A251Ff43Eeac710462CD8A9D18Dc802F18": { + enabled: true, + listingDate: p("28 Nov 2024"), + marketTokenAddress: "0xdc4e96A251Ff43Eeac710462CD8A9D18Dc802F18", + indexTokenAddress: "0xdaf0A71608938F762e37eC5F72F670Cc44703454", + longTokenAddress: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", + shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + }, + } + : {}), }, [AVALANCHE]: { // BTC/USD [BTC-USDC] @@ -660,6 +1172,389 @@ export const MARKETS: Record> = { longTokenAddress: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7", shortTokenAddress: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7", }, + + ...(getIsFlagEnabled("testMoreMarkets") + ? { + // BTC/USD [BTC-USDC] + "1-0xFb02132333A79C8B5Bd0b64E3AbccA5f7fAf2937": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0xFb02132333A79C8B5Bd0b64E3AbccA5f7fAf2937", + indexTokenAddress: "0x152b9d0FdC40C096757F570A51E494bd4b943E50", + longTokenAddress: "0x152b9d0FdC40C096757F570A51E494bd4b943E50", + shortTokenAddress: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + }, + // ETH/USD [ETH-USDC] + "1-0xB7e69749E3d2EDd90ea59A4932EFEa2D41E245d7": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0xB7e69749E3d2EDd90ea59A4932EFEa2D41E245d7", + indexTokenAddress: "0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB", + longTokenAddress: "0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB", + shortTokenAddress: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + }, + // DOGE/USD [WAVAX-USDC] + "1-0x8970B527E84aA17a33d38b65e9a5Ab5817FC0027": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0x8970B527E84aA17a33d38b65e9a5Ab5817FC0027", + indexTokenAddress: "0xC301E6fe31062C557aEE806cc6A841aE989A3ac6", + longTokenAddress: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7", + shortTokenAddress: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + }, + // SOL/USD [SOL-USDC] + "1-0xd2eFd1eA687CD78c41ac262B3Bc9B53889ff1F70": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0xd2eFd1eA687CD78c41ac262B3Bc9B53889ff1F70", + indexTokenAddress: "0xFE6B19286885a4F7F55AdAD09C3Cd1f906D2478F", + longTokenAddress: "0xFE6B19286885a4F7F55AdAD09C3Cd1f906D2478F", + shortTokenAddress: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + }, + // LTC/USD [WAVAX-USDC] + "1-0xA74586743249243D3b77335E15FE768bA8E1Ec5A": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0xA74586743249243D3b77335E15FE768bA8E1Ec5A", + indexTokenAddress: "0x8E9C35235C38C44b5a53B56A41eaf6dB9a430cD6", + longTokenAddress: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7", + shortTokenAddress: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + }, + // AVAX/USD [WAVAX-USDC] + "1-0x913C1F46b48b3eD35E7dc3Cf754d4ae8499F31CF": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0x913C1F46b48b3eD35E7dc3Cf754d4ae8499F31CF", + indexTokenAddress: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7", + longTokenAddress: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7", + shortTokenAddress: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + }, + // SWAP-ONLY [USDC-USDT.e] + "1-0xf3652Eba45DC761e7ADd4091627d5Cda21F61613": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0xf3652Eba45DC761e7ADd4091627d5Cda21F61613", + indexTokenAddress: "0x0000000000000000000000000000000000000000", + longTokenAddress: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + shortTokenAddress: "0xc7198437980c041c805A1EDcbA50c1Ce5db95118", + }, + // SWAP-ONLY [USDC-USDC.e] + "1-0x297e71A931C5825867E8Fb937Ae5cda9891C2E99": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0x297e71A931C5825867E8Fb937Ae5cda9891C2E99", + indexTokenAddress: "0x0000000000000000000000000000000000000000", + longTokenAddress: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + shortTokenAddress: "0xA7D7079b0FEaD91F3e65f86E8915Cb59c1a4C664", + }, + // SWAP-ONLY [USDT-USDT.e] + "1-0xA7b768d6a1f746fd5a513D440DF2970ff099B0fc": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0xA7b768d6a1f746fd5a513D440DF2970ff099B0fc", + indexTokenAddress: "0x0000000000000000000000000000000000000000", + longTokenAddress: "0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7", + shortTokenAddress: "0xc7198437980c041c805A1EDcbA50c1Ce5db95118", + }, + // SWAP-ONLY [USDC-DAI.e] + "1-0xDf8c9BD26e7C1A331902758Eb013548B2D22ab3b": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0xDf8c9BD26e7C1A331902758Eb013548B2D22ab3b", + indexTokenAddress: "0x0000000000000000000000000000000000000000", + longTokenAddress: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + shortTokenAddress: "0xd586E7F844cEa2F87f50152665BCbc2C279D8d70", + }, + // XRP/USD [WAVAX-USDC] + "1-0xD1cf931fa12783c1dd5AbB77a0706c27CF352f25": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0xD1cf931fa12783c1dd5AbB77a0706c27CF352f25", + indexTokenAddress: "0x34B2885D617cE2ddeD4F60cCB49809fc17bb58Af", + longTokenAddress: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7", + shortTokenAddress: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + }, + // BTC/USD [BTC-BTC] + "1-0x3ce7BCDB37Bf587d1C17B930Fa0A7000A0648D12": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0x3ce7BCDB37Bf587d1C17B930Fa0A7000A0648D12", + indexTokenAddress: "0x152b9d0FdC40C096757F570A51E494bd4b943E50", + longTokenAddress: "0x152b9d0FdC40C096757F570A51E494bd4b943E50", + shortTokenAddress: "0x152b9d0FdC40C096757F570A51E494bd4b943E50", + }, + // ETH/USD [ETH-ETH] + "1-0x2A3Cf4ad7db715DF994393e4482D6f1e58a1b533": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0x2A3Cf4ad7db715DF994393e4482D6f1e58a1b533", + indexTokenAddress: "0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB", + longTokenAddress: "0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB", + shortTokenAddress: "0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB", + }, + // AVAX/USD [AVAX-AVAX] + "1-0x08b25A2a89036d298D6dB8A74ace9d1ce6Db15E5": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0x08b25A2a89036d298D6dB8A74ace9d1ce6Db15E5", + indexTokenAddress: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7", + longTokenAddress: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7", + shortTokenAddress: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7", + }, + // BTC/USD [BTC-USDC] + "1-1-0xFb02132333A79C8B5Bd0b64E3AbccA5f7fAf2937": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0xFb02132333A79C8B5Bd0b64E3AbccA5f7fAf2937", + indexTokenAddress: "0x152b9d0FdC40C096757F570A51E494bd4b943E50", + longTokenAddress: "0x152b9d0FdC40C096757F570A51E494bd4b943E50", + shortTokenAddress: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + }, + // ETH/USD [ETH-USDC] + "1-1-0xB7e69749E3d2EDd90ea59A4932EFEa2D41E245d7": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0xB7e69749E3d2EDd90ea59A4932EFEa2D41E245d7", + indexTokenAddress: "0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB", + longTokenAddress: "0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB", + shortTokenAddress: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + }, + // DOGE/USD [WAVAX-USDC] + "1-1-0x8970B527E84aA17a33d38b65e9a5Ab5817FC0027": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0x8970B527E84aA17a33d38b65e9a5Ab5817FC0027", + indexTokenAddress: "0xC301E6fe31062C557aEE806cc6A841aE989A3ac6", + longTokenAddress: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7", + shortTokenAddress: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + }, + // SOL/USD [SOL-USDC] + "1-1-0xd2eFd1eA687CD78c41ac262B3Bc9B53889ff1F70": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0xd2eFd1eA687CD78c41ac262B3Bc9B53889ff1F70", + indexTokenAddress: "0xFE6B19286885a4F7F55AdAD09C3Cd1f906D2478F", + longTokenAddress: "0xFE6B19286885a4F7F55AdAD09C3Cd1f906D2478F", + shortTokenAddress: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + }, + // LTC/USD [WAVAX-USDC] + "1-1-0xA74586743249243D3b77335E15FE768bA8E1Ec5A": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0xA74586743249243D3b77335E15FE768bA8E1Ec5A", + indexTokenAddress: "0x8E9C35235C38C44b5a53B56A41eaf6dB9a430cD6", + longTokenAddress: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7", + shortTokenAddress: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + }, + // AVAX/USD [WAVAX-USDC] + "1-1-0x913C1F46b48b3eD35E7dc3Cf754d4ae8499F31CF": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0x913C1F46b48b3eD35E7dc3Cf754d4ae8499F31CF", + indexTokenAddress: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7", + longTokenAddress: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7", + shortTokenAddress: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + }, + // SWAP-ONLY [USDC-USDT.e] + "1-1-0xf3652Eba45DC761e7ADd4091627d5Cda21F61613": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0xf3652Eba45DC761e7ADd4091627d5Cda21F61613", + indexTokenAddress: "0x0000000000000000000000000000000000000000", + longTokenAddress: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + shortTokenAddress: "0xc7198437980c041c805A1EDcbA50c1Ce5db95118", + }, + // SWAP-ONLY [USDC-USDC.e] + "1-1-0x297e71A931C5825867E8Fb937Ae5cda9891C2E99": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0x297e71A931C5825867E8Fb937Ae5cda9891C2E99", + indexTokenAddress: "0x0000000000000000000000000000000000000000", + longTokenAddress: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + shortTokenAddress: "0xA7D7079b0FEaD91F3e65f86E8915Cb59c1a4C664", + }, + // SWAP-ONLY [USDT-USDT.e] + "1-1-0xA7b768d6a1f746fd5a513D440DF2970ff099B0fc": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0xA7b768d6a1f746fd5a513D440DF2970ff099B0fc", + indexTokenAddress: "0x0000000000000000000000000000000000000000", + longTokenAddress: "0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7", + shortTokenAddress: "0xc7198437980c041c805A1EDcbA50c1Ce5db95118", + }, + // SWAP-ONLY [USDC-DAI.e] + "1-1-0xDf8c9BD26e7C1A331902758Eb013548B2D22ab3b": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0xDf8c9BD26e7C1A331902758Eb013548B2D22ab3b", + indexTokenAddress: "0x0000000000000000000000000000000000000000", + longTokenAddress: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + shortTokenAddress: "0xd586E7F844cEa2F87f50152665BCbc2C279D8d70", + }, + // XRP/USD [WAVAX-USDC] + "1-1-0xD1cf931fa12783c1dd5AbB77a0706c27CF352f25": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0xD1cf931fa12783c1dd5AbB77a0706c27CF352f25", + indexTokenAddress: "0x34B2885D617cE2ddeD4F60cCB49809fc17bb58Af", + longTokenAddress: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7", + shortTokenAddress: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + }, + // BTC/USD [BTC-BTC] + "1-1-0x3ce7BCDB37Bf587d1C17B930Fa0A7000A0648D12": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0x3ce7BCDB37Bf587d1C17B930Fa0A7000A0648D12", + indexTokenAddress: "0x152b9d0FdC40C096757F570A51E494bd4b943E50", + longTokenAddress: "0x152b9d0FdC40C096757F570A51E494bd4b943E50", + shortTokenAddress: "0x152b9d0FdC40C096757F570A51E494bd4b943E50", + }, + // ETH/USD [ETH-ETH] + "1-1-0x2A3Cf4ad7db715DF994393e4482D6f1e58a1b533": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0x2A3Cf4ad7db715DF994393e4482D6f1e58a1b533", + indexTokenAddress: "0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB", + longTokenAddress: "0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB", + shortTokenAddress: "0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB", + }, + // AVAX/USD [AVAX-AVAX] + "1-1-0x08b25A2a89036d298D6dB8A74ace9d1ce6Db15E5": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0x08b25A2a89036d298D6dB8A74ace9d1ce6Db15E5", + indexTokenAddress: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7", + longTokenAddress: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7", + shortTokenAddress: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7", + }, + // BTC/USD [BTC-USDC] + "1-1-1-0xFb02132333A79C8B5Bd0b64E3AbccA5f7fAf2937": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0xFb02132333A79C8B5Bd0b64E3AbccA5f7fAf2937", + indexTokenAddress: "0x152b9d0FdC40C096757F570A51E494bd4b943E50", + longTokenAddress: "0x152b9d0FdC40C096757F570A51E494bd4b943E50", + shortTokenAddress: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + }, + // ETH/USD [ETH-USDC] + "1-1-1-0xB7e69749E3d2EDd90ea59A4932EFEa2D41E245d7": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0xB7e69749E3d2EDd90ea59A4932EFEa2D41E245d7", + indexTokenAddress: "0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB", + longTokenAddress: "0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB", + shortTokenAddress: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + }, + // DOGE/USD [WAVAX-USDC] + "1-1-1-0x8970B527E84aA17a33d38b65e9a5Ab5817FC0027": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0x8970B527E84aA17a33d38b65e9a5Ab5817FC0027", + indexTokenAddress: "0xC301E6fe31062C557aEE806cc6A841aE989A3ac6", + longTokenAddress: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7", + shortTokenAddress: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + }, + // SOL/USD [SOL-USDC] + "1-1-1-0xd2eFd1eA687CD78c41ac262B3Bc9B53889ff1F70": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0xd2eFd1eA687CD78c41ac262B3Bc9B53889ff1F70", + indexTokenAddress: "0xFE6B19286885a4F7F55AdAD09C3Cd1f906D2478F", + longTokenAddress: "0xFE6B19286885a4F7F55AdAD09C3Cd1f906D2478F", + shortTokenAddress: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + }, + // LTC/USD [WAVAX-USDC] + "1-1-1-0xA74586743249243D3b77335E15FE768bA8E1Ec5A": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0xA74586743249243D3b77335E15FE768bA8E1Ec5A", + indexTokenAddress: "0x8E9C35235C38C44b5a53B56A41eaf6dB9a430cD6", + longTokenAddress: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7", + shortTokenAddress: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + }, + // AVAX/USD [WAVAX-USDC] + "1-1-1-0x913C1F46b48b3eD35E7dc3Cf754d4ae8499F31CF": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0x913C1F46b48b3eD35E7dc3Cf754d4ae8499F31CF", + indexTokenAddress: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7", + longTokenAddress: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7", + shortTokenAddress: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + }, + // SWAP-ONLY [USDC-USDT.e] + "1-1-1-0xf3652Eba45DC761e7ADd4091627d5Cda21F61613": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0xf3652Eba45DC761e7ADd4091627d5Cda21F61613", + indexTokenAddress: "0x0000000000000000000000000000000000000000", + longTokenAddress: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + shortTokenAddress: "0xc7198437980c041c805A1EDcbA50c1Ce5db95118", + }, + // SWAP-ONLY [USDC-USDC.e] + "1-1-1-0x297e71A931C5825867E8Fb937Ae5cda9891C2E99": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0x297e71A931C5825867E8Fb937Ae5cda9891C2E99", + indexTokenAddress: "0x0000000000000000000000000000000000000000", + longTokenAddress: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + shortTokenAddress: "0xA7D7079b0FEaD91F3e65f86E8915Cb59c1a4C664", + }, + // SWAP-ONLY [USDT-USDT.e] + "1-1-1-0xA7b768d6a1f746fd5a513D440DF2970ff099B0fc": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0xA7b768d6a1f746fd5a513D440DF2970ff099B0fc", + indexTokenAddress: "0x0000000000000000000000000000000000000000", + longTokenAddress: "0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7", + shortTokenAddress: "0xc7198437980c041c805A1EDcbA50c1Ce5db95118", + }, + // SWAP-ONLY [USDC-DAI.e] + "1-1-1-0xDf8c9BD26e7C1A331902758Eb013548B2D22ab3b": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0xDf8c9BD26e7C1A331902758Eb013548B2D22ab3b", + indexTokenAddress: "0x0000000000000000000000000000000000000000", + longTokenAddress: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + shortTokenAddress: "0xd586E7F844cEa2F87f50152665BCbc2C279D8d70", + }, + // XRP/USD [WAVAX-USDC] + "1-1-1-0xD1cf931fa12783c1dd5AbB77a0706c27CF352f25": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0xD1cf931fa12783c1dd5AbB77a0706c27CF352f25", + indexTokenAddress: "0x34B2885D617cE2ddeD4F60cCB49809fc17bb58Af", + longTokenAddress: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7", + shortTokenAddress: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + }, + // BTC/USD [BTC-BTC] + "1-1-1-0x3ce7BCDB37Bf587d1C17B930Fa0A7000A0648D12": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0x3ce7BCDB37Bf587d1C17B930Fa0A7000A0648D12", + indexTokenAddress: "0x152b9d0FdC40C096757F570A51E494bd4b943E50", + longTokenAddress: "0x152b9d0FdC40C096757F570A51E494bd4b943E50", + shortTokenAddress: "0x152b9d0FdC40C096757F570A51E494bd4b943E50", + }, + // ETH/USD [ETH-ETH] + "1-1-1-0x2A3Cf4ad7db715DF994393e4482D6f1e58a1b533": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0x2A3Cf4ad7db715DF994393e4482D6f1e58a1b533", + indexTokenAddress: "0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB", + longTokenAddress: "0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB", + shortTokenAddress: "0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB", + }, + // AVAX/USD [AVAX-AVAX] + "1-1-1-0x08b25A2a89036d298D6dB8A74ace9d1ce6Db15E5": { + enabled: true, + listingDate: DEFAULT_LISTING, + marketTokenAddress: "0x08b25A2a89036d298D6dB8A74ace9d1ce6Db15E5", + indexTokenAddress: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7", + longTokenAddress: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7", + shortTokenAddress: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7", + }, + } + : {}), }, [AVALANCHE_FUJI]: { // AVAX/USD [WAVAX-USDC] diff --git a/src/context/SyntheticsEvents/SyntheticsEventsProvider.tsx b/src/context/SyntheticsEvents/SyntheticsEventsProvider.tsx index 1fab5cb476..3b8e99c3da 100644 --- a/src/context/SyntheticsEvents/SyntheticsEventsProvider.tsx +++ b/src/context/SyntheticsEvents/SyntheticsEventsProvider.tsx @@ -99,7 +99,7 @@ export function SyntheticsEventsProvider({ children }: { children: ReactNode }) ...glvData, }; - const marketTokensAddressesString = Object.keys(glvAndGmMarketsData).join("-"); + const marketTokensAddressesString = Object.keys(glvAndGmMarketsData).join(":"); return { glvAndGmMarketsData, @@ -814,7 +814,7 @@ export function SyntheticsEventsProvider({ children }: { children: ReactNode }) chainId, wsProvider, currentAccount, - marketTokensAddressesString.split("-"), + marketTokensAddressesString.split(":").filter((s) => !s.includes("1-")), (tokenAddress, amount) => { setTokensBalancesUpdates((old) => { const oldDiff = old[tokenAddress]?.diff || 0n; diff --git a/src/domain/synthetics/markets/useClaimableFundingDataRequest.ts b/src/domain/synthetics/markets/useClaimableFundingDataRequest.ts index bfe0e904af..30daaf5d9c 100644 --- a/src/domain/synthetics/markets/useClaimableFundingDataRequest.ts +++ b/src/domain/synthetics/markets/useClaimableFundingDataRequest.ts @@ -30,6 +30,8 @@ export function useClaimableFundingDataRequest(chainId: number) { } return marketsAddresses.reduce((request, marketAddress) => { + // eslint-disable-next-line es-x/no-string-prototype-replaceall + const fixedAddress = marketAddress.replaceAll("1-", ""); const market = getByKey(marketsData, marketAddress); if (!market) { @@ -39,11 +41,11 @@ export function useClaimableFundingDataRequest(chainId: number) { const keys = hashDataMap({ claimableFundingAmountLong: [ ["bytes32", "address", "address", "address"], - [CLAIMABLE_FUNDING_AMOUNT, marketAddress, market.longTokenAddress, account as string], + [CLAIMABLE_FUNDING_AMOUNT, fixedAddress, market.longTokenAddress, account as string], ], claimableFundingAmountShort: [ ["bytes32", "address", "address", "address"], - [CLAIMABLE_FUNDING_AMOUNT, marketAddress, market.shortTokenAddress, account as string], + [CLAIMABLE_FUNDING_AMOUNT, fixedAddress, market.shortTokenAddress, account as string], ], }); diff --git a/src/domain/synthetics/markets/useGmMarketsApy.ts b/src/domain/synthetics/markets/useGmMarketsApy.ts index 07f85cdbf4..7134c00c2e 100644 --- a/src/domain/synthetics/markets/useGmMarketsApy.ts +++ b/src/domain/synthetics/markets/useGmMarketsApy.ts @@ -55,7 +55,10 @@ type SwrResult = { function useMarketAddresses(marketsInfoData: GlvAndGmMarketsInfoData | undefined) { return useMemo( - () => Object.keys(marketsInfoData || {}).filter((address) => !marketsInfoData![address].isDisabled), + () => + Object.keys(marketsInfoData || {}).filter( + (address) => !marketsInfoData![address].isDisabled && !address.includes("1-") + ), [marketsInfoData] ); } diff --git a/src/domain/synthetics/markets/useMarketTokensData.ts b/src/domain/synthetics/markets/useMarketTokensData.ts index 1760b9e425..f3538f32ea 100644 --- a/src/domain/synthetics/markets/useMarketTokensData.ts +++ b/src/domain/synthetics/markets/useMarketTokensData.ts @@ -65,12 +65,14 @@ export function useMarketTokensDataRequest( request: () => marketsAddresses!.reduce((requests, marketAddress) => { - const market = getByKey(marketsData, marketAddress)!; + // eslint-disable-next-line es-x/no-string-prototype-replaceall + const fixedAddress = marketAddress.replaceAll("1-", ""); + const market = getByKey(marketsData, fixedAddress)!; const marketPrices = getContractMarketPrices(tokensData!, market); if (marketPrices) { const marketProps = { - marketToken: market.marketTokenAddress, + marketToken: fixedAddress, longToken: market.longTokenAddress, shortToken: market.shortTokenAddress, indexToken: market.indexTokenAddress, @@ -111,7 +113,7 @@ export function useMarketTokensDataRequest( } requests[`${marketAddress}-tokenData`] = { - contractAddress: marketAddress, + contractAddress: fixedAddress, abi: TokenAbi.abi, calls: { totalSupply: { diff --git a/src/domain/synthetics/markets/useMarkets.ts b/src/domain/synthetics/markets/useMarkets.ts index 992ae8aa09..16d61d482a 100644 --- a/src/domain/synthetics/markets/useMarkets.ts +++ b/src/domain/synthetics/markets/useMarkets.ts @@ -1,7 +1,6 @@ -import { useMemo } from "react"; import { ethers } from "ethers"; +import { useMemo } from "react"; -import { isMarketEnabled } from "config/markets"; import { convertTokenAddress, getToken } from "config/tokens"; import { MarketsData } from "./types"; @@ -23,13 +22,13 @@ export function useMarkets(chainId: number): MarketsResult { throw new Error(`Static markets data for chain ${chainId} not found`); } - return Object.values(markets).reduce( - (acc: MarketsResult, enabledMarketConfig) => { + return Object.entries(markets).reduce( + (acc: MarketsResult, [marketAddress, enabledMarketConfig]) => { const market = enabledMarketConfig; - if (!isMarketEnabled(chainId, market.marketTokenAddress)) { - return acc; - } + // if (!isMarketEnabled(chainId, marketAddress)) { + // return acc; + // } try { const indexToken = getToken(chainId, convertTokenAddress(chainId, market.indexTokenAddress, "native")); @@ -41,8 +40,8 @@ export function useMarkets(chainId: number): MarketsResult { const name = getMarketFullName({ indexToken, longToken, shortToken, isSpotOnly }); - acc.marketsAddresses!.push(market.marketTokenAddress); - acc.marketsData![market.marketTokenAddress] = { + acc.marketsAddresses!.push(marketAddress); + acc.marketsData![marketAddress] = { ...market, isSameCollaterals, isSpotOnly, diff --git a/src/domain/synthetics/markets/useMarketsInfoRequest/buildMarketsConfigsRequest.ts b/src/domain/synthetics/markets/useMarketsInfoRequest/buildMarketsConfigsRequest.ts index 5775bf077c..1bc38e5f1f 100644 --- a/src/domain/synthetics/markets/useMarketsInfoRequest/buildMarketsConfigsRequest.ts +++ b/src/domain/synthetics/markets/useMarketsInfoRequest/buildMarketsConfigsRequest.ts @@ -16,7 +16,10 @@ export async function buildMarketsConfigsRequest( ) { const request: MarketConfigMulticallRequestConfig = {}; for (const marketAddress of marketsAddresses || []) { - const prebuiltHashedKeys = HASHED_MARKET_CONFIG_KEYS[chainId]?.[marketAddress]; + // eslint-disable-next-line es-x/no-string-prototype-replaceall + const fixedAddress = marketAddress.replaceAll("1-", ""); + + const prebuiltHashedKeys = HASHED_MARKET_CONFIG_KEYS[chainId]?.[fixedAddress]; if (!prebuiltHashedKeys) { throw new Error( diff --git a/src/domain/synthetics/markets/useMarketsInfoRequest/buildMarketsValuesRequest.ts b/src/domain/synthetics/markets/useMarketsInfoRequest/buildMarketsValuesRequest.ts index 8b43860117..671a7872b5 100644 --- a/src/domain/synthetics/markets/useMarketsInfoRequest/buildMarketsValuesRequest.ts +++ b/src/domain/synthetics/markets/useMarketsInfoRequest/buildMarketsValuesRequest.ts @@ -31,6 +31,9 @@ export async function buildMarketsValuesRequest( const request: MarketValuesMulticallRequestConfig = {}; for (const marketAddress of marketsAddresses || []) { + // eslint-disable-next-line es-x/no-string-prototype-replaceall + const fixedAddress = marketAddress.replaceAll("1-", ""); + const market = getByKey(marketsData, marketAddress)!; const marketPrices = getContractMarketPrices(tokensData!, market)!; @@ -41,7 +44,7 @@ export async function buildMarketsValuesRequest( } const marketProps = { - marketToken: market.marketTokenAddress, + marketToken: fixedAddress, indexToken: market.indexTokenAddress, longToken: market.longTokenAddress, shortToken: market.shortTokenAddress, @@ -53,7 +56,7 @@ export async function buildMarketsValuesRequest( calls: { marketInfo: { methodName: "getMarketInfo", - params: [dataStoreAddress, marketPrices, marketAddress], + params: [dataStoreAddress, marketPrices, fixedAddress], }, marketTokenPriceMax: { methodName: "getMarketTokenPrice", @@ -82,11 +85,11 @@ export async function buildMarketsValuesRequest( }, }; - const prebuiltHashedKeys = HASHED_MARKET_VALUES_KEYS[chainId]?.[marketAddress]; + const prebuiltHashedKeys = HASHED_MARKET_VALUES_KEYS[chainId]?.[fixedAddress]; if (!prebuiltHashedKeys) { throw new Error( - `No pre-built hashed market keys found for the market ${marketAddress}. Run \`yarn prebuild\` to generate them.` + `No pre-built hashed market keys found for the market ${fixedAddress}. Run \`yarn prebuild\` to generate them.` ); } diff --git a/src/domain/synthetics/markets/useMarketsInfoRequest/index.ts b/src/domain/synthetics/markets/useMarketsInfoRequest/index.ts index bc5c579c43..2d0c26d516 100644 --- a/src/domain/synthetics/markets/useMarketsInfoRequest/index.ts +++ b/src/domain/synthetics/markets/useMarketsInfoRequest/index.ts @@ -318,6 +318,8 @@ function useMarketsValuesRequest({ syntheticsReaderAddress, }), parseResponse: (res) => { + console.log("PARSE MARKETS INFO", res); + const result = marketsAddresses!.reduce( (acc, marketAddress) => { const readerErrors = res.errors[`${marketAddress}-reader`]; @@ -408,6 +410,8 @@ function useMarketsValuesRequest({ } ); + console.log("MARKETS ADDRESSES", marketsAddresses?.length); + return result; }, }); diff --git a/src/domain/synthetics/trade/utils/swapRouting.ts b/src/domain/synthetics/trade/utils/swapRouting.ts index 6fd53ac837..4d557b130d 100644 --- a/src/domain/synthetics/trade/utils/swapRouting.ts +++ b/src/domain/synthetics/trade/utils/swapRouting.ts @@ -1,14 +1,43 @@ -import { MarketInfo, MarketsInfoData } from "domain/synthetics/markets"; +import { getAvailableUsdLiquidityForCollateral, MarketInfo, MarketsInfoData } from "domain/synthetics/markets"; import { MarketEdge, MarketsGraph, SwapEstimator, SwapRoute } from "../types"; import { getMaxSwapPathLiquidity, getSwapStats } from "./swapStats"; +const MAX_MARKETS_PER_TOKEN = 5; + export function getMarketsGraph(markets: MarketInfo[]): MarketsGraph { const graph: MarketsGraph = { abjacencyList: {}, edges: [], }; - for (const market of markets) { + const sortedMarkets = markets.sort((a, b) => { + const liquidityA = getAvailableUsdLiquidityForCollateral(a, true) + getAvailableUsdLiquidityForCollateral(a, false); + const liquidityB = getAvailableUsdLiquidityForCollateral(b, true) + getAvailableUsdLiquidityForCollateral(b, false); + + return Number(liquidityB) - Number(liquidityA); + }); + + const sortedMarketsByTokens: { [token: string]: MarketInfo[] } = {}; + + for (const market of sortedMarkets) { + const { longTokenAddress, shortTokenAddress } = market; + + sortedMarketsByTokens[longTokenAddress] = sortedMarketsByTokens[longTokenAddress] || []; + + if (sortedMarketsByTokens[longTokenAddress].length < MAX_MARKETS_PER_TOKEN) { + sortedMarketsByTokens[longTokenAddress].push(market); + } + + sortedMarketsByTokens[shortTokenAddress] = sortedMarketsByTokens[shortTokenAddress] || []; + + if (sortedMarketsByTokens[shortTokenAddress].length < MAX_MARKETS_PER_TOKEN) { + sortedMarketsByTokens[shortTokenAddress].push(market); + } + } + + const marketsForGraph = Object.values(sortedMarketsByTokens).flat(); + + for (const market of marketsForGraph) { const { longTokenAddress, shortTokenAddress, marketTokenAddress, isSameCollaterals, isDisabled } = market; if (isSameCollaterals || isDisabled) { diff --git a/src/lib/multicall/executeMulticall.ts b/src/lib/multicall/executeMulticall.ts index a887545452..6f4c89216f 100644 --- a/src/lib/multicall/executeMulticall.ts +++ b/src/lib/multicall/executeMulticall.ts @@ -125,6 +125,7 @@ async function executeChainMulticall(chainId: number, calls: MulticallFetcherCon const URGENT_WINDOW_MS = 50; const BACKGROUND_WINDOW_MS = FREQUENT_UPDATE_INTERVAL - FREQUENT_MULTICALL_REFRESH_INTERVAL; +let numberOfCalls = 0; const throttledExecuteUrgentChainsMulticalls = throttle(executeChainsMulticalls, URGENT_WINDOW_MS, { leading: false, @@ -159,7 +160,7 @@ export function executeMulticall>( const callResultHandler: CallResultHandler = (destination, callResult, callError) => { resolvedCallsCount++; - + numberOfCalls++; const { callGroupName, callName } = destination; if (callResult) { @@ -174,6 +175,7 @@ export function executeMulticall>( } if (resolvedCallsCount === requestCallsCount) { + console.log("batches number of calls", numberOfCalls); return resolve(requestResult); } }; @@ -190,7 +192,7 @@ export function executeMulticall>( // There are two main reasons for this: // 1. Single token backed pools have many pairs with the same method signatures // 2. The majority of pools have USDC as the short token, which means they all have some common calls - const callId = getCallId(callGroup.contractAddress, call.methodName, call.params); + const callId = getCallId(callGroupName, call.methodName, call.params); if (!store.current[chainId]) { store.current[chainId] = {}; @@ -249,6 +251,8 @@ export function executeMulticall>( return promise.then((result) => { const duration = performance.now() - durationStart; + console.log("batches timing", duration); + if (result.success) { emitMetricTiming({ event: "multicall.batched.timing",