diff --git a/.changeset/famous-cycles-fry.md b/.changeset/famous-cycles-fry.md new file mode 100644 index 0000000000..4da07eff27 --- /dev/null +++ b/.changeset/famous-cycles-fry.md @@ -0,0 +1,5 @@ +--- +"@venusprotocol/evm": patch +--- + +fix participant counts of legacy pool markets diff --git a/apps/evm/src/clients/api/queries/getLegacyPool/__tests__/__snapshots__/index.spec.ts.snap b/apps/evm/src/clients/api/queries/getLegacyPool/__tests__/__snapshots__/index.spec.ts.snap index ff2c46afba..949b43c1c9 100644 --- a/apps/evm/src/clients/api/queries/getLegacyPool/__tests__/__snapshots__/index.spec.ts.snap +++ b/apps/evm/src/clients/api/queries/getLegacyPool/__tests__/__snapshots__/index.spec.ts.snap @@ -22,7 +22,7 @@ exports[`getLegacyPool > returns core pool in the correct format 1`] = ` "type": "rewardDistributor", }, ], - "borrowerCount": 0, + "borrowerCount": 438, "cashTokens": "1.00000000080503544824460983238917793784e+21", "collateralFactor": 0, "disabledTokenActions": [ @@ -34,7 +34,7 @@ exports[`getLegacyPool > returns core pool in the correct format 1`] = ` "liquidityCents": "1.000006200805040439464388948970138750743214608e+23", "reserveFactor": 1, "reserveTokens": "0", - "supplierCount": 0, + "supplierCount": 933, "supplyApyPercentage": "0", "supplyBalanceCents": "1.000006201051670556767362816225462034303610544746e+23", "supplyBalanceTokens": "1.00000000105166403645033682413715238395883e+21", @@ -90,7 +90,7 @@ exports[`getLegacyPool > returns core pool in the correct format 1`] = ` "type": "rewardDistributor", }, ], - "borrowerCount": 0, + "borrowerCount": 35, "cashTokens": "0", "collateralFactor": 0.8, "disabledTokenActions": [], @@ -99,7 +99,7 @@ exports[`getLegacyPool > returns core pool in the correct format 1`] = ` "liquidityCents": "0", "reserveFactor": 0.1, "reserveTokens": "21.269535066688975633", - "supplierCount": 0, + "supplierCount": 25, "supplyApyPercentage": "11.434048167920574", "supplyBalanceCents": "3716729453.6129492577232450137", "supplyBalanceTokens": "15115.4767135290690422233", @@ -156,7 +156,7 @@ exports[`getLegacyPool > returns core pool in the correct format 1`] = ` "type": "rewardDistributor", }, ], - "borrowerCount": 0, + "borrowerCount": 263, "cashTokens": "5.556233762724731858", "collateralFactor": 0.8, "disabledTokenActions": [], @@ -165,7 +165,7 @@ exports[`getLegacyPool > returns core pool in the correct format 1`] = ` "liquidityCents": "291731.6894670817923653489952", "reserveFactor": 0.25, "reserveTokens": "187487.447405339178551222", - "supplierCount": 0, + "supplierCount": 923, "supplyApyPercentage": "157.57792083092227", "supplyBalanceCents": "44362974574.359412320127072323564288", "supplyBalanceTokens": "844923.83256419589412162352", @@ -222,7 +222,7 @@ exports[`getLegacyPool > returns core pool in the correct format 1`] = ` "type": "rewardDistributor", }, ], - "borrowerCount": 0, + "borrowerCount": 68, "cashTokens": "2259657.074761148481496107", "collateralFactor": 0.6, "disabledTokenActions": [], @@ -231,7 +231,7 @@ exports[`getLegacyPool > returns core pool in the correct format 1`] = ` "liquidityCents": "1444669788.91666196711723462774301", "reserveFactor": 0.25, "reserveTokens": "0", - "supplierCount": 0, + "supplierCount": 274, "supplyApyPercentage": "1.8360754649567212", "supplyBalanceCents": "1711197065.9464062401284554003137589", "supplyBalanceTokens": "2676541.43946341921611527123", @@ -287,7 +287,7 @@ exports[`getLegacyPool > returns core pool in the correct format 1`] = ` "type": "rewardDistributor", }, ], - "borrowerCount": 0, + "borrowerCount": 249, "cashTokens": "1.0000736633870942814396398228131475074669e+34", "collateralFactor": 0.8, "disabledTokenActions": [], @@ -296,7 +296,7 @@ exports[`getLegacyPool > returns core pool in the correct format 1`] = ` "liquidityCents": "1.000036490649026183145198711400933542774047455327e+36", "reserveFactor": 0.1, "reserveTokens": "0", - "supplierCount": 0, + "supplierCount": 670, "supplyApyPercentage": "0", "supplyBalanceCents": "1.00003649064902618314530970887489046343322854178897705712904885e+36", "supplyBalanceTokens": "1.000073663387094281439750824413033895903139261475326095e+34", @@ -352,7 +352,7 @@ exports[`getLegacyPool > returns core pool in the correct format 1`] = ` "type": "rewardDistributor", }, ], - "borrowerCount": 0, + "borrowerCount": 229, "cashTokens": "1.010176805025969148511141552e+21", "collateralFactor": 0.81, "disabledTokenActions": [], @@ -361,7 +361,7 @@ exports[`getLegacyPool > returns core pool in the correct format 1`] = ` "liquidityCents": "1.01015151019877129824366283301553792e+23", "reserveFactor": 0.1, "reserveTokens": "0", - "supplierCount": 0, + "supplierCount": 534, "supplyApyPercentage": "2.7328805884e-8", "supplyBalanceCents": "1.0101515258227468345608256850251328456045167117888e+23", "supplyBalanceTokens": "1.01017682065033591897223674983334867265528e+21", diff --git a/apps/evm/src/clients/api/queries/getLegacyPool/__tests__/__snapshots__/indexPrime.spec.ts.snap b/apps/evm/src/clients/api/queries/getLegacyPool/__tests__/__snapshots__/indexPrime.spec.ts.snap index f02c060a03..d6fa0b2c5e 100644 --- a/apps/evm/src/clients/api/queries/getLegacyPool/__tests__/__snapshots__/indexPrime.spec.ts.snap +++ b/apps/evm/src/clients/api/queries/getLegacyPool/__tests__/__snapshots__/indexPrime.spec.ts.snap @@ -24,8 +24,8 @@ exports[`getLegacyPool - Feature enabled: Prime > does not fetch Prime distribut { "apyPercentage": "0.20019958435848473", "referenceValues": { - "userBorrowBalanceTokens": "246628588661.936163058800477859", - "userSupplyBalanceTokens": "1.00000000105166403645033682413715238395883e+21", + "userBorrowBalanceTokens": "563078969.54779945903835725538", + "userSupplyBalanceTokens": "1071811362327614186.97785297335171745333", "userXvsStakedTokens": "1000", }, "token": { @@ -37,7 +37,7 @@ exports[`getLegacyPool - Feature enabled: Prime > does not fetch Prime distribut "type": "primeSimulation", }, ], - "borrowerCount": 0, + "borrowerCount": 438, "cashTokens": "1.00000000080503544824460983238917793784e+21", "collateralFactor": 0, "disabledTokenActions": [ @@ -49,7 +49,7 @@ exports[`getLegacyPool - Feature enabled: Prime > does not fetch Prime distribut "liquidityCents": "1.000006200805040439464388948970138750743214608e+23", "reserveFactor": 1, "reserveTokens": "0", - "supplierCount": 0, + "supplierCount": 933, "supplyApyPercentage": "0", "supplyBalanceCents": "1.000006201051670556767362816225462034303610544746e+23", "supplyBalanceTokens": "1.00000000105166403645033682413715238395883e+21", @@ -69,8 +69,8 @@ exports[`getLegacyPool - Feature enabled: Prime > does not fetch Prime distribut { "apyPercentage": "0.23026397657694986", "referenceValues": { - "userBorrowBalanceTokens": "246628588661.936163058800477859", - "userSupplyBalanceTokens": "1.00000000105166403645033682413715238395883e+21", + "userBorrowBalanceTokens": "563078969.54779945903835725538", + "userSupplyBalanceTokens": "1071811362327614186.97785297335171745333", "userXvsStakedTokens": "1000", }, "token": { @@ -120,7 +120,7 @@ exports[`getLegacyPool - Feature enabled: Prime > does not fetch Prime distribut "type": "rewardDistributor", }, ], - "borrowerCount": 0, + "borrowerCount": 35, "cashTokens": "0", "collateralFactor": 0.8, "disabledTokenActions": [], @@ -129,7 +129,7 @@ exports[`getLegacyPool - Feature enabled: Prime > does not fetch Prime distribut "liquidityCents": "0", "reserveFactor": 0.1, "reserveTokens": "21.269535066688975633", - "supplierCount": 0, + "supplierCount": 25, "supplyApyPercentage": "11.434048167920574", "supplyBalanceCents": "3716729453.6129492577232450137", "supplyBalanceTokens": "15115.4767135290690422233", @@ -186,7 +186,7 @@ exports[`getLegacyPool - Feature enabled: Prime > does not fetch Prime distribut "type": "rewardDistributor", }, ], - "borrowerCount": 0, + "borrowerCount": 263, "cashTokens": "5.556233762724731858", "collateralFactor": 0.8, "disabledTokenActions": [], @@ -195,7 +195,7 @@ exports[`getLegacyPool - Feature enabled: Prime > does not fetch Prime distribut "liquidityCents": "291731.6894670817923653489952", "reserveFactor": 0.25, "reserveTokens": "187487.447405339178551222", - "supplierCount": 0, + "supplierCount": 923, "supplyApyPercentage": "157.57792083092227", "supplyBalanceCents": "44362974574.359412320127072323564288", "supplyBalanceTokens": "844923.83256419589412162352", @@ -252,7 +252,7 @@ exports[`getLegacyPool - Feature enabled: Prime > does not fetch Prime distribut "type": "rewardDistributor", }, ], - "borrowerCount": 0, + "borrowerCount": 68, "cashTokens": "2259657.074761148481496107", "collateralFactor": 0.6, "disabledTokenActions": [], @@ -261,7 +261,7 @@ exports[`getLegacyPool - Feature enabled: Prime > does not fetch Prime distribut "liquidityCents": "1444669788.91666196711723462774301", "reserveFactor": 0.25, "reserveTokens": "0", - "supplierCount": 0, + "supplierCount": 274, "supplyApyPercentage": "1.8360754649567212", "supplyBalanceCents": "1711197065.9464062401284554003137589", "supplyBalanceTokens": "2676541.43946341921611527123", @@ -332,7 +332,7 @@ exports[`getLegacyPool - Feature enabled: Prime > does not fetch Prime distribut "type": "primeSimulation", }, ], - "borrowerCount": 0, + "borrowerCount": 249, "cashTokens": "1.0000736633870942814396398228131475074669e+34", "collateralFactor": 0.8, "disabledTokenActions": [], @@ -341,7 +341,7 @@ exports[`getLegacyPool - Feature enabled: Prime > does not fetch Prime distribut "liquidityCents": "1.000036490649026183145198711400933542774047455327e+36", "reserveFactor": 0.1, "reserveTokens": "0", - "supplierCount": 0, + "supplierCount": 670, "supplyApyPercentage": "0", "supplyBalanceCents": "1.00003649064902618314530970887489046343322854178897705712904885e+36", "supplyBalanceTokens": "1.000073663387094281439750824413033895903139261475326095e+34", @@ -427,7 +427,7 @@ exports[`getLegacyPool - Feature enabled: Prime > does not fetch Prime distribut "type": "primeSimulation", }, ], - "borrowerCount": 0, + "borrowerCount": 229, "cashTokens": "1.010176805025969148511141552e+21", "collateralFactor": 0.81, "disabledTokenActions": [], @@ -436,7 +436,7 @@ exports[`getLegacyPool - Feature enabled: Prime > does not fetch Prime distribut "liquidityCents": "1.01015151019877129824366283301553792e+23", "reserveFactor": 0.1, "reserveTokens": "0", - "supplierCount": 0, + "supplierCount": 534, "supplyApyPercentage": "2.7328805884e-8", "supplyBalanceCents": "1.0101515258227468345608256850251328456045167117888e+23", "supplyBalanceTokens": "1.01017682065033591897223674983334867265528e+21", @@ -535,8 +535,8 @@ exports[`getLegacyPool - Feature enabled: Prime > fetches and formats Prime dist { "apyPercentage": "0.20019958435848473", "referenceValues": { - "userBorrowBalanceTokens": "246628588661.936163058800477859", - "userSupplyBalanceTokens": "1.00000000105166403645033682413715238395883e+21", + "userBorrowBalanceTokens": "563078969.54779945903835725538", + "userSupplyBalanceTokens": "1071811362327614186.97785297335171745333", "userXvsStakedTokens": "1000", }, "token": { @@ -548,7 +548,7 @@ exports[`getLegacyPool - Feature enabled: Prime > fetches and formats Prime dist "type": "primeSimulation", }, ], - "borrowerCount": 0, + "borrowerCount": 438, "cashTokens": "1.00000000080503544824460983238917793784e+21", "collateralFactor": 0, "disabledTokenActions": [ @@ -560,7 +560,7 @@ exports[`getLegacyPool - Feature enabled: Prime > fetches and formats Prime dist "liquidityCents": "1.000006200805040439464388948970138750743214608e+23", "reserveFactor": 1, "reserveTokens": "0", - "supplierCount": 0, + "supplierCount": 933, "supplyApyPercentage": "0", "supplyBalanceCents": "1.000006201051670556767362816225462034303610544746e+23", "supplyBalanceTokens": "1.00000000105166403645033682413715238395883e+21", @@ -590,8 +590,8 @@ exports[`getLegacyPool - Feature enabled: Prime > fetches and formats Prime dist { "apyPercentage": "0.23026397657694986", "referenceValues": { - "userBorrowBalanceTokens": "246628588661.936163058800477859", - "userSupplyBalanceTokens": "1.00000000105166403645033682413715238395883e+21", + "userBorrowBalanceTokens": "563078969.54779945903835725538", + "userSupplyBalanceTokens": "1071811362327614186.97785297335171745333", "userXvsStakedTokens": "1000", }, "token": { @@ -641,7 +641,7 @@ exports[`getLegacyPool - Feature enabled: Prime > fetches and formats Prime dist "type": "rewardDistributor", }, ], - "borrowerCount": 0, + "borrowerCount": 35, "cashTokens": "0", "collateralFactor": 0.8, "disabledTokenActions": [], @@ -650,7 +650,7 @@ exports[`getLegacyPool - Feature enabled: Prime > fetches and formats Prime dist "liquidityCents": "0", "reserveFactor": 0.1, "reserveTokens": "21.269535066688975633", - "supplierCount": 0, + "supplierCount": 25, "supplyApyPercentage": "11.434048167920574", "supplyBalanceCents": "3716729453.6129492577232450137", "supplyBalanceTokens": "15115.4767135290690422233", @@ -707,7 +707,7 @@ exports[`getLegacyPool - Feature enabled: Prime > fetches and formats Prime dist "type": "rewardDistributor", }, ], - "borrowerCount": 0, + "borrowerCount": 263, "cashTokens": "5.556233762724731858", "collateralFactor": 0.8, "disabledTokenActions": [], @@ -716,7 +716,7 @@ exports[`getLegacyPool - Feature enabled: Prime > fetches and formats Prime dist "liquidityCents": "291731.6894670817923653489952", "reserveFactor": 0.25, "reserveTokens": "187487.447405339178551222", - "supplierCount": 0, + "supplierCount": 923, "supplyApyPercentage": "157.57792083092227", "supplyBalanceCents": "44362974574.359412320127072323564288", "supplyBalanceTokens": "844923.83256419589412162352", @@ -773,7 +773,7 @@ exports[`getLegacyPool - Feature enabled: Prime > fetches and formats Prime dist "type": "rewardDistributor", }, ], - "borrowerCount": 0, + "borrowerCount": 68, "cashTokens": "2259657.074761148481496107", "collateralFactor": 0.6, "disabledTokenActions": [], @@ -782,7 +782,7 @@ exports[`getLegacyPool - Feature enabled: Prime > fetches and formats Prime dist "liquidityCents": "1444669788.91666196711723462774301", "reserveFactor": 0.25, "reserveTokens": "0", - "supplierCount": 0, + "supplierCount": 274, "supplyApyPercentage": "1.8360754649567212", "supplyBalanceCents": "1711197065.9464062401284554003137589", "supplyBalanceTokens": "2676541.43946341921611527123", @@ -863,7 +863,7 @@ exports[`getLegacyPool - Feature enabled: Prime > fetches and formats Prime dist "type": "primeSimulation", }, ], - "borrowerCount": 0, + "borrowerCount": 249, "cashTokens": "1.0000736633870942814396398228131475074669e+34", "collateralFactor": 0.8, "disabledTokenActions": [], @@ -872,7 +872,7 @@ exports[`getLegacyPool - Feature enabled: Prime > fetches and formats Prime dist "liquidityCents": "1.000036490649026183145198711400933542774047455327e+36", "reserveFactor": 0.1, "reserveTokens": "0", - "supplierCount": 0, + "supplierCount": 670, "supplyApyPercentage": "0", "supplyBalanceCents": "1.00003649064902618314530970887489046343322854178897705712904885e+36", "supplyBalanceTokens": "1.000073663387094281439750824413033895903139261475326095e+34", @@ -978,7 +978,7 @@ exports[`getLegacyPool - Feature enabled: Prime > fetches and formats Prime dist "type": "primeSimulation", }, ], - "borrowerCount": 0, + "borrowerCount": 229, "cashTokens": "1.010176805025969148511141552e+21", "collateralFactor": 0.81, "disabledTokenActions": [], @@ -987,7 +987,7 @@ exports[`getLegacyPool - Feature enabled: Prime > fetches and formats Prime dist "liquidityCents": "1.01015151019877129824366283301553792e+23", "reserveFactor": 0.1, "reserveTokens": "0", - "supplierCount": 0, + "supplierCount": 534, "supplyApyPercentage": "2.7328805884e-8", "supplyBalanceCents": "1.0101515258227468345608256850251328456045167117888e+23", "supplyBalanceTokens": "1.01017682065033591897223674983334867265528e+21", @@ -1094,7 +1094,7 @@ exports[`getLegacyPool - Feature enabled: Prime > filters out Prime distribution "type": "prime", }, ], - "borrowerCount": 0, + "borrowerCount": 438, "cashTokens": "1.00000000080503544824460983238917793784e+21", "collateralFactor": 0, "disabledTokenActions": [ @@ -1106,7 +1106,7 @@ exports[`getLegacyPool - Feature enabled: Prime > filters out Prime distribution "liquidityCents": "1.000006200805040439464388948970138750743214608e+23", "reserveFactor": 1, "reserveTokens": "0", - "supplierCount": 0, + "supplierCount": 933, "supplyApyPercentage": "0", "supplyBalanceCents": "1.000006201051670556767362816225462034303610544746e+23", "supplyBalanceTokens": "1.00000000105166403645033682413715238395883e+21", @@ -1172,7 +1172,7 @@ exports[`getLegacyPool - Feature enabled: Prime > filters out Prime distribution "type": "rewardDistributor", }, ], - "borrowerCount": 0, + "borrowerCount": 35, "cashTokens": "0", "collateralFactor": 0.8, "disabledTokenActions": [], @@ -1181,7 +1181,7 @@ exports[`getLegacyPool - Feature enabled: Prime > filters out Prime distribution "liquidityCents": "0", "reserveFactor": 0.1, "reserveTokens": "21.269535066688975633", - "supplierCount": 0, + "supplierCount": 25, "supplyApyPercentage": "11.434048167920574", "supplyBalanceCents": "3716729453.6129492577232450137", "supplyBalanceTokens": "15115.4767135290690422233", @@ -1238,7 +1238,7 @@ exports[`getLegacyPool - Feature enabled: Prime > filters out Prime distribution "type": "rewardDistributor", }, ], - "borrowerCount": 0, + "borrowerCount": 263, "cashTokens": "5.556233762724731858", "collateralFactor": 0.8, "disabledTokenActions": [], @@ -1247,7 +1247,7 @@ exports[`getLegacyPool - Feature enabled: Prime > filters out Prime distribution "liquidityCents": "291731.6894670817923653489952", "reserveFactor": 0.25, "reserveTokens": "187487.447405339178551222", - "supplierCount": 0, + "supplierCount": 923, "supplyApyPercentage": "157.57792083092227", "supplyBalanceCents": "44362974574.359412320127072323564288", "supplyBalanceTokens": "844923.83256419589412162352", @@ -1304,7 +1304,7 @@ exports[`getLegacyPool - Feature enabled: Prime > filters out Prime distribution "type": "rewardDistributor", }, ], - "borrowerCount": 0, + "borrowerCount": 68, "cashTokens": "2259657.074761148481496107", "collateralFactor": 0.6, "disabledTokenActions": [], @@ -1313,7 +1313,7 @@ exports[`getLegacyPool - Feature enabled: Prime > filters out Prime distribution "liquidityCents": "1444669788.91666196711723462774301", "reserveFactor": 0.25, "reserveTokens": "0", - "supplierCount": 0, + "supplierCount": 274, "supplyApyPercentage": "1.8360754649567212", "supplyBalanceCents": "1711197065.9464062401284554003137589", "supplyBalanceTokens": "2676541.43946341921611527123", @@ -1379,7 +1379,7 @@ exports[`getLegacyPool - Feature enabled: Prime > filters out Prime distribution "type": "prime", }, ], - "borrowerCount": 0, + "borrowerCount": 249, "cashTokens": "1.0000736633870942814396398228131475074669e+34", "collateralFactor": 0.8, "disabledTokenActions": [], @@ -1388,7 +1388,7 @@ exports[`getLegacyPool - Feature enabled: Prime > filters out Prime distribution "liquidityCents": "1.000036490649026183145198711400933542774047455327e+36", "reserveFactor": 0.1, "reserveTokens": "0", - "supplierCount": 0, + "supplierCount": 670, "supplyApyPercentage": "0", "supplyBalanceCents": "1.00003649064902618314530970887489046343322854178897705712904885e+36", "supplyBalanceTokens": "1.000073663387094281439750824413033895903139261475326095e+34", @@ -1464,7 +1464,7 @@ exports[`getLegacyPool - Feature enabled: Prime > filters out Prime distribution "type": "prime", }, ], - "borrowerCount": 0, + "borrowerCount": 229, "cashTokens": "1.010176805025969148511141552e+21", "collateralFactor": 0.81, "disabledTokenActions": [], @@ -1473,7 +1473,7 @@ exports[`getLegacyPool - Feature enabled: Prime > filters out Prime distribution "liquidityCents": "1.01015151019877129824366283301553792e+23", "reserveFactor": 0.1, "reserveTokens": "0", - "supplierCount": 0, + "supplierCount": 534, "supplyApyPercentage": "2.7328805884e-8", "supplyBalanceCents": "1.0101515258227468345608256850251328456045167117888e+23", "supplyBalanceTokens": "1.01017682065033591897223674983334867265528e+21", diff --git a/apps/evm/src/clients/api/queries/getLegacyPool/formatToPool/index.ts b/apps/evm/src/clients/api/queries/getLegacyPool/formatToPool/index.ts index 68244d15e4..568c28c286 100644 --- a/apps/evm/src/clients/api/queries/getLegacyPool/formatToPool/index.ts +++ b/apps/evm/src/clients/api/queries/getLegacyPool/formatToPool/index.ts @@ -5,7 +5,6 @@ import type { VenusLens } from 'libs/contracts'; import type { Asset, ChainId, Market, Pool, PrimeApy, Token, VToken } from 'types'; import { addUserPropsToPool, - areAddressesEqual, calculateDailyTokenRate, calculateYearlyPercentageRate, convertDollarsToCents, @@ -31,7 +30,6 @@ export interface FormatToPoolInput { userCollateralizedVTokenAddresses?: string[]; userVTokenBalances?: Awaited>; userVaiBorrowBalanceMantissa?: BigNumber; - mainMarkets?: Market[]; blocksPerDay?: number; } @@ -50,7 +48,6 @@ export const formatToPool = ({ userVTokenBalances, userVaiBorrowBalanceMantissa, primeApyMap, - mainMarkets, }: FormatToPoolInput) => { const assets: Asset[] = []; @@ -219,10 +216,6 @@ export const formatToPool = ({ : new BigNumber(0); const userWalletBalanceCents = userWalletBalanceTokens.multipliedBy(tokenPriceCents); - const market = (mainMarkets || []).find(mainMarket => - areAddressesEqual(mainMarket.vTokenAddress, vToken.address), - ); - const disabledTokenActions = getDisabledTokenActions({ bitmask: legacyPoolMarket.pausedActionsBitmap, tokenAddresses: [vToken.address, vToken.underlyingToken.address], @@ -249,8 +242,8 @@ export const formatToPool = ({ borrowBalanceCents, supplyDistributions, borrowDistributions, - supplierCount: market?.supplierCount || 0, - borrowerCount: market?.borrowerCount || 0, + supplierCount: legacyPoolMarket?.supplierCount || 0, + borrowerCount: legacyPoolMarket?.borrowerCount || 0, // User-specific props userSupplyBalanceTokens, userSupplyBalanceCents,