diff --git a/packages/dma-library/package.json b/packages/dma-library/package.json index 4d425afe0..fcbb743fd 100644 --- a/packages/dma-library/package.json +++ b/packages/dma-library/package.json @@ -1,6 +1,6 @@ { "name": "@oasisdex/dma-library", - "version": "0.6.74", + "version": "0.6.75", "typings": "lib/index.d.ts", "types": "lib/index.d.ts", "main": "lib/index.js", diff --git a/packages/dma-library/src/protocols/aave/get-aave-protocol-data.ts b/packages/dma-library/src/protocols/aave/get-aave-protocol-data.ts index f661ea33b..1d7847ca8 100644 --- a/packages/dma-library/src/protocols/aave/get-aave-protocol-data.ts +++ b/packages/dma-library/src/protocols/aave/get-aave-protocol-data.ts @@ -94,6 +94,8 @@ export async function getAaveV3ProtocolData({ 'AAVE_V3', ) + const networkData = await provider.getNetwork() + const [ flashloanPrice, debtPrice, @@ -120,7 +122,15 @@ export async function getAaveV3ProtocolData({ }) const isCollateralEthCorrelated = collateralTokenSymbol?.toUpperCase().includes('ETH') || false const isDebtEthCorrelated = debtTokenSymbol?.toUpperCase().includes('ETH') || false - const reserveEModeCategory = isCollateralEthCorrelated && isDebtEthCorrelated ? 1 : 0 + const reserveEModeCategory = + isCollateralEthCorrelated && isDebtEthCorrelated + ? { + 1: 1, // MAINNET + 42161: 2, // ARBITRUM + 10: 2, // OPTIMISM + 8453: 1, // BASE + }[networkData.chainId] + : 0 let eModeCategoryData if (pool && reserveEModeCategory !== 0) {