From 05f6d5261b032fe52919ae3cbc6367c66148a9f6 Mon Sep 17 00:00:00 2001 From: JoaquinBattilana Date: Tue, 23 Apr 2024 15:29:49 +0100 Subject: [PATCH] Feat: Restyled migration tool (#1864) Co-authored-by: Nikita Boakrev --- pages/_app.page.tsx | 49 ++- pages/index.page.tsx | 6 +- pages/v3-migration.page.tsx | 281 ++++++++------- src/components/lists/ListWrapper.tsx | 12 +- src/components/primitives/Link.tsx | 1 + .../transactions/Borrow/BorrowModal.tsx | 2 - .../transactions/FlowCommons/ModalWrapper.tsx | 17 +- .../MigrateV3/MigrateV3ModalContent.tsx | 30 +- .../transactions/Repay/RepayModal.tsx | 8 +- .../transactions/Supply/SupplyModal.tsx | 2 - .../transactions/Withdraw/WithdrawModal.tsx | 2 - .../useMigrationExceptionsSupplyBalance.ts | 30 ++ .../migration/useUserMigrationReserves.ts | 26 +- .../migration/useUserSummaryAfterMigration.ts | 32 +- src/hooks/useModal.tsx | 7 + src/layouts/AppFooter.tsx | 2 +- src/layouts/MobileMenu.tsx | 10 + src/layouts/MoreMenu.tsx | 7 +- src/locales/en/messages.js | 2 +- src/locales/en/messages.po | 38 +-- src/modules/dashboard/DashboardTopPanel.tsx | 2 +- .../migration/MigrationBottomPanel.tsx | 319 ++++++++++-------- src/modules/migration/MigrationList.tsx | 3 +- src/modules/migration/MigrationLists.tsx | 22 +- src/modules/migration/MigrationMarketCard.tsx | 168 +++++++++ .../migration/MigrationSelectionBox.tsx | 68 ++-- src/modules/migration/MigrationTopPanel.tsx | 24 -- .../reserve-overview/ReserveActions.tsx | 4 +- src/services/MigrationService.ts | 67 ++++ src/store/v3MigrationSelectors.ts | 19 +- src/store/v3MigrationSlice.ts | 50 +-- src/ui-config/SharedDependenciesProvider.tsx | 4 + src/ui-config/queries.ts | 11 + src/utils/theme.tsx | 3 +- 34 files changed, 819 insertions(+), 509 deletions(-) create mode 100644 src/hooks/migration/useMigrationExceptionsSupplyBalance.ts create mode 100644 src/modules/migration/MigrationMarketCard.tsx create mode 100644 src/services/MigrationService.ts diff --git a/pages/_app.page.tsx b/pages/_app.page.tsx index 9e9c15c364..3a4dad47f9 100644 --- a/pages/_app.page.tsx +++ b/pages/_app.page.tsx @@ -17,7 +17,6 @@ import { TransactionEventHandler } from 'src/components/TransactionEventHandler' import { GasStationProvider } from 'src/components/transactions/GasStation/GasStationProvider'; import { AppDataProvider } from 'src/hooks/app-data-provider/useAppDataProvider'; import { ModalContextProvider } from 'src/hooks/useModal'; -import { PermissionProvider } from 'src/hooks/usePermissions'; import { Web3ContextProvider } from 'src/libs/web3-data-provider/Web3Provider'; import { useRootStore } from 'src/store/root'; import { SharedDependenciesProvider } from 'src/ui-config/SharedDependenciesProvider'; @@ -139,31 +138,29 @@ export default function MyApp(props: MyAppProps) { - - - - - - {getLayout()} - - - - - - - - - - - - - - - - - - - + + + + + {getLayout()} + + + + + + + + + + + + + + + + + + diff --git a/pages/index.page.tsx b/pages/index.page.tsx index d7bb8439c6..f934df8fbd 100644 --- a/pages/index.page.tsx +++ b/pages/index.page.tsx @@ -3,7 +3,6 @@ import { Box, Typography } from '@mui/material'; import { useEffect, useState } from 'react'; import StyledToggleButton from 'src/components/StyledToggleButton'; import StyledToggleButtonGroup from 'src/components/StyledToggleButtonGroup'; -import { usePermissions } from 'src/hooks/usePermissions'; import { useProtocolDataContext } from 'src/hooks/useProtocolDataContext'; import { useRootStore } from 'src/store/root'; @@ -17,7 +16,6 @@ import { DashboardTopPanel } from '../src/modules/dashboard/DashboardTopPanel'; export default function Home() { const { currentAccount, loading: web3Loading } = useWeb3Context(); const { currentMarket } = useProtocolDataContext(); - const { isPermissionsLoading } = usePermissions(); const trackEvent = useRootStore((store) => store.trackEvent); const [mode, setMode] = useState<'supply' | 'borrow' | ''>('supply'); @@ -33,7 +31,7 @@ export default function Home() { - {currentAccount && !isPermissionsLoading && ( + {currentAccount && ( )} - {currentAccount && !isPermissionsLoading ? ( + {currentAccount ? ( ) : ( diff --git a/pages/v3-migration.page.tsx b/pages/v3-migration.page.tsx index 988093d268..e0ecce54ab 100644 --- a/pages/v3-migration.page.tsx +++ b/pages/v3-migration.page.tsx @@ -1,14 +1,15 @@ import { Trans } from '@lingui/macro'; -import { Box, Divider, useMediaQuery, useTheme } from '@mui/material'; +import { Box } from '@mui/material'; import dynamic from 'next/dynamic'; -import { useEffect, useMemo } from 'react'; +import { useRouter } from 'next/router'; +import { useEffect, useState } from 'react'; import { ConnectWalletPaper } from 'src/components/ConnectWalletPaper'; import { ContentContainer } from 'src/components/ContentContainer'; +import { getMarketInfoById } from 'src/components/MarketSwitcher'; import { useUserMigrationReserves } from 'src/hooks/migration/useUserMigrationReserves'; import { useUserSummaryAfterMigration } from 'src/hooks/migration/useUserSummaryAfterMigration'; import { useUserPoolReservesHumanized } from 'src/hooks/pool/useUserPoolReserves'; import { useUserSummaryAndIncentives } from 'src/hooks/pool/useUserSummaryAndIncentives'; -import { usePermissions } from 'src/hooks/usePermissions'; import { MainLayout } from 'src/layouts/MainLayout'; import { useWeb3Context } from 'src/libs/hooks/useWeb3Context'; import { DashboardContentNoData } from 'src/modules/dashboard/DashboardContentNoData'; @@ -20,6 +21,12 @@ import { MigrationLists } from 'src/modules/migration/MigrationLists'; import { MigrationTopPanel } from 'src/modules/migration/MigrationTopPanel'; import { selectCurrentChainIdV3MarketData } from 'src/store/poolSelectors'; import { useRootStore } from 'src/store/root'; +import { + CustomMarket, + getNetworkConfig, + MarketDataType, + marketsData, +} from 'src/utils/marketsAndNetworksConfig'; const MigrateV3Modal = dynamic(() => import('src/components/transactions/MigrateV3/MigrateV3Modal').then( @@ -27,11 +34,38 @@ const MigrateV3Modal = dynamic(() => ) ); +const AAVE_MARKETS_TO_MIGRATE = Object.keys(marketsData) + .map((key) => { + const market = marketsData[key]; + return { + ...market, + }; + }) + .filter((market) => market.addresses.V3_MIGRATOR); + +const selectableMarkets = [ + { + title: 'Aave V2 Markets', + markets: AAVE_MARKETS_TO_MIGRATE, + }, +]; + export default function V3Migration() { const { currentAccount, loading: web3Loading } = useWeb3Context(); - const currentChainId = useRootStore((store) => store.currentChainId); - const currentNetworkConfig = useRootStore((store) => store.currentNetworkConfig); - const currentMarketData = useRootStore((store) => store.currentMarketData); + const router = useRouter(); + const [fromMarketData, setFromMarketData] = useState(() => { + if (router.query.market) { + const { market } = getMarketInfoById(router.query.market as CustomMarket); + const migrationMarket = AAVE_MARKETS_TO_MIGRATE.find( + (migrationMarket) => + migrationMarket.isFork === market.isFork && migrationMarket.chainId === market.chainId + ); + if (migrationMarket) { + return market; + } + } + return AAVE_MARKETS_TO_MIGRATE[0]; + }); const { selectAllSupply, selectAllBorrow, @@ -41,29 +75,22 @@ export default function V3Migration() { selectedMigrationBorrowAssets: selectedBorrowAssets, resetMigrationSelectedAssets, enforceAsCollateral, - getMigrationExceptionSupplyBalances, } = useRootStore(); - const { isPermissionsLoading } = usePermissions(); - const theme = useTheme(); - const downToSM = useMediaQuery(theme.breakpoints.down('sm')); - - const toMarketData = selectCurrentChainIdV3MarketData(currentChainId, currentNetworkConfig); - const fromMarketData = currentMarketData; + const toMarketData = selectCurrentChainIdV3MarketData( + fromMarketData.chainId, + getNetworkConfig(fromMarketData.chainId) + ); const { data: userMigrationReserves, isLoading: userMigrationReservesLoading } = - useUserMigrationReserves(currentMarketData, toMarketData); + useUserMigrationReserves(fromMarketData, toMarketData); - const supplyReserves = useMemo( - () => userMigrationReserves?.supplyReserves || [], - [userMigrationReserves] - ); + const supplyReserves = userMigrationReserves?.supplyReserves || []; const borrowReserves = userMigrationReserves?.borrowReserves || []; const isolatedReserveV3 = userMigrationReserves?.isolatedReserveV3; const { data: fromUserSummaryAndIncentives, isLoading: fromUserSummaryAndIncentivesLoading } = useUserSummaryAndIncentives(fromMarketData); - const fromHealthFactor = fromUserSummaryAndIncentives?.healthFactor || '0'; const { data: toUserReservesData, isLoading: toUserReservesDataLoading } = useUserPoolReservesHumanized(toMarketData); @@ -81,12 +108,6 @@ export default function V3Migration() { toUserSummaryForMigrationLoading || userSummaryAfterMigrationLoading; - useEffect(() => { - if (getMigrationExceptionSupplyBalances && supplyReserves.length > 0) { - getMigrationExceptionSupplyBalances(supplyReserves); - } - }, [getMigrationExceptionSupplyBalances, supplyReserves]); - useEffect(() => { if (resetMigrationSelectedAssets) { resetMigrationSelectedAssets(); @@ -108,115 +129,129 @@ export default function V3Migration() { }; const userControlledCollateral = - Object.keys(selectedSupplyAssets).length > 1 && + selectedSupplyAssets.length > 1 && toUserSummaryForMigration && toUserSummaryForMigration.totalCollateralMarketReferenceCurrency == '0'; + const changeFromMarketData = (marketData: MarketDataType) => { + resetMigrationSelectedAssets(); + setFromMarketData(marketData); + }; + + const bottomPanelProps = fromUserSummaryAndIncentives && + toUserSummaryForMigration && { + fromUserSummaryBeforeMigration: fromUserSummaryAndIncentives, + toUserSummaryBeforeMigration: toUserSummaryForMigration, + }; + return ( <> - {currentAccount && !isPermissionsLoading ? ( + {currentAccount ? ( - 0} - isBorrowPositionsAvailable={borrowReserves.length > 0} - onSelectAllSupplies={handleToggleAllSupply} - onSelectAllBorrows={handleToggleAllBorrow} - emodeCategoryId={toUserEModeCategoryId} - isolatedReserveV3={isolatedReserveV3} - supplyReserves={supplyReserves} - borrowReserves={borrowReserves} - suppliesPositions={ - <> - {loading ? ( - <> - - - - ) : supplyReserves.length > 0 ? ( - supplyReserves.map((reserve) => ( - - selectedAsset.underlyingAsset == reserve.underlyingAsset - ) >= 0 - } - enableAsCollateral={() => - enabledAsCollateral(reserve.canBeEnforced, reserve.underlyingAsset) - } - userControlledCollateral={userControlledCollateral} - canBeEnforced={ - toUserSummaryForMigration && - toUserSummaryForMigration.totalCollateralMarketReferenceCurrency == '0' && - reserve.canBeEnforced - } - userReserve={reserve} - amount={reserve.underlyingBalance} - amountInUSD={reserve.underlyingBalanceUSD} - onCheckboxClick={() => { - toggleSelectedSupplyPosition(reserve.underlyingAsset); - }} - enabledAsCollateral={reserve.usageAsCollateralEnabledOnUserV3} - isIsolated={reserve.isolatedOnV3} - enteringIsolation={isolatedReserveV3?.enteringIsolationMode || false} - v3Rates={reserve.v3Rates} - disabled={reserve.migrationDisabled} - isSupplyList - /> - )) - ) : ( - - Nothing supplied yet} /> - - )} - - } - borrowsPositions={ - <> - {loading ? ( - <> - - - - ) : borrowReserves.length > 0 ? ( - borrowReserves.map((reserve) => ( - - )) - ) : ( - - Nothing borrowed yet} /> - - )} - - } - /> - - {!downToSM && } - - {userSummaryAfterMigration && ( + + 0} + isBorrowPositionsAvailable={borrowReserves.length > 0} + onSelectAllSupplies={handleToggleAllSupply} + onSelectAllBorrows={handleToggleAllBorrow} + emodeCategoryId={toUserEModeCategoryId} + isolatedReserveV3={isolatedReserveV3} + supplyReserves={supplyReserves} + borrowReserves={borrowReserves} + suppliesPositions={ + <> + {loading ? ( + <> + + + + ) : supplyReserves.length > 0 ? ( + supplyReserves.map((reserve) => ( + + selectedAsset.underlyingAsset == reserve.underlyingAsset + ) >= 0 + } + enableAsCollateral={() => + enabledAsCollateral(reserve.canBeEnforced, reserve.underlyingAsset) + } + userControlledCollateral={userControlledCollateral} + canBeEnforced={ + toUserSummaryForMigration && + toUserSummaryForMigration.totalCollateralMarketReferenceCurrency == '0' && + reserve.canBeEnforced + } + userReserve={reserve} + amount={reserve.underlyingBalance} + amountInUSD={reserve.underlyingBalanceUSD} + onCheckboxClick={() => { + toggleSelectedSupplyPosition(reserve.underlyingAsset); + }} + enabledAsCollateral={reserve.usageAsCollateralEnabledOnUserV3} + isIsolated={reserve.isolatedOnV3} + enteringIsolation={isolatedReserveV3?.enteringIsolationMode || false} + v3Rates={reserve.v3Rates} + disabled={reserve.migrationDisabled} + isSupplyList + /> + )) + ) : ( + + Nothing supplied yet} /> + + )} + + } + borrowsPositions={ + <> + {loading ? ( + <> + + + + ) : borrowReserves.length > 0 ? ( + borrowReserves.map((reserve) => ( + + )) + ) : ( + + Nothing borrowed yet} /> + + )} + + } /> - )} + ) : ( { const [isCollapse, setIsCollapse] = useState( localStorageName ? localStorage.getItem(localStorageName) === 'true' : false @@ -88,10 +90,12 @@ export const ListWrapper = ({ return ( ({ + sx={{ mt: withTopMargin ? 4 : 0, - border: `1px solid ${theme.palette.divider}`, - })} + border: 1, + borderColor: 'divider', + ...paperSx, + }} > `/v3-migration/?market=${marketName}`, dynamicRenderedProposal: (proposalId: number) => `/governance/v3/proposal?proposalId=${proposalId}`, reserveOverview: (underlyingAsset: string, marketName: CustomMarket) => diff --git a/src/components/transactions/Borrow/BorrowModal.tsx b/src/components/transactions/Borrow/BorrowModal.tsx index 1d8caa4135..119dd25448 100644 --- a/src/components/transactions/Borrow/BorrowModal.tsx +++ b/src/components/transactions/Borrow/BorrowModal.tsx @@ -1,4 +1,3 @@ -import { PERMISSION } from '@aave/contract-helpers'; import { Trans } from '@lingui/macro'; import React, { useState } from 'react'; import { UserAuthenticated } from 'src/components/UserAuthenticated'; @@ -38,7 +37,6 @@ export const BorrowModal = () => { title={Borrow} underlyingAsset={args.underlyingAsset} keepWrappedSymbol={!borrowUnWrapped} - requiredPermission={PERMISSION.BORROWER} > {(params) => ( diff --git a/src/components/transactions/FlowCommons/ModalWrapper.tsx b/src/components/transactions/FlowCommons/ModalWrapper.tsx index fe2608d2a2..21beff9f41 100644 --- a/src/components/transactions/FlowCommons/ModalWrapper.tsx +++ b/src/components/transactions/FlowCommons/ModalWrapper.tsx @@ -1,4 +1,4 @@ -import { API_ETH_MOCK_ADDRESS, PERMISSION } from '@aave/contract-helpers'; +import { API_ETH_MOCK_ADDRESS } from '@aave/contract-helpers'; import React from 'react'; import { ReactElement } from 'react-markdown/lib/react-markdown'; import { @@ -10,10 +10,9 @@ import { useWalletBalances } from 'src/hooks/app-data-provider/useWalletBalances import { AssetCapsProvider } from 'src/hooks/useAssetCaps'; import { useIsWrongNetwork } from 'src/hooks/useIsWrongNetwork'; import { useModalContext } from 'src/hooks/useModal'; -import { usePermissions } from 'src/hooks/usePermissions'; import { useWeb3Context } from 'src/libs/hooks/useWeb3Context'; import { useRootStore } from 'src/store/root'; -import { getNetworkConfig, isFeatureEnabled } from 'src/utils/marketsAndNetworksConfig'; +import { getNetworkConfig } from 'src/utils/marketsAndNetworksConfig'; import { GENERAL } from 'src/utils/mixPanelEvents'; import { TxModalTitle } from '../FlowCommons/TxModalTitle'; @@ -38,7 +37,6 @@ export const ModalWrapper: React.FC<{ // if true wETH will stay wETH otherwise wETH will be returned as ETH keepWrappedSymbol?: boolean; hideTitleSymbol?: boolean; - requiredPermission?: PERMISSION; children: (props: ModalWrapperProps) => React.ReactNode; action?: string; }> = ({ @@ -47,7 +45,6 @@ export const ModalWrapper: React.FC<{ children, requiredChainId: _requiredChainId, title, - requiredPermission, keepWrappedSymbol, }) => { const { readOnlyModeAddress } = useWeb3Context(); @@ -56,7 +53,6 @@ export const ModalWrapper: React.FC<{ const { walletBalances } = useWalletBalances(currentMarketData); const { user, reserves } = useAppDataContext(); const { txError, mainTxState } = useModalContext(); - const { permissions } = usePermissions(); const { isWrongNetwork, requiredChainId } = useIsWrongNetwork(_requiredChainId); @@ -64,15 +60,6 @@ export const ModalWrapper: React.FC<{ return ; } - if ( - requiredPermission && - isFeatureEnabled.permissions(currentMarketData) && - !permissions.includes(requiredPermission) && - currentMarketData.permissionComponent - ) { - return <>{currentMarketData.permissionComponent}; - } - const poolReserve = reserves.find((reserve) => { if (underlyingAsset.toLowerCase() === API_ETH_MOCK_ADDRESS.toLowerCase()) return reserve.isWrappedBaseAsset; diff --git a/src/components/transactions/MigrateV3/MigrateV3ModalContent.tsx b/src/components/transactions/MigrateV3/MigrateV3ModalContent.tsx index e081a9d86f..e1d3b25d2f 100644 --- a/src/components/transactions/MigrateV3/MigrateV3ModalContent.tsx +++ b/src/components/transactions/MigrateV3/MigrateV3ModalContent.tsx @@ -32,6 +32,15 @@ export const MigrateV3ModalContent = ({ toUserSummaryForMigration, userMigrationReserves, }: MigrationV3ModalContentProps) => { + const currentChainId = useRootStore((store) => store.currentChainId); + const setCurrentMarket = useRootStore((store) => store.setCurrentMarket); + const currentMarket = useRootStore((store) => store.currentMarket); + + const { gasLimit, mainTxState: migrateTxState, txError, closeWithCb } = useModalContext(); + const { chainId: connectedChainId, readOnlyModeAddress } = useWeb3Context(); + const router = useRouter(); + const networkConfig = getNetworkConfig(currentChainId); + const { supplyPositions, borrowPositions } = useRootStore( useCallback( (state) => ({ @@ -50,15 +59,6 @@ export const MigrateV3ModalContent = ({ ) ); - const currentChainId = useRootStore((store) => store.currentChainId); - const setCurrentMarket = useRootStore((store) => store.setCurrentMarket); - const currentMarket = useRootStore((store) => store.currentMarket); - - const { gasLimit, mainTxState: migrateTxState, txError } = useModalContext(); - const { chainId: connectedChainId, readOnlyModeAddress } = useWeb3Context(); - const router = useRouter(); - const networkConfig = getNetworkConfig(currentChainId); - const supplyAssets = supplyPositions.map((supplyAsset) => { return { underlyingAsset: supplyAsset.underlyingAsset, @@ -90,11 +90,11 @@ export const MigrateV3ModalContent = ({ return ; } - const handleRoute = () => { - if (currentMarket === CustomMarket.proto_polygon) { + const handleRoute = (market: CustomMarket) => { + if (market === CustomMarket.proto_polygon) { setCurrentMarket('proto_polygon_v3' as CustomMarket); router.push(`/?marketName=${CustomMarket.proto_polygon_v3}`); - } else if (currentMarket === CustomMarket.proto_avalanche) { + } else if (market === CustomMarket.proto_avalanche) { setCurrentMarket('proto_avalanche_v3' as CustomMarket); router.push(`/?marketName=${CustomMarket.proto_avalanche_v3}`); } else { @@ -103,12 +103,16 @@ export const MigrateV3ModalContent = ({ } }; + const handleGoToDashboard = () => { + closeWithCb(() => handleRoute(currentMarket)); + }; + if (migrateTxState.success) { return ( - diff --git a/src/components/transactions/Repay/RepayModal.tsx b/src/components/transactions/Repay/RepayModal.tsx index b5f69f4b72..1b7595a723 100644 --- a/src/components/transactions/Repay/RepayModal.tsx +++ b/src/components/transactions/Repay/RepayModal.tsx @@ -1,4 +1,4 @@ -import { InterestRate, PERMISSION } from '@aave/contract-helpers'; +import { InterestRate } from '@aave/contract-helpers'; import { Trans } from '@lingui/macro'; import React, { useState } from 'react'; import { UserAuthenticated } from 'src/components/UserAuthenticated'; @@ -45,11 +45,7 @@ export const RepayModal = () => { return ( - Repay} - underlyingAsset={args.underlyingAsset} - requiredPermission={PERMISSION.BORROWER} - > + Repay} underlyingAsset={args.underlyingAsset}> {(params) => { return ( diff --git a/src/components/transactions/Supply/SupplyModal.tsx b/src/components/transactions/Supply/SupplyModal.tsx index 1a360545ea..9f6e8b6a06 100644 --- a/src/components/transactions/Supply/SupplyModal.tsx +++ b/src/components/transactions/Supply/SupplyModal.tsx @@ -1,4 +1,3 @@ -import { PERMISSION } from '@aave/contract-helpers'; import { Trans } from '@lingui/macro'; import React from 'react'; import { UserAuthenticated } from 'src/components/UserAuthenticated'; @@ -19,7 +18,6 @@ export const SupplyModal = () => { action="supply" title={Supply} underlyingAsset={args.underlyingAsset} - requiredPermission={PERMISSION.DEPOSITOR} > {(params) => ( diff --git a/src/components/transactions/Withdraw/WithdrawModal.tsx b/src/components/transactions/Withdraw/WithdrawModal.tsx index 5bf6ce870d..ee6fdfe4f1 100644 --- a/src/components/transactions/Withdraw/WithdrawModal.tsx +++ b/src/components/transactions/Withdraw/WithdrawModal.tsx @@ -1,4 +1,3 @@ -import { PERMISSION } from '@aave/contract-helpers'; import { Trans } from '@lingui/macro'; import React, { useState } from 'react'; import { UserAuthenticated } from 'src/components/UserAuthenticated'; @@ -40,7 +39,6 @@ export const WithdrawModal = () => { title={Withdraw} underlyingAsset={args.underlyingAsset} keepWrappedSymbol={!withdrawUnWrapped} - requiredPermission={PERMISSION.DEPOSITOR} > {(params) => ( diff --git a/src/hooks/migration/useMigrationExceptionsSupplyBalance.ts b/src/hooks/migration/useMigrationExceptionsSupplyBalance.ts new file mode 100644 index 0000000000..a1a984198c --- /dev/null +++ b/src/hooks/migration/useMigrationExceptionsSupplyBalance.ts @@ -0,0 +1,30 @@ +import { useQuery } from '@tanstack/react-query'; +import { MigrationSupplyException } from 'src/store/v3MigrationSlice'; +import { MarketDataType } from 'src/ui-config/marketsConfig'; +import { queryKeysFactory } from 'src/ui-config/queries'; +import { useSharedDependencies } from 'src/ui-config/SharedDependenciesProvider'; +import invariant from 'tiny-invariant'; + +export const useMigrationExceptionsSupplyBalance = ( + fromMarketData: MarketDataType, + toMarketData: MarketDataType, + supplyExceptions?: MigrationSupplyException[] +) => { + const { migrationService } = useSharedDependencies(); + return useQuery({ + queryKey: queryKeysFactory.migrationExceptions( + supplyExceptions || [], + fromMarketData, + toMarketData + ), + queryFn: () => { + invariant(supplyExceptions, 'Supply exceptions are required'); + return migrationService.getMigrationExceptionSupplyBalances( + supplyExceptions, + fromMarketData, + toMarketData + ); + }, + enabled: !!supplyExceptions, + }); +}; diff --git a/src/hooks/migration/useUserMigrationReserves.ts b/src/hooks/migration/useUserMigrationReserves.ts index 53d1485501..ef06c10454 100644 --- a/src/hooks/migration/useUserMigrationReserves.ts +++ b/src/hooks/migration/useUserMigrationReserves.ts @@ -32,6 +32,7 @@ import { useUserSummaryAndIncentives, } from '../pool/useUserSummaryAndIncentives'; import { combineQueries, SimplifiedUseQueryResult } from '../pool/utils'; +import { useMigrationExceptionsSupplyBalance } from './useMigrationExceptionsSupplyBalance'; export type SupplyMigrationReserve = ComputedUserReserve & { usageAsCollateralEnabledOnUserV3: boolean; @@ -62,7 +63,6 @@ const select = memoize( toReservesIncentivesData: ReservesIncentiveDataHumanized[], fromUserSummaryAndIncentives: UserSummaryAndIncentives, migrationExceptions: Record, - exceptionsBalancesLoading: boolean, selectedMigrationSupplyAssets: MigrationSelectedAsset[] ): UserMigrationReserves => { const { userReservesData: userReserveV3Data, ...v3ReservesUserSummary } = @@ -89,13 +89,11 @@ const select = memoize( const definitiveAssets = selectDefinitiveSupplyAssetForMigration( selectedMigrationSupplyAssets, migrationExceptions, - exceptionsBalancesLoading, v3ReservesMap ); if (definitiveAssets.length > 0) { const underlyingAssetAddress = selectMigrationUnderlyingAssetWithExceptions( migrationExceptions, - exceptionsBalancesLoading, definitiveAssets[0] ); const definitiveAsset = v3ReservesMap[underlyingAssetAddress]; @@ -119,7 +117,6 @@ const select = memoize( let migrationDisabled: MigrationDisabled | undefined; const underlyingAssetAddress = selectMigrationUnderlyingAssetWithExceptions( migrationExceptions, - exceptionsBalancesLoading, userReserve ); @@ -253,8 +250,18 @@ export const useUserMigrationReserves = ( const toReservesIncentivesDataQuery = usePoolReservesIncentivesHumanized(migrationTo); const fromUserSummaryAndIncentives = useUserSummaryAndIncentives(migrationFrom); - const migrationExceptions = useRootStore((store) => store.migrationExceptions); - const exceptionsBalancesLoading = useRootStore((store) => store.exceptionsBalancesLoading); + const userReservesV2Data = fromUserSummaryAndIncentives.data?.userReservesData; + + const supplyReserves = userReservesV2Data?.filter( + (userReserve) => userReserve.underlyingBalance !== '0' + ); + + const migrationsExceptionsQuery = useMigrationExceptionsSupplyBalance( + migrationFrom, + migrationTo, + supplyReserves + ); + const selectedMigrationSupplyAssets = useRootStore( (store) => store.selectedMigrationSupplyAssets ); @@ -263,15 +270,15 @@ export const useUserMigrationReserves = ( toReservesData: ReservesDataHumanized, toUserReservesData: UserReservesDataHumanized, toReservesIncentivesData: ReservesIncentiveDataHumanized[], - fromUserSummaryAndIncentives: UserSummaryAndIncentives + fromUserSummaryAndIncentives: UserSummaryAndIncentives, + migrationsExceptions: Record ) => { return select( toReservesData, toUserReservesData, toReservesIncentivesData, fromUserSummaryAndIncentives, - migrationExceptions, - exceptionsBalancesLoading, + migrationsExceptions, selectedMigrationSupplyAssets ); }; @@ -282,6 +289,7 @@ export const useUserMigrationReserves = ( toUserReservesDataQuery, toReservesIncentivesDataQuery, fromUserSummaryAndIncentives, + migrationsExceptionsQuery, ] as const, selector ); diff --git a/src/hooks/migration/useUserSummaryAfterMigration.ts b/src/hooks/migration/useUserSummaryAfterMigration.ts index ed41f1a505..684c9ee8a8 100644 --- a/src/hooks/migration/useUserSummaryAfterMigration.ts +++ b/src/hooks/migration/useUserSummaryAfterMigration.ts @@ -19,11 +19,22 @@ import { } from 'src/store/v3MigrationSlice'; import { MarketDataType } from 'src/ui-config/marketsConfig'; -import { combineQueries } from '../pool/utils'; +import { combineQueries, SimplifiedUseQueryResult } from '../pool/utils'; +import { useMigrationExceptionsSupplyBalance } from './useMigrationExceptionsSupplyBalance'; import { usePoolReserve } from './usePoolReserve'; import { UserMigrationReserves, useUserMigrationReserves } from './useUserMigrationReserves'; import { UserSummaryForMigration, useUserSummaryForMigration } from './useUserSummaryForMigration'; +export interface UserSummaryAfterMigration { + fromUserSummaryAfterMigration: UserSummaryForMigration; + toUserSummaryAfterMigration: { + healthFactor: string; + currentLoanToValue: string; + totalCollateralMarketReferenceCurrency: string; + totalBorrowsMarketReferenceCurrency: string; + }; +} + const select = memoize( ( userMigrationReserves: UserMigrationReserves, @@ -200,11 +211,16 @@ const select = memoize( export const useUserSummaryAfterMigration = ( fromMarket: MarketDataType, toMarket: MarketDataType -) => { +): SimplifiedUseQueryResult => { const userMigrationReservesQuery = useUserMigrationReserves(fromMarket, toMarket); const toUserSummary = useUserSummaryForMigration(toMarket); const fromPoolReserve = usePoolReserve(fromMarket); const toPoolReserve = usePoolReserve(toMarket); + const migrationExceptionsQuery = useMigrationExceptionsSupplyBalance( + fromMarket, + toMarket, + userMigrationReservesQuery.data?.supplyReserves + ); const selectedMigrationBorrowAssets = useRootStore( (store) => store.selectedMigrationBorrowAssets @@ -212,13 +228,13 @@ export const useUserSummaryAfterMigration = ( const selectedMigrationSupplyAssets = useRootStore( (store) => store.selectedMigrationSupplyAssets ); - const migrationExceptions = useRootStore((store) => store.migrationExceptions); const selector = ( userMigrationReserves: UserMigrationReserves, fromPoolReserve: PoolReserve, toPoolReserve: PoolReserve, - toUserSummary: UserSummaryForMigration + toUserSummary: UserSummaryForMigration, + migrationExceptions: Record ) => { return select( userMigrationReserves, @@ -232,7 +248,13 @@ export const useUserSummaryAfterMigration = ( }; return combineQueries( - [userMigrationReservesQuery, fromPoolReserve, toPoolReserve, toUserSummary] as const, + [ + userMigrationReservesQuery, + fromPoolReserve, + toPoolReserve, + toUserSummary, + migrationExceptionsQuery, + ] as const, selector ); }; diff --git a/src/hooks/useModal.tsx b/src/hooks/useModal.tsx index 1258776e05..a2409ea26f 100644 --- a/src/hooks/useModal.tsx +++ b/src/hooks/useModal.tsx @@ -55,6 +55,8 @@ export type TxStateType = { success?: boolean; }; +type CallbackFn = () => void; + export interface ModalContextType { openSupply: ( underlyingAsset: string, @@ -112,6 +114,7 @@ export interface ModalContextType { representatives: Array<{ chainId: ChainId; representative: string }> ) => void; close: () => void; + closeWithCb: (callback: CallbackFn) => void; type?: ModalType; args: T; mainTxState: TxStateType; @@ -335,6 +338,10 @@ export const ModalContextProvider: React.FC = ({ children }) => { setTxError(undefined); setSwitchNetworkError(undefined); }, + closeWithCb: (callback) => { + close(); + callback(); + }, type, args, approvalTxState, diff --git a/src/layouts/AppFooter.tsx b/src/layouts/AppFooter.tsx index 69fa64beb2..ab98fcc6a1 100644 --- a/src/layouts/AppFooter.tsx +++ b/src/layouts/AppFooter.tsx @@ -80,7 +80,7 @@ export function AppFooter() { }, }, { - href: '', + href: '/', label: Manage analytics, key: 'Manage analytics', onClick: (event: React.MouseEvent) => { diff --git a/src/layouts/MobileMenu.tsx b/src/layouts/MobileMenu.tsx index 93563bc473..74937ad5d2 100644 --- a/src/layouts/MobileMenu.tsx +++ b/src/layouts/MobileMenu.tsx @@ -82,6 +82,16 @@ export const MobileMenu = ({ open, setOpen, headerHeight }: MobileMenuProps) => Links}> + setOpen(false)} + > + + Migrate to Aave V3 + + {moreNavigation.map((item, index) => ( diff --git a/src/layouts/MoreMenu.tsx b/src/layouts/MoreMenu.tsx index 801349ebb3..c9e7fccee5 100644 --- a/src/layouts/MoreMenu.tsx +++ b/src/layouts/MoreMenu.tsx @@ -1,7 +1,7 @@ import { DotsHorizontalIcon } from '@heroicons/react/solid'; import { Trans } from '@lingui/macro'; import { useLingui } from '@lingui/react'; -import { Button, ListItemIcon, ListItemText, SvgIcon } from '@mui/material'; +import { Button, ListItemIcon, ListItemText, SvgIcon, Typography } from '@mui/material'; import Menu from '@mui/material/Menu'; import MenuItem from '@mui/material/MenuItem'; import React from 'react'; @@ -61,6 +61,11 @@ export function MoreMenu() { onClose={handleClose} keepMounted={true} > + + + Migrate to Aave V3 + + {moreNavigation.map((item, index) => ( <1><2/>Add <3/> stkAAVE to borrow at <4/> (max discount)":"<0><1><2/>Add <3/> stkAAVE to borrow at <4/> (max discount)","<0><1><2/>Add stkAAVE to see borrow rate with discount":"<0><1><2/>Add stkAAVE to see borrow rate with discount","<0>Ampleforth is a rebasing asset. Visit the <1>documentation to learn more.":"<0>Ampleforth is a rebasing asset. Visit the <1>documentation to learn more.","<0>Attention: Parameter changes via governance can alter your account health factor and risk of liquidation. Follow the <1>Aave governance forum for updates.":"<0>Attention: Parameter changes via governance can alter your account health factor and risk of liquidation. Follow the <1>Aave governance forum for updates.","<0>Slippage tolerance <1>{selectedSlippage}% <2>{0}":["<0>Slippage tolerance <1>",["selectedSlippage"],"% <2>",["0"],""],"AAVE, GHO, and ABPT holders (Ethereum network only) can stake their assets in the Safety Module to add more security to the protocol and earn Safety Incentives. In the case of a shortfall event, your stake can be slashed to cover the deficit, providing an additional layer of protection for the protocol.":"AAVE, GHO, and ABPT holders (Ethereum network only) can stake their assets in the Safety Module to add more security to the protocol and earn Safety Incentives. In the case of a shortfall event, your stake can be slashed to cover the deficit, providing an additional layer of protection for the protocol.","APR":"APR","APY":"APY","APY change":"APY change","APY type":"APY type","APY type change":"APY type change","APY with discount applied":"APY with discount applied","APY, borrow rate":"APY, borrow rate","APY, stable":"APY, stable","APY, variable":"APY, variable","AToken supply is not zero":"AToken supply is not zero","Aave Governance":"Aave Governance","Aave aToken":"Aave aToken","Aave debt token":"Aave debt token","Aave is a fully decentralized, community governed protocol by the AAVE token-holders. AAVE token-holders collectively discuss, propose, and vote on upgrades to the protocol. AAVE token-holders (Ethereum network only) can either vote themselves on new proposals or delagate to an address of choice. To learn more check out the Governance":"Aave is a fully decentralized, community governed protocol by the AAVE token-holders. AAVE token-holders collectively discuss, propose, and vote on upgrades to the protocol. AAVE token-holders (Ethereum network only) can either vote themselves on new proposals or delagate to an address of choice. To learn more check out the Governance","Aave per month":"Aave per month","About GHO":"About GHO","Account":"Account","Action cannot be performed because the reserve is frozen":"Action cannot be performed because the reserve is frozen","Action cannot be performed because the reserve is paused":"Action cannot be performed because the reserve is paused","Action requires an active reserve":"Action requires an active reserve","Activate Cooldown":"Activate Cooldown","Add stkAAVE to see borrow APY with the discount":"Add stkAAVE to see borrow APY with the discount","Add to wallet":"Add to wallet","Add {0} to wallet to track your balance.":["Add ",["0"]," to wallet to track your balance."],"Address is not a contract":"Address is not a contract","Addresses":"Addresses","Addresses ({0})":["Addresses (",["0"],")"],"All Assets":"All Assets","All done!":"All done!","All proposals":"All proposals","All transactions":"All transactions","Allowance required action":"Allowance required action","Allows you to decide whether to use a supplied asset as collateral. An asset used as collateral will affect your borrowing power and health factor.":"Allows you to decide whether to use a supplied asset as collateral. An asset used as collateral will affect your borrowing power and health factor.","Allows you to switch between <0>variable and <1>stable interest rates, where variable rate can increase and decrease depending on the amount of liquidity in the reserve, and stable rate will stay the same for the duration of your loan.":"Allows you to switch between <0>variable and <1>stable interest rates, where variable rate can increase and decrease depending on the amount of liquidity in the reserve, and stable rate will stay the same for the duration of your loan.","Amount":"Amount","Amount claimable":"Amount claimable","Amount in cooldown":"Amount in cooldown","Amount must be greater than 0":"Amount must be greater than 0","Amount to migrate":"Amount to migrate","Amount to unstake":"Amount to unstake","An error has occurred fetching the proposal.":"An error has occurred fetching the proposal.","Approve Confirmed":"Approve Confirmed","Approve with":"Approve with","Approve {symbol} to continue":["Approve ",["symbol"]," to continue"],"Approving {symbol}...":["Approving ",["symbol"],"..."],"Array parameters that should be equal length are not":"Array parameters that should be equal length are not","As a result of governance decisions, this ABPT staking pool is now deprecated. You have the flexibility to either migrate all of your tokens to v2 or unstake them without any cooldown period.":"As a result of governance decisions, this ABPT staking pool is now deprecated. You have the flexibility to either migrate all of your tokens to v2 or unstake them without any cooldown period.","Asset":"Asset","Asset can be only used as collateral in isolation mode with limited borrowing power. To enter isolation mode, disable all other collateral.":"Asset can be only used as collateral in isolation mode with limited borrowing power. To enter isolation mode, disable all other collateral.","Asset can only be used as collateral in isolation mode only.":"Asset can only be used as collateral in isolation mode only.","Asset cannot be migrated because you have isolated collateral in {marketName} v3 Market which limits borrowable assets. You can manage your collateral in <0>{marketName} V3 Dashboard":["Asset cannot be migrated because you have isolated collateral in ",["marketName"]," v3 Market which limits borrowable assets. You can manage your collateral in <0>",["marketName"]," V3 Dashboard"],"Asset cannot be migrated due to insufficient liquidity or borrow cap limitation in {marketName} v3 market.":["Asset cannot be migrated due to insufficient liquidity or borrow cap limitation in ",["marketName"]," v3 market."],"Asset cannot be migrated due to supply cap restriction in {marketName} v3 market.":["Asset cannot be migrated due to supply cap restriction in ",["marketName"]," v3 market."],"Asset cannot be migrated to {marketName} V3 Market due to E-mode restrictions. You can disable or manage E-mode categories in your <0>V3 Dashboard":["Asset cannot be migrated to ",["marketName"]," V3 Market due to E-mode restrictions. You can disable or manage E-mode categories in your <0>V3 Dashboard"],"Asset cannot be migrated to {marketName} v3 Market since collateral asset will enable isolation mode.":["Asset cannot be migrated to ",["marketName"]," v3 Market since collateral asset will enable isolation mode."],"Asset cannot be used as collateral.":"Asset cannot be used as collateral.","Asset category":"Asset category","Asset is frozen in {marketName} v3 market, hence this position cannot be migrated.":["Asset is frozen in ",["marketName"]," v3 market, hence this position cannot be migrated."],"Asset is not borrowable in isolation mode":"Asset is not borrowable in isolation mode","Asset is not listed":"Asset is not listed","Asset supply is limited to a certain amount to reduce protocol exposure to the asset and to help manage risks involved.":"Asset supply is limited to a certain amount to reduce protocol exposure to the asset and to help manage risks involved.","Assets":"Assets","Assets to borrow":"Assets to borrow","Assets to supply":"Assets to supply","Assets with zero LTV ({assetsBlockingWithdraw}) must be withdrawn or disabled as collateral to perform this action":["Assets with zero LTV (",["assetsBlockingWithdraw"],") must be withdrawn or disabled as collateral to perform this action"],"At a discount":"At a discount","Available":"Available","Available assets":"Available assets","Available liquidity":"Available liquidity","Available on":"Available on","Available rewards":"Available rewards","Available to borrow":"Available to borrow","Available to supply":"Available to supply","Back to Dashboard":"Back to Dashboard","Balance":"Balance","Balance to revoke":"Balance to revoke","Balancer Pool":"Balancer Pool","Be careful - You are very close to liquidation. Consider depositing more collateral or paying down some of your borrowed positions":"Be careful - You are very close to liquidation. Consider depositing more collateral or paying down some of your borrowed positions","Be mindful of the network congestion and gas prices.":"Be mindful of the network congestion and gas prices.","Because this asset is paused, no actions can be taken until further notice":"Because this asset is paused, no actions can be taken until further notice","Before supplying":"Before supplying","Blocked Address":"Blocked Address","Borrow":"Borrow","Borrow APY":"Borrow APY","Borrow APY rate":"Borrow APY rate","Borrow APY, variable":"Borrow APY, variable","Borrow amount to reach {0}% utilization":["Borrow amount to reach ",["0"],"% utilization"],"Borrow and repay in same block is not allowed":"Borrow and repay in same block is not allowed","Borrow apy":"Borrow apy","Borrow balance":"Borrow balance","Borrow balance after repay":"Borrow balance after repay","Borrow balance after switch":"Borrow balance after switch","Borrow cap":"Borrow cap","Borrow cap is exceeded":"Borrow cap is exceeded","Borrow info":"Borrow info","Borrow power used":"Borrow power used","Borrow rate APY":"Borrow rate APY","Borrow rate change":"Borrow rate change","Borrow {symbol}":["Borrow ",["symbol"]],"Borrowed":"Borrowed","Borrowed asset amount":"Borrowed asset amount","Borrowing is currently unavailable for {0}.":["Borrowing is currently unavailable for ",["0"],"."],"Borrowing is disabled due to an Aave community decision. <0>More details":"Borrowing is disabled due to an Aave community decision. <0>More details","Borrowing is not enabled":"Borrowing is not enabled","Borrowing is unavailable because you’re using Isolation mode. To manage Isolation mode visit your <0>Dashboard.":"Borrowing is unavailable because you’re using Isolation mode. To manage Isolation mode visit your <0>Dashboard.","Borrowing is unavailable because you’ve enabled Efficiency Mode (E-Mode) and Isolation mode. To manage E-Mode and Isolation mode visit your <0>Dashboard.":"Borrowing is unavailable because you’ve enabled Efficiency Mode (E-Mode) and Isolation mode. To manage E-Mode and Isolation mode visit your <0>Dashboard.","Borrowing is unavailable because you’ve enabled Efficiency Mode (E-Mode) for {0} category. To manage E-Mode categories visit your <0>Dashboard.":["Borrowing is unavailable because you’ve enabled Efficiency Mode (E-Mode) for ",["0"]," category. To manage E-Mode categories visit your <0>Dashboard."],"Borrowing of this asset is limited to a certain amount to minimize liquidity pool insolvency.":"Borrowing of this asset is limited to a certain amount to minimize liquidity pool insolvency.","Borrowing power and assets are limited due to Isolation mode.":"Borrowing power and assets are limited due to Isolation mode.","Borrowing this amount will reduce your health factor and increase risk of liquidation.":"Borrowing this amount will reduce your health factor and increase risk of liquidation.","Borrowing {symbol}":["Borrowing ",["symbol"]],"Both":"Both","Buy Crypto With Fiat":"Buy Crypto With Fiat","Buy Crypto with Fiat":"Buy Crypto with Fiat","Buy {cryptoSymbol} with Fiat":["Buy ",["cryptoSymbol"]," with Fiat"],"COPIED!":"COPIED!","COPY IMAGE":"COPY IMAGE","Can be collateral":"Can be collateral","Can be executed":"Can be executed","Can't validate the wallet address. Try again.":"Can't validate the wallet address. Try again.","Cancel":"Cancel","Cannot disable E-Mode":"Cannot disable E-Mode","Choose how much voting/proposition power to give to someone else by delegating some of your AAVE, stkAAVE or aAave balance. Your tokens will remain in your account, but your delegate will be able to vote or propose on your behalf. If your AAVE, stkAAVE or aAave balance changes, your delegate's voting/proposition power will be automatically adjusted.":"Choose how much voting/proposition power to give to someone else by delegating some of your AAVE, stkAAVE or aAave balance. Your tokens will remain in your account, but your delegate will be able to vote or propose on your behalf. If your AAVE, stkAAVE or aAave balance changes, your delegate's voting/proposition power will be automatically adjusted.","Choose one of the on-ramp services":"Choose one of the on-ramp services","Claim":"Claim","Claim all":"Claim all","Claim all rewards":"Claim all rewards","Claim {0}":["Claim ",["0"]],"Claim {symbol}":["Claim ",["symbol"]],"Claimable AAVE":"Claimable AAVE","Claimed":"Claimed","Claiming":"Claiming","Claiming {symbol}":["Claiming ",["symbol"]],"Close":"Close","Collateral":"Collateral","Collateral balance after repay":"Collateral balance after repay","Collateral change":"Collateral change","Collateral is (mostly) the same currency that is being borrowed":"Collateral is (mostly) the same currency that is being borrowed","Collateral to repay with":"Collateral to repay with","Collateral usage":"Collateral usage","Collateral usage is limited because of Isolation mode.":"Collateral usage is limited because of Isolation mode.","Collateral usage is limited because of isolation mode.":"Collateral usage is limited because of isolation mode.","Collateral usage is limited because of isolation mode. <0>Learn More":"Collateral usage is limited because of isolation mode. <0>Learn More","Collateralization":"Collateralization","Collector Contract":"Collector Contract","Collector Info":"Collector Info","Confirm transaction":"Confirm transaction","Confirming transaction":"Confirming transaction","Connect":"Connect","Connect wallet":"Connect wallet","Cooldown period":"Cooldown period","Cooldown period warning":"Cooldown period warning","Cooldown time left":"Cooldown time left","Cooldown to unstake":"Cooldown to unstake","Cooling down...":"Cooling down...","Copy address":"Copy address","Copy error message":"Copy error message","Copy error text":"Copy error text","Covered debt":"Covered debt","Current LTV":"Current LTV","Current differential":"Current differential","Current v2 Balance":"Current v2 Balance","Current v2 balance":"Current v2 balance","Current votes":"Current votes","DAI balance will be converted via DSR contracts and then supplied as sDAI. Switching incurs no additional costs and no slippage.":"DAI balance will be converted via DSR contracts and then supplied as sDAI. Switching incurs no additional costs and no slippage.","Dark mode":"Dark mode","Dashboard":"Dashboard","Data couldn't be fetched, please reload graph.":"Data couldn't be fetched, please reload graph.","Debt":"Debt","Debt ceiling is exceeded":"Debt ceiling is exceeded","Debt ceiling is not zero":"Debt ceiling is not zero","Debt ceiling limits the amount possible to borrow against this asset by protocol users. Debt ceiling is specific to assets in isolation mode and is denoted in USD.":"Debt ceiling limits the amount possible to borrow against this asset by protocol users. Debt ceiling is specific to assets in isolation mode and is denoted in USD.","Delegated power":"Delegated power","Details":"Details","Developers":"Developers","Differential":"Differential","Disable E-Mode":"Disable E-Mode","Disable fork":"Disable fork","Disable testnet":"Disable testnet","Disable {symbol} as collateral":["Disable ",["symbol"]," as collateral"],"Disabled":"Disabled","Disabling E-Mode":"Disabling E-Mode","Disabling this asset as collateral affects your borrowing power and Health Factor.":"Disabling this asset as collateral affects your borrowing power and Health Factor.","Disconnect Wallet":"Disconnect Wallet","Discord channel":"Discord channel","Discount":"Discount","Discount applied for <0/> staking AAVE":"Discount applied for <0/> staking AAVE","Discount model parameters":"Discount model parameters","Discount parameters are decided by the Aave community and may be changed over time. Check Governance for updates and vote to participate. <0>Learn more":"Discount parameters are decided by the Aave community and may be changed over time. Check Governance for updates and vote to participate. <0>Learn more","Discountable amount":"Discountable amount","Docs":"Docs","Download":"Download","Due to health factor impact, a flashloan is required to perform this transaction, but Aave Governance has disabled flashloan availability for this asset. Try lowering the amount or supplying additional collateral.":"Due to health factor impact, a flashloan is required to perform this transaction, but Aave Governance has disabled flashloan availability for this asset. Try lowering the amount or supplying additional collateral.","Due to internal stETH mechanics required for rebasing support, it is not possible to perform a collateral switch where stETH is the source token.":"Due to internal stETH mechanics required for rebasing support, it is not possible to perform a collateral switch where stETH is the source token.","Due to the Horizon bridge exploit, certain assets on the Harmony network are not at parity with Ethereum, which affects the Aave V3 Harmony market.":"Due to the Horizon bridge exploit, certain assets on the Harmony network are not at parity with Ethereum, which affects the Aave V3 Harmony market.","E-Mode":"E-Mode","E-Mode Category":"E-Mode Category","E-Mode category":"E-Mode category","E-Mode increases your LTV for a selected category of assets up to 97%. <0>Learn more":"E-Mode increases your LTV for a selected category of assets up to 97%. <0>Learn more","E-Mode increases your LTV for a selected category of assets up to<0/>. <1>Learn more":"E-Mode increases your LTV for a selected category of assets up to<0/>. <1>Learn more","E-Mode increases your LTV for a selected category of assets, meaning that when E-mode is enabled, you will have higher borrowing power over assets of the same E-mode category which are defined by Aave Governance. You can enter E-Mode from your <0>Dashboard. To learn more about E-Mode and applied restrictions in <1>FAQ or <2>Aave V3 Technical Paper.":"E-Mode increases your LTV for a selected category of assets, meaning that when E-mode is enabled, you will have higher borrowing power over assets of the same E-mode category which are defined by Aave Governance. You can enter E-Mode from your <0>Dashboard. To learn more about E-Mode and applied restrictions in <1>FAQ or <2>Aave V3 Technical Paper.","Edit":"Edit","Effective interest rate":"Effective interest rate","Efficiency mode (E-Mode)":"Efficiency mode (E-Mode)","Eligible for <0>2.1M$ WETH Community Program 👻":"Eligible for <0>2.1M$ WETH Community Program 👻","Eligible for <0>2.1M$ wETH Community Program 👻":"Eligible for <0>2.1M$ wETH Community Program 👻","Eligible for <0>2.9M$ GHO Community Program 👻":"Eligible for <0>2.9M$ GHO Community Program 👻","Email":"Email","Emode":"Emode","Enable E-Mode":"Enable E-Mode","Enable {symbol} as collateral":["Enable ",["symbol"]," as collateral"],"Enabled":"Enabled","Enabling E-Mode":"Enabling E-Mode","Enabling E-Mode only allows you to borrow assets belonging to the selected category. Please visit our <0>FAQ guide to learn more about how it works and the applied restrictions.":"Enabling E-Mode only allows you to borrow assets belonging to the selected category. Please visit our <0>FAQ guide to learn more about how it works and the applied restrictions.","Enabling this asset as collateral increases your borrowing power and Health Factor. However, it can get liquidated if your health factor drops below 1.":"Enabling this asset as collateral increases your borrowing power and Health Factor. However, it can get liquidated if your health factor drops below 1.","English":"English","Enter ETH address":"Enter ETH address","Enter an amount":"Enter an amount","Error connecting. Try refreshing the page.":"Error connecting. Try refreshing the page.","Estimated compounding interest, including discount for Staking {0}AAVE in Safety Module.":["Estimated compounding interest, including discount for Staking ",["0"],"AAVE in Safety Module."],"Exceeds the discount":"Exceeds the discount","Exchange rate":"Exchange rate","Expected amount to repay":"Expected amount to repay","Expires":"Expires","Export data to":"Export data to","FAQ":"FAQ","FAQS":"FAQS","Failed to load proposal voters. Please refresh the page.":"Failed to load proposal voters. Please refresh the page.","Faucet":"Faucet","Faucet {0}":["Faucet ",["0"]],"Feedback":"Feedback","Fetching data...":"Fetching data...","Filter":"Filter","Fixed":"Fixed","Fixed rate":"Fixed rate","Flashloan is disabled for this asset, hence this position cannot be migrated.":"Flashloan is disabled for this asset, hence this position cannot be migrated.","For repayment of a specific type of debt, the user needs to have debt that type":"For repayment of a specific type of debt, the user needs to have debt that type","Fork mode is ON":"Fork mode is ON","Forum discussion":"Forum discussion","French":"French","Funds in the Safety Module":"Funds in the Safety Module","GHO is a native decentralized, collateral-backed digital asset pegged to USD. It is created by users via borrowing against multiple collateral. When user repays their GHO borrow position, the protocol burns that user's GHO. All the interest payments accrued by minters of GHO would be directly transferred to the AaveDAO treasury.":"GHO is a native decentralized, collateral-backed digital asset pegged to USD. It is created by users via borrowing against multiple collateral. When user repays their GHO borrow position, the protocol burns that user's GHO. All the interest payments accrued by minters of GHO would be directly transferred to the AaveDAO treasury.","Get ABP Token":"Get ABP Token","Get ABP v2 Token":"Get ABP v2 Token","Get GHO":"Get GHO","Global settings":"Global settings","Go Back":"Go Back","Go to Balancer Pool":"Go to Balancer Pool","Go to V3 Dashboard":"Go to V3 Dashboard","Governance":"Governance","Greek":"Greek","Health Factor ({0} v2)":["Health Factor (",["0"]," v2)"],"Health Factor ({0} v3)":["Health Factor (",["0"]," v3)"],"Health factor":"Health factor","Health factor is lesser than the liquidation threshold":"Health factor is lesser than the liquidation threshold","Health factor is not below the threshold":"Health factor is not below the threshold","Hide":"Hide","Holders of stkAAVE receive a discount on the GHO borrowing rate":"Holders of stkAAVE receive a discount on the GHO borrowing rate","I acknowledge the risks involved.":"I acknowledge the risks involved.","I fully understand the risks of migrating.":"I fully understand the risks of migrating.","I understand how cooldown ({0}) and unstaking ({1}) work":["I understand how cooldown (",["0"],") and unstaking (",["1"],") work"],"If the error continues to happen,<0/> you may report it to this":"If the error continues to happen,<0/> you may report it to this","If the health factor goes below 1, the liquidation of your collateral might be triggered.":"If the health factor goes below 1, the liquidation of your collateral might be triggered.","If you DO NOT unstake within {0} of unstake window, you will need to activate cooldown process again.":["If you DO NOT unstake within ",["0"]," of unstake window, you will need to activate cooldown process again."],"If your loan to value goes above the liquidation threshold your collateral supplied may be liquidated.":"If your loan to value goes above the liquidation threshold your collateral supplied may be liquidated.","In E-Mode some assets are not borrowable. Exit E-Mode to get access to all assets":"In E-Mode some assets are not borrowable. Exit E-Mode to get access to all assets","In Isolation mode, you cannot supply other assets as collateral. A global debt ceiling limits the borrowing power of the isolated asset. To exit isolation mode disable {0} as collateral before borrowing another asset. Read more in our <0>FAQ":["In Isolation mode, you cannot supply other assets as collateral. A global debt ceiling limits the borrowing power of the isolated asset. To exit isolation mode disable ",["0"]," as collateral before borrowing another asset. Read more in our <0>FAQ"],"Inconsistent flashloan parameters":"Inconsistent flashloan parameters","Insufficient collateral to cover new borrow position. Wallet must have borrowing power remaining to perform debt switch.":"Insufficient collateral to cover new borrow position. Wallet must have borrowing power remaining to perform debt switch.","Interest accrued":"Interest accrued","Interest rate rebalance conditions were not met":"Interest rate rebalance conditions were not met","Interest rate strategy":"Interest rate strategy","Interest rate that is determined by Aave Governance. This rate may be changed over time depending on the need for the GHO supply to contract/expand. <0>Learn more":"Interest rate that is determined by Aave Governance. This rate may be changed over time depending on the need for the GHO supply to contract/expand. <0>Learn more","Invalid amount to burn":"Invalid amount to burn","Invalid amount to mint":"Invalid amount to mint","Invalid bridge protocol fee":"Invalid bridge protocol fee","Invalid expiration":"Invalid expiration","Invalid flashloan premium":"Invalid flashloan premium","Invalid return value of the flashloan executor function":"Invalid return value of the flashloan executor function","Invalid signature":"Invalid signature","Isolated":"Isolated","Isolated Debt Ceiling":"Isolated Debt Ceiling","Isolated assets have limited borrowing power and other assets cannot be used as collateral.":"Isolated assets have limited borrowing power and other assets cannot be used as collateral.","Join the community discussion":"Join the community discussion","Language":"Language","Learn more":"Learn more","Learn more about risks involved":"Learn more about risks involved","Learn more in our <0>FAQ guide":"Learn more in our <0>FAQ guide","Learn more.":"Learn more.","Let us know how we can make the app better for you. For user support related inquiries please reach out on":"Let us know how we can make the app better for you. For user support related inquiries please reach out on","Linked addresses":"Linked addresses","Links":"Links","Liqudation":"Liqudation","Liquidated collateral":"Liquidated collateral","Liquidation":"Liquidation","Liquidation <0/> threshold":"Liquidation <0/> threshold","Liquidation Threshold":"Liquidation Threshold","Liquidation at":"Liquidation at","Liquidation penalty":"Liquidation penalty","Liquidation risk":"Liquidation risk","Liquidation risk parameters":"Liquidation risk parameters","Liquidation threshold":"Liquidation threshold","Liquidation value":"Liquidation value","Loading data...":"Loading data...","Ltv validation failed":"Ltv validation failed","MAI has been paused due to a community decision. Supply, borrows and repays are impacted. <0>More details":"MAI has been paused due to a community decision. Supply, borrows and repays are impacted. <0>More details","MAX":"MAX","Manage analytics":"Manage analytics","Market":"Market","Markets":"Markets","Max":"Max","Max LTV":"Max LTV","Max slashing":"Max slashing","Max slippage":"Max slippage","Maximum amount available to borrow against this asset is limited because debt ceiling is at {0}%.":["Maximum amount available to borrow against this asset is limited because debt ceiling is at ",["0"],"%."],"Maximum amount available to borrow is <0/> {0} (<1/>).":["Maximum amount available to borrow is <0/> ",["0"]," (<1/>)."],"Maximum amount available to borrow is limited because protocol borrow cap is nearly reached.":"Maximum amount available to borrow is limited because protocol borrow cap is nearly reached.","Maximum amount available to supply is <0/> {0} (<1/>).":["Maximum amount available to supply is <0/> ",["0"]," (<1/>)."],"Maximum amount available to supply is limited because protocol supply cap is at {0}%.":["Maximum amount available to supply is limited because protocol supply cap is at ",["0"],"%."],"Maximum amount received":"Maximum amount received","Maximum available to borrow":"Maximum available to borrow","Maximum collateral amount to use":"Maximum collateral amount to use","Maximum loan to value":"Maximum loan to value","Meet GHO":"Meet GHO","Menu":"Menu","Migrate":"Migrate","Migrate to V3":"Migrate to V3","Migrate to stkABPT v2":"Migrate to stkABPT v2","Migrate to v3":"Migrate to v3","Migrate to {0} v3 Market":["Migrate to ",["0"]," v3 Market"],"Migrated":"Migrated","Migrating":"Migrating","Migrating multiple collaterals and borrowed assets at the same time can be an expensive operation and might fail in certain situations.<0>Therefore it’s not recommended to migrate positions with more than 5 assets (deposited + borrowed) at the same time.":"Migrating multiple collaterals and borrowed assets at the same time can be an expensive operation and might fail in certain situations.<0>Therefore it’s not recommended to migrate positions with more than 5 assets (deposited + borrowed) at the same time.","Migration risks":"Migration risks","Minimum GHO borrow amount":"Minimum GHO borrow amount","Minimum USD value received":"Minimum USD value received","Minimum amount of debt to be repaid":"Minimum amount of debt to be repaid","Minimum amount received":"Minimum amount received","Minimum staked Aave amount":"Minimum staked Aave amount","Minimum {0} received":["Minimum ",["0"]," received"],"More":"More","NAY":"NAY","Need help connecting a wallet? <0>Read our FAQ":"Need help connecting a wallet? <0>Read our FAQ","Net APR":"Net APR","Net APY":"Net APY","Net APY is the combined effect of all supply and borrow positions on net worth, including incentives. It is possible to have a negative net APY if debt APY is higher than supply APY.":"Net APY is the combined effect of all supply and borrow positions on net worth, including incentives. It is possible to have a negative net APY if debt APY is higher than supply APY.","Net worth":"Net worth","Network":"Network","Network not supported for this wallet":"Network not supported for this wallet","New APY":"New APY","No assets selected to migrate.":"No assets selected to migrate.","No results found. You can import a custom token with a contract address":"No results found. You can import a custom token with a contract address","No rewards to claim":"No rewards to claim","No search results{0}":["No search results",["0"]],"No transactions yet.":"No transactions yet.","No voting power":"No voting power","None":"None","Not a valid address":"Not a valid address","Not enough balance on your wallet":"Not enough balance on your wallet","Not enough collateral to repay this amount of debt with":"Not enough collateral to repay this amount of debt with","Not enough staked balance":"Not enough staked balance","Not enough voting power to participate in this proposal":"Not enough voting power to participate in this proposal","Not reached":"Not reached","Nothing borrowed yet":"Nothing borrowed yet","Nothing found":"Nothing found","Nothing staked":"Nothing staked","Nothing supplied yet":"Nothing supplied yet","Notify":"Notify","Ok, Close":"Ok, Close","Operation not supported":"Operation not supported","Oracle price":"Oracle price","Overview":"Overview","Page not found":"Page not found","Participating in this {symbol} reserve gives annualized rewards.":["Participating in this ",["symbol"]," reserve gives annualized rewards."],"Pending...":"Pending...","Per the community, the Fantom market has been frozen.":"Per the community, the Fantom market has been frozen.","Per the community, the V2 AMM market has been deprecated.":"Per the community, the V2 AMM market has been deprecated.","Please always be aware of your <0>Health Factor (HF) when partially migrating a position and that your rates will be updated to V3 rates.":"Please always be aware of your <0>Health Factor (HF) when partially migrating a position and that your rates will be updated to V3 rates.","Please connect a wallet to view your personal information here.":"Please connect a wallet to view your personal information here.","Please connect your wallet to be able to switch your tokens.":"Please connect your wallet to be able to switch your tokens.","Please connect your wallet to get free testnet assets.":"Please connect your wallet to get free testnet assets.","Please connect your wallet to see migration tool.":"Please connect your wallet to see migration tool.","Please connect your wallet to see your supplies, borrowings, and open positions.":"Please connect your wallet to see your supplies, borrowings, and open positions.","Please connect your wallet to view transaction history.":"Please connect your wallet to view transaction history.","Please enter a valid wallet address.":"Please enter a valid wallet address.","Please switch to {networkName}.":["Please switch to ",["networkName"],"."],"Please, connect your wallet":"Please, connect your wallet","Pool addresses provider is not registered":"Pool addresses provider is not registered","Powered by":"Powered by","Preview tx and migrate":"Preview tx and migrate","Price":"Price","Price data is not currently available for this reserve on the protocol subgraph":"Price data is not currently available for this reserve on the protocol subgraph","Price impact":"Price impact","Price impact is the spread between the total value of the entry tokens switched and the destination tokens obtained (in USD), which results from the limited liquidity of the trading pair.":"Price impact is the spread between the total value of the entry tokens switched and the destination tokens obtained (in USD), which results from the limited liquidity of the trading pair.","Price impact {0}%":["Price impact ",["0"],"%"],"Privacy":"Privacy","Proposal details":"Proposal details","Proposal overview":"Proposal overview","Proposals":"Proposals","Proposition":"Proposition","Protocol borrow cap at 100% for this asset. Further borrowing unavailable.":"Protocol borrow cap at 100% for this asset. Further borrowing unavailable.","Protocol borrow cap is at 100% for this asset. Further borrowing unavailable.":"Protocol borrow cap is at 100% for this asset. Further borrowing unavailable.","Protocol debt ceiling is at 100% for this asset. Further borrowing against this asset is unavailable.":"Protocol debt ceiling is at 100% for this asset. Further borrowing against this asset is unavailable.","Protocol debt ceiling is at 100% for this asset. Futher borrowing against this asset is unavailable.":"Protocol debt ceiling is at 100% for this asset. Futher borrowing against this asset is unavailable.","Protocol supply cap at 100% for this asset. Further supply unavailable.":"Protocol supply cap at 100% for this asset. Further supply unavailable.","Protocol supply cap is at 100% for this asset. Further supply unavailable.":"Protocol supply cap is at 100% for this asset. Further supply unavailable.","Quorum":"Quorum","Rate change":"Rate change","Raw-Ipfs":"Raw-Ipfs","Reached":"Reached","Reactivate cooldown period to unstake {0} {stakedToken}":["Reactivate cooldown period to unstake ",["0"]," ",["stakedToken"]],"Read more here.":"Read more here.","Read-only mode allows to see address positions in Aave, but you won't be able to perform transactions.":"Read-only mode allows to see address positions in Aave, but you won't be able to perform transactions.","Read-only mode.":"Read-only mode.","Read-only mode. Connect to a wallet to perform transactions.":"Read-only mode. Connect to a wallet to perform transactions.","Receive (est.)":"Receive (est.)","Received":"Received","Recipient address":"Recipient address","Rejected connection request":"Rejected connection request","Reload":"Reload","Reload the page":"Reload the page","Remaining debt":"Remaining debt","Remaining supply":"Remaining supply","Remind me":"Remind me","Remove":"Remove","Repaid":"Repaid","Repay":"Repay","Repay with":"Repay with","Repay {symbol}":["Repay ",["symbol"]],"Repaying {symbol}":["Repaying ",["symbol"]],"Repayment amount to reach {0}% utilization":["Repayment amount to reach ",["0"],"% utilization"],"Representative smart contract wallet (ie. Safe) addresses on other chains.":"Representative smart contract wallet (ie. Safe) addresses on other chains.","Representing smart contract wallet (ie. Safe) addresses on other chains.":"Representing smart contract wallet (ie. Safe) addresses on other chains.","Reserve Size":"Reserve Size","Reserve factor":"Reserve factor","Reserve factor is a percentage of interest which goes to a {0} that is controlled by Aave governance to promote ecosystem growth.":["Reserve factor is a percentage of interest which goes to a ",["0"]," that is controlled by Aave governance to promote ecosystem growth."],"Reserve status & configuration":"Reserve status & configuration","Reset":"Reset","Restake":"Restake","Restake {symbol}":["Restake ",["symbol"]],"Restaked":"Restaked","Restaking {symbol}":["Restaking ",["symbol"]],"Review approval tx details":"Review approval tx details","Review changes to continue":"Review changes to continue","Review tx":"Review tx","Review tx details":"Review tx details","Revoke power":"Revoke power","Reward(s) to claim":"Reward(s) to claim","Rewards APR":"Rewards APR","Risk details":"Risk details","SEE CHARTS":"SEE CHARTS","Safety of your deposited collateral against the borrowed assets and its underlying value.":"Safety of your deposited collateral against the borrowed assets and its underlying value.","Save and share":"Save and share","Seems like we can't switch the network automatically. Please check if you can change it from the wallet.":"Seems like we can't switch the network automatically. Please check if you can change it from the wallet.","Select":"Select","Select APY type to switch":"Select APY type to switch","Select an asset":"Select an asset","Select language":"Select language","Select slippage tolerance":"Select slippage tolerance","Select v2 borrows to migrate":"Select v2 borrows to migrate","Select v2 supplies to migrate":"Select v2 supplies to migrate","Selected assets have successfully migrated. Visit the Market Dashboard to see them.":"Selected assets have successfully migrated. Visit the Market Dashboard to see them.","Selected borrow assets":"Selected borrow assets","Selected supply assets":"Selected supply assets","Send Feedback":"Send Feedback","Send feedback":"Send feedback","Set up delegation":"Set up delegation","Setup notifications about your Health Factor using the Hal app.":"Setup notifications about your Health Factor using the Hal app.","Share on Lens":"Share on Lens","Share on twitter":"Share on twitter","Show":"Show","Show Frozen or paused assets":"Show Frozen or paused assets","Show assets with 0 balance":"Show assets with 0 balance","Sign to continue":"Sign to continue","Signatures ready":"Signatures ready","Signing":"Signing","Since this asset is frozen, the only available actions are withdraw and repay which can be accessed from the <0>Dashboard":"Since this asset is frozen, the only available actions are withdraw and repay which can be accessed from the <0>Dashboard","Since this is a test network, you can get any of the assets if you have ETH on your wallet":"Since this is a test network, you can get any of the assets if you have ETH on your wallet","Slippage":"Slippage","Slippage is the difference between the quoted and received amounts from changing market conditions between the moment the transaction is submitted and its verification.":"Slippage is the difference between the quoted and received amounts from changing market conditions between the moment the transaction is submitted and its verification.","Some migrated assets will not be used as collateral due to enabled isolation mode in {marketName} V3 Market. Visit <0>{marketName} V3 Dashboard to manage isolation mode.":["Some migrated assets will not be used as collateral due to enabled isolation mode in ",["marketName"]," V3 Market. Visit <0>",["marketName"]," V3 Dashboard to manage isolation mode."],"Something went wrong":"Something went wrong","Sorry, an unexpected error happened. In the meantime you may try reloading the page, or come back later.":"Sorry, an unexpected error happened. In the meantime you may try reloading the page, or come back later.","Sorry, we couldn't find the page you were looking for.":"Sorry, we couldn't find the page you were looking for.","Spanish":"Spanish","Stable":"Stable","Stable Interest Type is disabled for this currency":"Stable Interest Type is disabled for this currency","Stable borrowing is enabled":"Stable borrowing is enabled","Stable borrowing is not enabled":"Stable borrowing is not enabled","Stable debt supply is not zero":"Stable debt supply is not zero","Stable interest rate will <0>stay the same for the duration of your loan. Recommended for long-term loan periods and for users who prefer predictability.":"Stable interest rate will <0>stay the same for the duration of your loan. Recommended for long-term loan periods and for users who prefer predictability.","Stablecoin":"Stablecoin","Stake":"Stake","Stake AAVE":"Stake AAVE","Stake ABPT":"Stake ABPT","Stake GHO":"Stake GHO","Stake cooldown activated":"Stake cooldown activated","Staked":"Staked","Staking":"Staking","Staking APR":"Staking APR","Staking Rewards":"Staking Rewards","Staking balance":"Staking balance","Staking discount":"Staking discount","State":"State","Submission did not work, please try again later or contact wecare@avara.xyz":"Submission did not work, please try again later or contact wecare@avara.xyz","Supplied":"Supplied","Supplied asset amount":"Supplied asset amount","Supply":"Supply","Supply APY":"Supply APY","Supply apy":"Supply apy","Supply balance":"Supply balance","Supply balance after switch":"Supply balance after switch","Supply cap is exceeded":"Supply cap is exceeded","Supply cap on target reserve reached. Try lowering the amount.":"Supply cap on target reserve reached. Try lowering the amount.","Supply {symbol}":["Supply ",["symbol"]],"Supplying your":"Supplying your","Supplying {symbol}":["Supplying ",["symbol"]],"Switch":"Switch","Switch APY type":"Switch APY type","Switch E-Mode":"Switch E-Mode","Switch E-Mode category":"Switch E-Mode category","Switch Network":"Switch Network","Switch borrow position":"Switch borrow position","Switch rate":"Switch rate","Switch to":"Switch to","Switched":"Switched","Switching":"Switching","Switching E-Mode":"Switching E-Mode","Switching rate":"Switching rate","Techpaper":"Techpaper","Terms":"Terms","Test Assets":"Test Assets","Testnet mode":"Testnet mode","Testnet mode is ON":"Testnet mode is ON","Thank you for submitting feedback!":"Thank you for submitting feedback!","Thank you for voting!!":"Thank you for voting!!","The % of your total borrowing power used. This is based on the amount of your collateral supplied and the total amount that you can borrow.":"The % of your total borrowing power used. This is based on the amount of your collateral supplied and the total amount that you can borrow.","The Aave Balancer Pool Token (ABPT) is a liquidity pool token. You can receive ABPT by depositing a combination of AAVE + wstETH in the Balancer liquidity pool. You can then stake your BPT in the Safety Module to secure the protocol and earn Safety Incentives.":"The Aave Balancer Pool Token (ABPT) is a liquidity pool token. You can receive ABPT by depositing a combination of AAVE + wstETH in the Balancer liquidity pool. You can then stake your BPT in the Safety Module to secure the protocol and earn Safety Incentives.","The Aave Protocol is programmed to always use the price of 1 GHO = $1. This is different from using market pricing via oracles for other crypto assets. This creates stabilizing arbitrage opportunities when the price of GHO fluctuates.":"The Aave Protocol is programmed to always use the price of 1 GHO = $1. This is different from using market pricing via oracles for other crypto assets. This creates stabilizing arbitrage opportunities when the price of GHO fluctuates.","The Maximum LTV ratio represents the maximum borrowing power of a specific collateral. For example, if a collateral has an LTV of 75%, the user can borrow up to 0.75 worth of ETH in the principal currency for every 1 ETH worth of collateral.":"The Maximum LTV ratio represents the maximum borrowing power of a specific collateral. For example, if a collateral has an LTV of 75%, the user can borrow up to 0.75 worth of ETH in the principal currency for every 1 ETH worth of collateral.","The Stable Rate is not enabled for this currency":"The Stable Rate is not enabled for this currency","The address of the pool addresses provider is invalid":"The address of the pool addresses provider is invalid","The app is running in fork mode.":"The app is running in fork mode.","The app is running in testnet mode. Learn how it works in":"The app is running in testnet mode. Learn how it works in","The caller of the function is not an AToken":"The caller of the function is not an AToken","The caller of this function must be a pool":"The caller of this function must be a pool","The collateral balance is 0":"The collateral balance is 0","The collateral chosen cannot be liquidated":"The collateral chosen cannot be liquidated","The cooldown period is the time required prior to unstaking your tokens (20 days). You can only withdraw your assets from the Security Module after the cooldown period and within the unstake window.<0>Learn more":"The cooldown period is the time required prior to unstaking your tokens (20 days). You can only withdraw your assets from the Security Module after the cooldown period and within the unstake window.<0>Learn more","The cooldown period is {0}. After {1} of cooldown, you will enter unstake window of {2}. You will continue receiving rewards during cooldown and unstake window.":["The cooldown period is ",["0"],". After ",["1"]," of cooldown, you will enter unstake window of ",["2"],". You will continue receiving rewards during cooldown and unstake window."],"The loan to value of the migrated positions would cause liquidation. Increase migrated collateral or reduce migrated borrow to continue.":"The loan to value of the migrated positions would cause liquidation. Increase migrated collateral or reduce migrated borrow to continue.","The requested amount is greater than the max loan size in stable rate mode":"The requested amount is greater than the max loan size in stable rate mode","The total amount of your assets denominated in USD that can be used as collateral for borrowing assets.":"The total amount of your assets denominated in USD that can be used as collateral for borrowing assets.","The underlying asset cannot be rescued":"The underlying asset cannot be rescued","The underlying balance needs to be greater than 0":"The underlying balance needs to be greater than 0","The weighted average of APY for all borrowed assets, including incentives.":"The weighted average of APY for all borrowed assets, including incentives.","The weighted average of APY for all supplied assets, including incentives.":"The weighted average of APY for all supplied assets, including incentives.","There are not enough funds in the{0}reserve to borrow":["There are not enough funds in the",["0"],"reserve to borrow"],"There is not enough collateral to cover a new borrow":"There is not enough collateral to cover a new borrow","There is not enough liquidity for the target asset to perform the switch. Try lowering the amount.":"There is not enough liquidity for the target asset to perform the switch. Try lowering the amount.","There was some error. Please try changing the parameters or <0><1>copy the error":"There was some error. Please try changing the parameters or <0><1>copy the error","These assets are temporarily frozen or paused by Aave community decisions, meaning that further supply / borrow, or rate swap of these assets are unavailable. Withdrawals and debt repayments are allowed. Follow the <0>Aave governance forum for further updates.":"These assets are temporarily frozen or paused by Aave community decisions, meaning that further supply / borrow, or rate swap of these assets are unavailable. Withdrawals and debt repayments are allowed. Follow the <0>Aave governance forum for further updates.","These funds have been borrowed and are not available for withdrawal at this time.":"These funds have been borrowed and are not available for withdrawal at this time.","This action will reduce V2 health factor below liquidation threshold. retain collateral or migrate borrow position to continue.":"This action will reduce V2 health factor below liquidation threshold. retain collateral or migrate borrow position to continue.","This action will reduce health factor of V3 below liquidation threshold. Increase migrated collateral or reduce migrated borrow to continue.":"This action will reduce health factor of V3 below liquidation threshold. Increase migrated collateral or reduce migrated borrow to continue.","This action will reduce your health factor. Please be mindful of the increased risk of collateral liquidation.":"This action will reduce your health factor. Please be mindful of the increased risk of collateral liquidation.","This address is blocked on app.aave.com because it is associated with one or more":"This address is blocked on app.aave.com because it is associated with one or more","This asset has almost reached its borrow cap. There is only {messageValue} available to be borrowed from this market.":["This asset has almost reached its borrow cap. There is only ",["messageValue"]," available to be borrowed from this market."],"This asset has almost reached its supply cap. There can only be {messageValue} supplied to this market.":["This asset has almost reached its supply cap. There can only be ",["messageValue"]," supplied to this market."],"This asset has been paused due to a community decision. Supply, withdraw, borrows and repays are impacted.":"This asset has been paused due to a community decision. Supply, withdraw, borrows and repays are impacted.","This asset has reached its borrow cap. Nothing is available to be borrowed from this market.":"This asset has reached its borrow cap. Nothing is available to be borrowed from this market.","This asset has reached its supply cap. Nothing is available to be supplied from this market.":"This asset has reached its supply cap. Nothing is available to be supplied from this market.","This asset is frozen due to an Aave Protocol Governance decision. <0>More details":"This asset is frozen due to an Aave Protocol Governance decision. <0>More details","This asset is frozen due to an Aave Protocol Governance decision. On the 20th of December 2022, renFIL will no longer be supported and cannot be bridged back to its native network. It is recommended to withdraw supply positions and repay borrow positions so that renFIL can be bridged back to FIL before the deadline. After this date, it will no longer be possible to convert renFIL to FIL. <0>More details":"This asset is frozen due to an Aave Protocol Governance decision. On the 20th of December 2022, renFIL will no longer be supported and cannot be bridged back to its native network. It is recommended to withdraw supply positions and repay borrow positions so that renFIL can be bridged back to FIL before the deadline. After this date, it will no longer be possible to convert renFIL to FIL. <0>More details","This asset is frozen due to an Aave community decision. <0>More details":"This asset is frozen due to an Aave community decision. <0>More details","This asset is planned to be offboarded due to an Aave Protocol Governance decision. <0>More details":"This asset is planned to be offboarded due to an Aave Protocol Governance decision. <0>More details","This gas calculation is only an estimation. Your wallet will set the price of the transaction. You can modify the gas settings directly from your wallet provider.":"This gas calculation is only an estimation. Your wallet will set the price of the transaction. You can modify the gas settings directly from your wallet provider.","This integration was<0>proposed and approvedby the community.":"This integration was<0>proposed and approvedby the community.","This is a program initiated and implemented by the decentralised Aave community. Aave Labs does not guarantee the program and accepts no liability.":"This is a program initiated and implemented by the decentralised Aave community. Aave Labs does not guarantee the program and accepts no liability.","This is the total amount available for you to borrow. You can borrow based on your collateral and until the borrow cap is reached.":"This is the total amount available for you to borrow. You can borrow based on your collateral and until the borrow cap is reached.","This is the total amount that you are able to supply to in this reserve. You are able to supply your wallet balance up until the supply cap is reached.":"This is the total amount that you are able to supply to in this reserve. You are able to supply your wallet balance up until the supply cap is reached.","This represents the threshold at which a borrow position will be considered undercollateralized and subject to liquidation for each collateral. For example, if a collateral has a liquidation threshold of 80%, it means that the position will be liquidated when the debt value is worth 80% of the collateral value.":"This represents the threshold at which a borrow position will be considered undercollateralized and subject to liquidation for each collateral. For example, if a collateral has a liquidation threshold of 80%, it means that the position will be liquidated when the debt value is worth 80% of the collateral value.","Time left to unstake":"Time left to unstake","Time remaining until the 48 hour withdraw period starts.":"Time remaining until the 48 hour withdraw period starts.","Time remaining until the withdraw period ends.":"Time remaining until the withdraw period ends.","Tip: Try increasing slippage or reduce input amount":"Tip: Try increasing slippage or reduce input amount","To borrow you need to supply any asset to be used as collateral.":"To borrow you need to supply any asset to be used as collateral.","To continue, you need to grant Aave smart contracts permission to move your funds from your wallet. Depending on the asset and wallet you use, it is done by signing the permission message (gas free), or by submitting an approval transaction (requires gas). <0>Learn more":"To continue, you need to grant Aave smart contracts permission to move your funds from your wallet. Depending on the asset and wallet you use, it is done by signing the permission message (gas free), or by submitting an approval transaction (requires gas). <0>Learn more","To enable E-mode for the {0} category, all borrow positions outside of this category must be closed.":["To enable E-mode for the ",["0"]," category, all borrow positions outside of this category must be closed."],"To repay on behalf of a user an explicit amount to repay is needed":"To repay on behalf of a user an explicit amount to repay is needed","To request access for this permissioned market, please visit: <0>Acces Provider Name":"To request access for this permissioned market, please visit: <0>Acces Provider Name","To submit a proposal for minor changes to the protocol, you'll need at least 80.00K power. If you want to change the core code base, you'll need 320k power.<0>Learn more.":"To submit a proposal for minor changes to the protocol, you'll need at least 80.00K power. If you want to change the core code base, you'll need 320k power.<0>Learn more.","Top 10 addresses":"Top 10 addresses","Total available":"Total available","Total borrowed":"Total borrowed","Total borrows":"Total borrows","Total emission per day":"Total emission per day","Total interest accrued":"Total interest accrued","Total market size":"Total market size","Total supplied":"Total supplied","Total worth":"Total worth","Track wallet":"Track wallet","Track wallet balance in read-only mode":"Track wallet balance in read-only mode","Transaction failed":"Transaction failed","Transaction history":"Transaction history","Transaction history is not currently available for this market":"Transaction history is not currently available for this market","Transaction overview":"Transaction overview","Transactions":"Transactions","Unavailable":"Unavailable","Unbacked":"Unbacked","Unbacked mint cap is exceeded":"Unbacked mint cap is exceeded","Underlying asset does not exist in {marketName} v3 Market, hence this position cannot be migrated.":["Underlying asset does not exist in ",["marketName"]," v3 Market, hence this position cannot be migrated."],"Underlying token":"Underlying token","Unstake":"Unstake","Unstake now":"Unstake now","Unstake window":"Unstake window","Unstake {symbol}":["Unstake ",["symbol"]],"Unstaked":"Unstaked","Unstaking {symbol}":["Unstaking ",["symbol"]],"Update: Disruptions reported for WETH, WBTC, WMATIC, and USDT. AIP 230 will resolve the disruptions and the market will be operating as normal on ~26th May 13h00 UTC.":"Update: Disruptions reported for WETH, WBTC, WMATIC, and USDT. AIP 230 will resolve the disruptions and the market will be operating as normal on ~26th May 13h00 UTC.","Use it to vote for or against active proposals.":"Use it to vote for or against active proposals.","Use your AAVE, stkAAVE, or aAave balance to delegate your voting and proposition powers. You will not be sending any tokens, only the rights to vote and propose changes to the protocol. You can re-delegate or revoke power to self at any time.":"Use your AAVE, stkAAVE, or aAave balance to delegate your voting and proposition powers. You will not be sending any tokens, only the rights to vote and propose changes to the protocol. You can re-delegate or revoke power to self at any time.","Used as collateral":"Used as collateral","User cannot withdraw more than the available balance":"User cannot withdraw more than the available balance","User did not borrow the specified currency":"User did not borrow the specified currency","User does not have outstanding stable rate debt on this reserve":"User does not have outstanding stable rate debt on this reserve","User does not have outstanding variable rate debt on this reserve":"User does not have outstanding variable rate debt on this reserve","User is in isolation mode":"User is in isolation mode","User is trying to borrow multiple assets including a siloed one":"User is trying to borrow multiple assets including a siloed one","Users who stake AAVE in Safety Module (i.e. stkAAVE holders) receive a discount on GHO borrow interest rate. The discount applies to 100 GHO for every 1 stkAAVE held. Use the calculator below to see GHO borrow rate with the discount applied.":"Users who stake AAVE in Safety Module (i.e. stkAAVE holders) receive a discount on GHO borrow interest rate. The discount applies to 100 GHO for every 1 stkAAVE held. Use the calculator below to see GHO borrow rate with the discount applied.","Utilization Rate":"Utilization Rate","VIEW TX":"VIEW TX","VOTE NAY":"VOTE NAY","VOTE YAE":"VOTE YAE","Variable":"Variable","Variable debt supply is not zero":"Variable debt supply is not zero","Variable interest rate will <0>fluctuate based on the market conditions. Recommended for short-term positions.":"Variable interest rate will <0>fluctuate based on the market conditions. Recommended for short-term positions.","Variable rate":"Variable rate","Version 2":"Version 2","Version 3":"Version 3","View":"View","View Transactions":"View Transactions","View all votes":"View all votes","View contract":"View contract","View details":"View details","View on Explorer":"View on Explorer","Vote NAY":"Vote NAY","Vote YAE":"Vote YAE","Voted NAY":"Voted NAY","Voted YAE":"Voted YAE","Votes":"Votes","Voting":"Voting","Voting is on":"Voting is on","Voting power":"Voting power","Voting results":"Voting results","Wallet Balance":"Wallet Balance","Wallet balance":"Wallet balance","Wallet not detected. Connect or install wallet and retry":"Wallet not detected. Connect or install wallet and retry","Wallets are provided by External Providers and by selecting you agree to Terms of those Providers. Your access to the wallet might be reliant on the External Provider being operational.":"Wallets are provided by External Providers and by selecting you agree to Terms of those Providers. Your access to the wallet might be reliant on the External Provider being operational.","We couldn't find any assets related to your search. Try again with a different asset name, symbol, or address.":"We couldn't find any assets related to your search. Try again with a different asset name, symbol, or address.","We couldn't find any transactions related to your search. Try again with a different asset name, or reset filters.":"We couldn't find any transactions related to your search. Try again with a different asset name, or reset filters.","We couldn’t detect a wallet. Connect a wallet to stake and view your balance.":"We couldn’t detect a wallet. Connect a wallet to stake and view your balance.","We suggest you go back to the Dashboard.":"We suggest you go back to the Dashboard.","Website":"Website","When a liquidation occurs, liquidators repay up to 50% of the outstanding borrowed amount on behalf of the borrower. In return, they can buy the collateral at a discount and keep the difference (liquidation penalty) as a bonus.":"When a liquidation occurs, liquidators repay up to 50% of the outstanding borrowed amount on behalf of the borrower. In return, they can buy the collateral at a discount and keep the difference (liquidation penalty) as a bonus.","With a voting power of <0/>":"With a voting power of <0/>","With testnet Faucet you can get free assets to test the Aave Protocol. Make sure to switch your wallet provider to the appropriate testnet network, select desired asset, and click ‘Faucet’ to get tokens transferred to your wallet. The assets on a testnet are not “real,” meaning they have no monetary value. <0>Learn more":"With testnet Faucet you can get free assets to test the Aave Protocol. Make sure to switch your wallet provider to the appropriate testnet network, select desired asset, and click ‘Faucet’ to get tokens transferred to your wallet. The assets on a testnet are not “real,” meaning they have no monetary value. <0>Learn more","Withdraw":"Withdraw","Withdraw & Switch":"Withdraw & Switch","Withdraw and Switch":"Withdraw and Switch","Withdraw {symbol}":["Withdraw ",["symbol"]],"Withdrawing":"Withdrawing","Withdrawing and Switching":"Withdrawing and Switching","Withdrawing this amount will reduce your health factor and increase risk of liquidation.":"Withdrawing this amount will reduce your health factor and increase risk of liquidation.","Withdrawing {symbol}":["Withdrawing ",["symbol"]],"Wrong Network":"Wrong Network","YAE":"YAE","You are entering Isolation mode":"You are entering Isolation mode","You can borrow this asset with a stable rate only if you borrow more than the amount you are supplying as collateral.":"You can borrow this asset with a stable rate only if you borrow more than the amount you are supplying as collateral.","You can not change Interest Type to stable as your borrowings are higher than your collateral":"You can not change Interest Type to stable as your borrowings are higher than your collateral","You can not disable E-Mode as your current collateralization level is above 80%, disabling E-Mode can cause liquidation. To exit E-Mode supply or repay borrowed positions.":"You can not disable E-Mode as your current collateralization level is above 80%, disabling E-Mode can cause liquidation. To exit E-Mode supply or repay borrowed positions.","You can not switch usage as collateral mode for this currency, because it will cause collateral call":"You can not switch usage as collateral mode for this currency, because it will cause collateral call","You can not use this currency as collateral":"You can not use this currency as collateral","You can not withdraw this amount because it will cause collateral call":"You can not withdraw this amount because it will cause collateral call","You can only switch to tokens with variable APY types. After this transaction, you may change the variable rate to a stable one if available.":"You can only switch to tokens with variable APY types. After this transaction, you may change the variable rate to a stable one if available.","You can only withdraw your assets from the Security Module after the cooldown period ends and the unstake window is active.":"You can only withdraw your assets from the Security Module after the cooldown period ends and the unstake window is active.","You can report incident to our <0>Discord or<1>Github.":"You can report incident to our <0>Discord or<1>Github.","You cancelled the transaction.":"You cancelled the transaction.","You did not participate in this proposal":"You did not participate in this proposal","You do not have supplies in this currency":"You do not have supplies in this currency","You don’t have enough funds in your wallet to repay the full amount. If you proceed to repay with your current amount of funds, you will still have a small borrowing position in your dashboard.":"You don’t have enough funds in your wallet to repay the full amount. If you proceed to repay with your current amount of funds, you will still have a small borrowing position in your dashboard.","You have no AAVE/stkAAVE/aAave balance to delegate.":"You have no AAVE/stkAAVE/aAave balance to delegate.","You have not borrow yet using this currency":"You have not borrow yet using this currency","You may borrow up to <0/> GHO at <1/> (max discount)":"You may borrow up to <0/> GHO at <1/> (max discount)","You may enter a custom amount in the field.":"You may enter a custom amount in the field.","You switched to {0} rate":["You switched to ",["0"]," rate"],"You unstake here":"You unstake here","You voted {0}":["You voted ",["0"]],"You will exit isolation mode and other tokens can now be used as collateral":"You will exit isolation mode and other tokens can now be used as collateral","You {action} <0/> {symbol}":["You ",["action"]," <0/> ",["symbol"]],"You've successfully switched borrow position.":"You've successfully switched borrow position.","You've successfully switched tokens.":"You've successfully switched tokens.","You've successfully withdrew & switched tokens.":"You've successfully withdrew & switched tokens.","Your balance is lower than the selected amount.":"Your balance is lower than the selected amount.","Your borrows":"Your borrows","Your current loan to value based on your collateral supplied.":"Your current loan to value based on your collateral supplied.","Your health factor and loan to value determine the assurance of your collateral. To avoid liquidations you can supply more collateral or repay borrow positions.":"Your health factor and loan to value determine the assurance of your collateral. To avoid liquidations you can supply more collateral or repay borrow positions.","Your info":"Your info","Your proposition power is based on your AAVE/stkAAVE balance and received delegations.":"Your proposition power is based on your AAVE/stkAAVE balance and received delegations.","Your reward balance is 0":"Your reward balance is 0","Your supplies":"Your supplies","Your voting info":"Your voting info","Your voting power is based on your AAVE/stkAAVE balance and received delegations.":"Your voting power is based on your AAVE/stkAAVE balance and received delegations.","Your {name} wallet is empty. Purchase or transfer assets or use <0>{0} to transfer your {network} assets.":["Your ",["name"]," wallet is empty. Purchase or transfer assets or use <0>",["0"]," to transfer your ",["network"]," assets."],"Your {name} wallet is empty. Purchase or transfer assets.":["Your ",["name"]," wallet is empty. Purchase or transfer assets."],"Your {networkName} wallet is empty. Get free test assets at":["Your ",["networkName"]," wallet is empty. Get free test assets at"],"Your {networkName} wallet is empty. Get free test {0} at":["Your ",["networkName"]," wallet is empty. Get free test ",["0"]," at"],"Zero address not valid":"Zero address not valid","assets":"assets","blocked activities":"blocked activities","copy the error":"copy the error","disabled":"disabled","documentation":"documentation","enabled":"enabled","ends":"ends","for":"for","of":"of","on":"on","please check that the amount you want to supply is not currently being used for staking. If it is being used for staking, your transaction might fail.":"please check that the amount you want to supply is not currently being used for staking. If it is being used for staking, your transaction might fail.","repaid":"repaid","stETH supplied as collateral will continue to accrue staking rewards provided by daily rebases.":"stETH supplied as collateral will continue to accrue staking rewards provided by daily rebases.","stETH tokens will be migrated to Wrapped stETH using Lido Protocol wrapper which leads to supply balance change after migration: {0}":["stETH tokens will be migrated to Wrapped stETH using Lido Protocol wrapper which leads to supply balance change after migration: ",["0"]],"staking view":"staking view","starts":"starts","stkAAVE holders get a discount on GHO borrow rate":"stkAAVE holders get a discount on GHO borrow rate","to":"to","tokens is not the same as staking them. If you wish to stake your":"tokens is not the same as staking them. If you wish to stake your","tokens, please go to the":"tokens, please go to the","withdrew":"withdrew","{0}":[["0"]],"{0} Balance":[["0"]," Balance"],"{0} Faucet":[["0"]," Faucet"],"{0} on-ramp service is provided by External Provider and by selecting you agree to Terms of the Provider. Your access to the service might be reliant on the External Provider being operational.":[["0"]," on-ramp service is provided by External Provider and by selecting you agree to Terms of the Provider. Your access to the service might be reliant on the External Provider being operational."],"{0}{name}":[["0"],["name"]],"{currentMethod}":[["currentMethod"]],"{d}d":[["d"],"d"],"{h}h":[["h"],"h"],"{m}m":[["m"],"m"],"{networkName} Faucet":[["networkName"]," Faucet"],"{notifyText}":[["notifyText"]],"{numSelected}/{numAvailable} assets selected":[["numSelected"],"/",["numAvailable"]," assets selected"],"{stepName}":[["stepName"]],"{s}s":[["s"],"s"],"{title}":[["title"]],"{tooltipText}":[["tooltipText"]]}}; \ No newline at end of file +/*eslint-disable*/module.exports={messages:{"...":"...",".CSV":".CSV",".JSON":".JSON","<0><1><2/>Add <3/> stkAAVE to borrow at <4/> (max discount)":"<0><1><2/>Add <3/> stkAAVE to borrow at <4/> (max discount)","<0><1><2/>Add stkAAVE to see borrow rate with discount":"<0><1><2/>Add stkAAVE to see borrow rate with discount","<0>Ampleforth is a rebasing asset. Visit the <1>documentation to learn more.":"<0>Ampleforth is a rebasing asset. Visit the <1>documentation to learn more.","<0>Attention: Parameter changes via governance can alter your account health factor and risk of liquidation. Follow the <1>Aave governance forum for updates.":"<0>Attention: Parameter changes via governance can alter your account health factor and risk of liquidation. Follow the <1>Aave governance forum for updates.","<0>Slippage tolerance <1>{selectedSlippage}% <2>{0}":["<0>Slippage tolerance <1>",["selectedSlippage"],"% <2>",["0"],""],"AAVE, GHO, and ABPT holders (Ethereum network only) can stake their assets in the Safety Module to add more security to the protocol and earn Safety Incentives. In the case of a shortfall event, your stake can be slashed to cover the deficit, providing an additional layer of protection for the protocol.":"AAVE, GHO, and ABPT holders (Ethereum network only) can stake their assets in the Safety Module to add more security to the protocol and earn Safety Incentives. In the case of a shortfall event, your stake can be slashed to cover the deficit, providing an additional layer of protection for the protocol.","APR":"APR","APY":"APY","APY change":"APY change","APY type":"APY type","APY type change":"APY type change","APY with discount applied":"APY with discount applied","APY, borrow rate":"APY, borrow rate","APY, stable":"APY, stable","APY, variable":"APY, variable","AToken supply is not zero":"AToken supply is not zero","Aave Governance":"Aave Governance","Aave aToken":"Aave aToken","Aave debt token":"Aave debt token","Aave is a fully decentralized, community governed protocol by the AAVE token-holders. AAVE token-holders collectively discuss, propose, and vote on upgrades to the protocol. AAVE token-holders (Ethereum network only) can either vote themselves on new proposals or delagate to an address of choice. To learn more check out the Governance":"Aave is a fully decentralized, community governed protocol by the AAVE token-holders. AAVE token-holders collectively discuss, propose, and vote on upgrades to the protocol. AAVE token-holders (Ethereum network only) can either vote themselves on new proposals or delagate to an address of choice. To learn more check out the Governance","Aave per month":"Aave per month","About GHO":"About GHO","Account":"Account","Action cannot be performed because the reserve is frozen":"Action cannot be performed because the reserve is frozen","Action cannot be performed because the reserve is paused":"Action cannot be performed because the reserve is paused","Action requires an active reserve":"Action requires an active reserve","Activate Cooldown":"Activate Cooldown","Add stkAAVE to see borrow APY with the discount":"Add stkAAVE to see borrow APY with the discount","Add to wallet":"Add to wallet","Add {0} to wallet to track your balance.":["Add ",["0"]," to wallet to track your balance."],"Address is not a contract":"Address is not a contract","Addresses":"Addresses","Addresses ({0})":["Addresses (",["0"],")"],"All Assets":"All Assets","All done!":"All done!","All proposals":"All proposals","All transactions":"All transactions","Allowance required action":"Allowance required action","Allows you to decide whether to use a supplied asset as collateral. An asset used as collateral will affect your borrowing power and health factor.":"Allows you to decide whether to use a supplied asset as collateral. An asset used as collateral will affect your borrowing power and health factor.","Allows you to switch between <0>variable and <1>stable interest rates, where variable rate can increase and decrease depending on the amount of liquidity in the reserve, and stable rate will stay the same for the duration of your loan.":"Allows you to switch between <0>variable and <1>stable interest rates, where variable rate can increase and decrease depending on the amount of liquidity in the reserve, and stable rate will stay the same for the duration of your loan.","Amount":"Amount","Amount claimable":"Amount claimable","Amount in cooldown":"Amount in cooldown","Amount must be greater than 0":"Amount must be greater than 0","Amount to migrate":"Amount to migrate","Amount to unstake":"Amount to unstake","An error has occurred fetching the proposal.":"An error has occurred fetching the proposal.","Approve Confirmed":"Approve Confirmed","Approve with":"Approve with","Approve {symbol} to continue":["Approve ",["symbol"]," to continue"],"Approving {symbol}...":["Approving ",["symbol"],"..."],"Array parameters that should be equal length are not":"Array parameters that should be equal length are not","As a result of governance decisions, this ABPT staking pool is now deprecated. You have the flexibility to either migrate all of your tokens to v2 or unstake them without any cooldown period.":"As a result of governance decisions, this ABPT staking pool is now deprecated. You have the flexibility to either migrate all of your tokens to v2 or unstake them without any cooldown period.","Asset":"Asset","Asset can be only used as collateral in isolation mode with limited borrowing power. To enter isolation mode, disable all other collateral.":"Asset can be only used as collateral in isolation mode with limited borrowing power. To enter isolation mode, disable all other collateral.","Asset can only be used as collateral in isolation mode only.":"Asset can only be used as collateral in isolation mode only.","Asset cannot be migrated because you have isolated collateral in {marketName} v3 Market which limits borrowable assets. You can manage your collateral in <0>{marketName} V3 Dashboard":["Asset cannot be migrated because you have isolated collateral in ",["marketName"]," v3 Market which limits borrowable assets. You can manage your collateral in <0>",["marketName"]," V3 Dashboard"],"Asset cannot be migrated due to insufficient liquidity or borrow cap limitation in {marketName} v3 market.":["Asset cannot be migrated due to insufficient liquidity or borrow cap limitation in ",["marketName"]," v3 market."],"Asset cannot be migrated due to supply cap restriction in {marketName} v3 market.":["Asset cannot be migrated due to supply cap restriction in ",["marketName"]," v3 market."],"Asset cannot be migrated to {marketName} V3 Market due to E-mode restrictions. You can disable or manage E-mode categories in your <0>V3 Dashboard":["Asset cannot be migrated to ",["marketName"]," V3 Market due to E-mode restrictions. You can disable or manage E-mode categories in your <0>V3 Dashboard"],"Asset cannot be migrated to {marketName} v3 Market since collateral asset will enable isolation mode.":["Asset cannot be migrated to ",["marketName"]," v3 Market since collateral asset will enable isolation mode."],"Asset cannot be used as collateral.":"Asset cannot be used as collateral.","Asset category":"Asset category","Asset is frozen in {marketName} v3 market, hence this position cannot be migrated.":["Asset is frozen in ",["marketName"]," v3 market, hence this position cannot be migrated."],"Asset is not borrowable in isolation mode":"Asset is not borrowable in isolation mode","Asset is not listed":"Asset is not listed","Asset supply is limited to a certain amount to reduce protocol exposure to the asset and to help manage risks involved.":"Asset supply is limited to a certain amount to reduce protocol exposure to the asset and to help manage risks involved.","Assets":"Assets","Assets to borrow":"Assets to borrow","Assets to supply":"Assets to supply","Assets with zero LTV ({assetsBlockingWithdraw}) must be withdrawn or disabled as collateral to perform this action":["Assets with zero LTV (",["assetsBlockingWithdraw"],") must be withdrawn or disabled as collateral to perform this action"],"At a discount":"At a discount","Available":"Available","Available assets":"Available assets","Available liquidity":"Available liquidity","Available on":"Available on","Available rewards":"Available rewards","Available to borrow":"Available to borrow","Available to supply":"Available to supply","Back to Dashboard":"Back to Dashboard","Balance":"Balance","Balance to revoke":"Balance to revoke","Balancer Pool":"Balancer Pool","Be careful - You are very close to liquidation. Consider depositing more collateral or paying down some of your borrowed positions":"Be careful - You are very close to liquidation. Consider depositing more collateral or paying down some of your borrowed positions","Be mindful of the network congestion and gas prices.":"Be mindful of the network congestion and gas prices.","Because this asset is paused, no actions can be taken until further notice":"Because this asset is paused, no actions can be taken until further notice","Before supplying":"Before supplying","Blocked Address":"Blocked Address","Borrow":"Borrow","Borrow APY":"Borrow APY","Borrow APY rate":"Borrow APY rate","Borrow APY, variable":"Borrow APY, variable","Borrow amount to reach {0}% utilization":["Borrow amount to reach ",["0"],"% utilization"],"Borrow and repay in same block is not allowed":"Borrow and repay in same block is not allowed","Borrow apy":"Borrow apy","Borrow balance":"Borrow balance","Borrow balance after repay":"Borrow balance after repay","Borrow balance after switch":"Borrow balance after switch","Borrow cap":"Borrow cap","Borrow cap is exceeded":"Borrow cap is exceeded","Borrow info":"Borrow info","Borrow power used":"Borrow power used","Borrow rate APY":"Borrow rate APY","Borrow rate change":"Borrow rate change","Borrow {symbol}":["Borrow ",["symbol"]],"Borrowed":"Borrowed","Borrowed asset amount":"Borrowed asset amount","Borrowed assets":"Borrowed assets","Borrowing is currently unavailable for {0}.":["Borrowing is currently unavailable for ",["0"],"."],"Borrowing is disabled due to an Aave community decision. <0>More details":"Borrowing is disabled due to an Aave community decision. <0>More details","Borrowing is not enabled":"Borrowing is not enabled","Borrowing is unavailable because you’re using Isolation mode. To manage Isolation mode visit your <0>Dashboard.":"Borrowing is unavailable because you’re using Isolation mode. To manage Isolation mode visit your <0>Dashboard.","Borrowing is unavailable because you’ve enabled Efficiency Mode (E-Mode) and Isolation mode. To manage E-Mode and Isolation mode visit your <0>Dashboard.":"Borrowing is unavailable because you’ve enabled Efficiency Mode (E-Mode) and Isolation mode. To manage E-Mode and Isolation mode visit your <0>Dashboard.","Borrowing is unavailable because you’ve enabled Efficiency Mode (E-Mode) for {0} category. To manage E-Mode categories visit your <0>Dashboard.":["Borrowing is unavailable because you’ve enabled Efficiency Mode (E-Mode) for ",["0"]," category. To manage E-Mode categories visit your <0>Dashboard."],"Borrowing of this asset is limited to a certain amount to minimize liquidity pool insolvency.":"Borrowing of this asset is limited to a certain amount to minimize liquidity pool insolvency.","Borrowing power and assets are limited due to Isolation mode.":"Borrowing power and assets are limited due to Isolation mode.","Borrowing this amount will reduce your health factor and increase risk of liquidation.":"Borrowing this amount will reduce your health factor and increase risk of liquidation.","Borrowing {symbol}":["Borrowing ",["symbol"]],"Both":"Both","Buy Crypto With Fiat":"Buy Crypto With Fiat","Buy Crypto with Fiat":"Buy Crypto with Fiat","Buy {cryptoSymbol} with Fiat":["Buy ",["cryptoSymbol"]," with Fiat"],"COPIED!":"COPIED!","COPY IMAGE":"COPY IMAGE","Can be collateral":"Can be collateral","Can be executed":"Can be executed","Can't validate the wallet address. Try again.":"Can't validate the wallet address. Try again.","Cancel":"Cancel","Cannot disable E-Mode":"Cannot disable E-Mode","Choose how much voting/proposition power to give to someone else by delegating some of your AAVE, stkAAVE or aAave balance. Your tokens will remain in your account, but your delegate will be able to vote or propose on your behalf. If your AAVE, stkAAVE or aAave balance changes, your delegate's voting/proposition power will be automatically adjusted.":"Choose how much voting/proposition power to give to someone else by delegating some of your AAVE, stkAAVE or aAave balance. Your tokens will remain in your account, but your delegate will be able to vote or propose on your behalf. If your AAVE, stkAAVE or aAave balance changes, your delegate's voting/proposition power will be automatically adjusted.","Choose one of the on-ramp services":"Choose one of the on-ramp services","Claim":"Claim","Claim all":"Claim all","Claim all rewards":"Claim all rewards","Claim {0}":["Claim ",["0"]],"Claim {symbol}":["Claim ",["symbol"]],"Claimable AAVE":"Claimable AAVE","Claimed":"Claimed","Claiming":"Claiming","Claiming {symbol}":["Claiming ",["symbol"]],"Close":"Close","Collateral":"Collateral","Collateral balance after repay":"Collateral balance after repay","Collateral change":"Collateral change","Collateral is (mostly) the same currency that is being borrowed":"Collateral is (mostly) the same currency that is being borrowed","Collateral to repay with":"Collateral to repay with","Collateral usage":"Collateral usage","Collateral usage is limited because of Isolation mode.":"Collateral usage is limited because of Isolation mode.","Collateral usage is limited because of isolation mode.":"Collateral usage is limited because of isolation mode.","Collateral usage is limited because of isolation mode. <0>Learn More":"Collateral usage is limited because of isolation mode. <0>Learn More","Collateralization":"Collateralization","Collector Contract":"Collector Contract","Collector Info":"Collector Info","Confirm transaction":"Confirm transaction","Confirming transaction":"Confirming transaction","Connect":"Connect","Connect wallet":"Connect wallet","Cooldown period":"Cooldown period","Cooldown period warning":"Cooldown period warning","Cooldown time left":"Cooldown time left","Cooldown to unstake":"Cooldown to unstake","Cooling down...":"Cooling down...","Copy address":"Copy address","Copy error message":"Copy error message","Copy error text":"Copy error text","Covered debt":"Covered debt","Current LTV":"Current LTV","Current differential":"Current differential","Current v2 Balance":"Current v2 Balance","Current v2 balance":"Current v2 balance","Current votes":"Current votes","DAI balance will be converted via DSR contracts and then supplied as sDAI. Switching incurs no additional costs and no slippage.":"DAI balance will be converted via DSR contracts and then supplied as sDAI. Switching incurs no additional costs and no slippage.","Dark mode":"Dark mode","Dashboard":"Dashboard","Data couldn't be fetched, please reload graph.":"Data couldn't be fetched, please reload graph.","Debt":"Debt","Debt ceiling is exceeded":"Debt ceiling is exceeded","Debt ceiling is not zero":"Debt ceiling is not zero","Debt ceiling limits the amount possible to borrow against this asset by protocol users. Debt ceiling is specific to assets in isolation mode and is denoted in USD.":"Debt ceiling limits the amount possible to borrow against this asset by protocol users. Debt ceiling is specific to assets in isolation mode and is denoted in USD.","Delegated power":"Delegated power","Details":"Details","Developers":"Developers","Differential":"Differential","Disable E-Mode":"Disable E-Mode","Disable fork":"Disable fork","Disable testnet":"Disable testnet","Disable {symbol} as collateral":["Disable ",["symbol"]," as collateral"],"Disabled":"Disabled","Disabling E-Mode":"Disabling E-Mode","Disabling this asset as collateral affects your borrowing power and Health Factor.":"Disabling this asset as collateral affects your borrowing power and Health Factor.","Disconnect Wallet":"Disconnect Wallet","Discord channel":"Discord channel","Discount":"Discount","Discount applied for <0/> staking AAVE":"Discount applied for <0/> staking AAVE","Discount model parameters":"Discount model parameters","Discount parameters are decided by the Aave community and may be changed over time. Check Governance for updates and vote to participate. <0>Learn more":"Discount parameters are decided by the Aave community and may be changed over time. Check Governance for updates and vote to participate. <0>Learn more","Discountable amount":"Discountable amount","Docs":"Docs","Download":"Download","Due to health factor impact, a flashloan is required to perform this transaction, but Aave Governance has disabled flashloan availability for this asset. Try lowering the amount or supplying additional collateral.":"Due to health factor impact, a flashloan is required to perform this transaction, but Aave Governance has disabled flashloan availability for this asset. Try lowering the amount or supplying additional collateral.","Due to internal stETH mechanics required for rebasing support, it is not possible to perform a collateral switch where stETH is the source token.":"Due to internal stETH mechanics required for rebasing support, it is not possible to perform a collateral switch where stETH is the source token.","Due to the Horizon bridge exploit, certain assets on the Harmony network are not at parity with Ethereum, which affects the Aave V3 Harmony market.":"Due to the Horizon bridge exploit, certain assets on the Harmony network are not at parity with Ethereum, which affects the Aave V3 Harmony market.","E-Mode":"E-Mode","E-Mode Category":"E-Mode Category","E-Mode category":"E-Mode category","E-Mode increases your LTV for a selected category of assets up to 97%. <0>Learn more":"E-Mode increases your LTV for a selected category of assets up to 97%. <0>Learn more","E-Mode increases your LTV for a selected category of assets up to<0/>. <1>Learn more":"E-Mode increases your LTV for a selected category of assets up to<0/>. <1>Learn more","E-Mode increases your LTV for a selected category of assets, meaning that when E-mode is enabled, you will have higher borrowing power over assets of the same E-mode category which are defined by Aave Governance. You can enter E-Mode from your <0>Dashboard. To learn more about E-Mode and applied restrictions in <1>FAQ or <2>Aave V3 Technical Paper.":"E-Mode increases your LTV for a selected category of assets, meaning that when E-mode is enabled, you will have higher borrowing power over assets of the same E-mode category which are defined by Aave Governance. You can enter E-Mode from your <0>Dashboard. To learn more about E-Mode and applied restrictions in <1>FAQ or <2>Aave V3 Technical Paper.","Edit":"Edit","Effective interest rate":"Effective interest rate","Efficiency mode (E-Mode)":"Efficiency mode (E-Mode)","Eligible for <0>2.1M$ WETH Community Program 👻":"Eligible for <0>2.1M$ WETH Community Program 👻","Eligible for <0>2.1M$ wETH Community Program 👻":"Eligible for <0>2.1M$ wETH Community Program 👻","Eligible for <0>2.9M$ GHO Community Program 👻":"Eligible for <0>2.9M$ GHO Community Program 👻","Email":"Email","Emode":"Emode","Enable E-Mode":"Enable E-Mode","Enable {symbol} as collateral":["Enable ",["symbol"]," as collateral"],"Enabled":"Enabled","Enabling E-Mode":"Enabling E-Mode","Enabling E-Mode only allows you to borrow assets belonging to the selected category. Please visit our <0>FAQ guide to learn more about how it works and the applied restrictions.":"Enabling E-Mode only allows you to borrow assets belonging to the selected category. Please visit our <0>FAQ guide to learn more about how it works and the applied restrictions.","Enabling this asset as collateral increases your borrowing power and Health Factor. However, it can get liquidated if your health factor drops below 1.":"Enabling this asset as collateral increases your borrowing power and Health Factor. However, it can get liquidated if your health factor drops below 1.","English":"English","Enter ETH address":"Enter ETH address","Enter an amount":"Enter an amount","Error connecting. Try refreshing the page.":"Error connecting. Try refreshing the page.","Estimated compounding interest, including discount for Staking {0}AAVE in Safety Module.":["Estimated compounding interest, including discount for Staking ",["0"],"AAVE in Safety Module."],"Exceeds the discount":"Exceeds the discount","Exchange rate":"Exchange rate","Expected amount to repay":"Expected amount to repay","Expires":"Expires","Export data to":"Export data to","FAQ":"FAQ","FAQS":"FAQS","Failed to load proposal voters. Please refresh the page.":"Failed to load proposal voters. Please refresh the page.","Faucet":"Faucet","Faucet {0}":["Faucet ",["0"]],"Feedback":"Feedback","Fetching data...":"Fetching data...","Filter":"Filter","Fixed":"Fixed","Fixed rate":"Fixed rate","Flashloan is disabled for this asset, hence this position cannot be migrated.":"Flashloan is disabled for this asset, hence this position cannot be migrated.","For repayment of a specific type of debt, the user needs to have debt that type":"For repayment of a specific type of debt, the user needs to have debt that type","Fork mode is ON":"Fork mode is ON","Forum discussion":"Forum discussion","French":"French","Funds in the Safety Module":"Funds in the Safety Module","GHO is a native decentralized, collateral-backed digital asset pegged to USD. It is created by users via borrowing against multiple collateral. When user repays their GHO borrow position, the protocol burns that user's GHO. All the interest payments accrued by minters of GHO would be directly transferred to the AaveDAO treasury.":"GHO is a native decentralized, collateral-backed digital asset pegged to USD. It is created by users via borrowing against multiple collateral. When user repays their GHO borrow position, the protocol burns that user's GHO. All the interest payments accrued by minters of GHO would be directly transferred to the AaveDAO treasury.","Get ABP Token":"Get ABP Token","Get ABP v2 Token":"Get ABP v2 Token","Get GHO":"Get GHO","Global settings":"Global settings","Go Back":"Go Back","Go to Balancer Pool":"Go to Balancer Pool","Go to V3 Dashboard":"Go to V3 Dashboard","Governance":"Governance","Greek":"Greek","Health factor":"Health factor","Health factor is lesser than the liquidation threshold":"Health factor is lesser than the liquidation threshold","Health factor is not below the threshold":"Health factor is not below the threshold","Hide":"Hide","Holders of stkAAVE receive a discount on the GHO borrowing rate":"Holders of stkAAVE receive a discount on the GHO borrowing rate","I acknowledge the risks involved.":"I acknowledge the risks involved.","I fully understand the risks of migrating.":"I fully understand the risks of migrating.","I understand how cooldown ({0}) and unstaking ({1}) work":["I understand how cooldown (",["0"],") and unstaking (",["1"],") work"],"If the error continues to happen,<0/> you may report it to this":"If the error continues to happen,<0/> you may report it to this","If the health factor goes below 1, the liquidation of your collateral might be triggered.":"If the health factor goes below 1, the liquidation of your collateral might be triggered.","If you DO NOT unstake within {0} of unstake window, you will need to activate cooldown process again.":["If you DO NOT unstake within ",["0"]," of unstake window, you will need to activate cooldown process again."],"If your loan to value goes above the liquidation threshold your collateral supplied may be liquidated.":"If your loan to value goes above the liquidation threshold your collateral supplied may be liquidated.","In E-Mode some assets are not borrowable. Exit E-Mode to get access to all assets":"In E-Mode some assets are not borrowable. Exit E-Mode to get access to all assets","In Isolation mode, you cannot supply other assets as collateral. A global debt ceiling limits the borrowing power of the isolated asset. To exit isolation mode disable {0} as collateral before borrowing another asset. Read more in our <0>FAQ":["In Isolation mode, you cannot supply other assets as collateral. A global debt ceiling limits the borrowing power of the isolated asset. To exit isolation mode disable ",["0"]," as collateral before borrowing another asset. Read more in our <0>FAQ"],"Inconsistent flashloan parameters":"Inconsistent flashloan parameters","Insufficient collateral to cover new borrow position. Wallet must have borrowing power remaining to perform debt switch.":"Insufficient collateral to cover new borrow position. Wallet must have borrowing power remaining to perform debt switch.","Interest accrued":"Interest accrued","Interest rate rebalance conditions were not met":"Interest rate rebalance conditions were not met","Interest rate strategy":"Interest rate strategy","Interest rate that is determined by Aave Governance. This rate may be changed over time depending on the need for the GHO supply to contract/expand. <0>Learn more":"Interest rate that is determined by Aave Governance. This rate may be changed over time depending on the need for the GHO supply to contract/expand. <0>Learn more","Invalid amount to burn":"Invalid amount to burn","Invalid amount to mint":"Invalid amount to mint","Invalid bridge protocol fee":"Invalid bridge protocol fee","Invalid expiration":"Invalid expiration","Invalid flashloan premium":"Invalid flashloan premium","Invalid return value of the flashloan executor function":"Invalid return value of the flashloan executor function","Invalid signature":"Invalid signature","Isolated":"Isolated","Isolated Debt Ceiling":"Isolated Debt Ceiling","Isolated assets have limited borrowing power and other assets cannot be used as collateral.":"Isolated assets have limited borrowing power and other assets cannot be used as collateral.","Join the community discussion":"Join the community discussion","Language":"Language","Learn more":"Learn more","Learn more about risks involved":"Learn more about risks involved","Learn more in our <0>FAQ guide":"Learn more in our <0>FAQ guide","Learn more.":"Learn more.","Let us know how we can make the app better for you. For user support related inquiries please reach out on":"Let us know how we can make the app better for you. For user support related inquiries please reach out on","Linked addresses":"Linked addresses","Links":"Links","Liqudation":"Liqudation","Liquidated collateral":"Liquidated collateral","Liquidation":"Liquidation","Liquidation <0/> threshold":"Liquidation <0/> threshold","Liquidation Threshold":"Liquidation Threshold","Liquidation at":"Liquidation at","Liquidation penalty":"Liquidation penalty","Liquidation risk":"Liquidation risk","Liquidation risk parameters":"Liquidation risk parameters","Liquidation threshold":"Liquidation threshold","Liquidation value":"Liquidation value","Loading data...":"Loading data...","Ltv validation failed":"Ltv validation failed","MAI has been paused due to a community decision. Supply, borrows and repays are impacted. <0>More details":"MAI has been paused due to a community decision. Supply, borrows and repays are impacted. <0>More details","MAX":"MAX","Manage analytics":"Manage analytics","Market":"Market","Markets":"Markets","Max":"Max","Max LTV":"Max LTV","Max slashing":"Max slashing","Max slippage":"Max slippage","Maximum amount available to borrow against this asset is limited because debt ceiling is at {0}%.":["Maximum amount available to borrow against this asset is limited because debt ceiling is at ",["0"],"%."],"Maximum amount available to borrow is <0/> {0} (<1/>).":["Maximum amount available to borrow is <0/> ",["0"]," (<1/>)."],"Maximum amount available to borrow is limited because protocol borrow cap is nearly reached.":"Maximum amount available to borrow is limited because protocol borrow cap is nearly reached.","Maximum amount available to supply is <0/> {0} (<1/>).":["Maximum amount available to supply is <0/> ",["0"]," (<1/>)."],"Maximum amount available to supply is limited because protocol supply cap is at {0}%.":["Maximum amount available to supply is limited because protocol supply cap is at ",["0"],"%."],"Maximum amount received":"Maximum amount received","Maximum available to borrow":"Maximum available to borrow","Maximum collateral amount to use":"Maximum collateral amount to use","Maximum loan to value":"Maximum loan to value","Meet GHO":"Meet GHO","Menu":"Menu","Migrate":"Migrate","Migrate to Aave V3":"Migrate to Aave V3","Migrate to V3":"Migrate to V3","Migrate to stkABPT v2":"Migrate to stkABPT v2","Migrate to v3":"Migrate to v3","Migrate to {0} v3 Market":["Migrate to ",["0"]," v3 Market"],"Migrate your assets":"Migrate your assets","Migrated":"Migrated","Migrating":"Migrating","Migrating multiple collaterals and borrowed assets at the same time can be an expensive operation and might fail in certain situations.<0>Therefore it’s not recommended to migrate positions with more than 5 assets (deposited + borrowed) at the same time.":"Migrating multiple collaterals and borrowed assets at the same time can be an expensive operation and might fail in certain situations.<0>Therefore it’s not recommended to migrate positions with more than 5 assets (deposited + borrowed) at the same time.","Migration risks":"Migration risks","Minimum GHO borrow amount":"Minimum GHO borrow amount","Minimum USD value received":"Minimum USD value received","Minimum amount of debt to be repaid":"Minimum amount of debt to be repaid","Minimum amount received":"Minimum amount received","Minimum staked Aave amount":"Minimum staked Aave amount","Minimum {0} received":["Minimum ",["0"]," received"],"More":"More","NAY":"NAY","Need help connecting a wallet? <0>Read our FAQ":"Need help connecting a wallet? <0>Read our FAQ","Net APR":"Net APR","Net APY":"Net APY","Net APY is the combined effect of all supply and borrow positions on net worth, including incentives. It is possible to have a negative net APY if debt APY is higher than supply APY.":"Net APY is the combined effect of all supply and borrow positions on net worth, including incentives. It is possible to have a negative net APY if debt APY is higher than supply APY.","Net worth":"Net worth","Network":"Network","Network not supported for this wallet":"Network not supported for this wallet","New APY":"New APY","No assets selected to migrate.":"No assets selected to migrate.","No results found. You can import a custom token with a contract address":"No results found. You can import a custom token with a contract address","No rewards to claim":"No rewards to claim","No search results{0}":["No search results",["0"]],"No transactions yet.":"No transactions yet.","No voting power":"No voting power","None":"None","Not a valid address":"Not a valid address","Not enough balance on your wallet":"Not enough balance on your wallet","Not enough collateral to repay this amount of debt with":"Not enough collateral to repay this amount of debt with","Not enough staked balance":"Not enough staked balance","Not enough voting power to participate in this proposal":"Not enough voting power to participate in this proposal","Not reached":"Not reached","Nothing borrowed yet":"Nothing borrowed yet","Nothing found":"Nothing found","Nothing staked":"Nothing staked","Nothing supplied yet":"Nothing supplied yet","Notify":"Notify","Ok, Close":"Ok, Close","Operation not supported":"Operation not supported","Oracle price":"Oracle price","Overview":"Overview","Page not found":"Page not found","Participating in this {symbol} reserve gives annualized rewards.":["Participating in this ",["symbol"]," reserve gives annualized rewards."],"Pending...":"Pending...","Per the community, the Fantom market has been frozen.":"Per the community, the Fantom market has been frozen.","Per the community, the V2 AMM market has been deprecated.":"Per the community, the V2 AMM market has been deprecated.","Please always be aware of your <0>Health Factor (HF) when partially migrating a position and that your rates will be updated to V3 rates.":"Please always be aware of your <0>Health Factor (HF) when partially migrating a position and that your rates will be updated to V3 rates.","Please connect a wallet to view your personal information here.":"Please connect a wallet to view your personal information here.","Please connect your wallet to be able to switch your tokens.":"Please connect your wallet to be able to switch your tokens.","Please connect your wallet to get free testnet assets.":"Please connect your wallet to get free testnet assets.","Please connect your wallet to see migration tool.":"Please connect your wallet to see migration tool.","Please connect your wallet to see your supplies, borrowings, and open positions.":"Please connect your wallet to see your supplies, borrowings, and open positions.","Please connect your wallet to view transaction history.":"Please connect your wallet to view transaction history.","Please enter a valid wallet address.":"Please enter a valid wallet address.","Please switch to {networkName}.":["Please switch to ",["networkName"],"."],"Please, connect your wallet":"Please, connect your wallet","Pool addresses provider is not registered":"Pool addresses provider is not registered","Powered by":"Powered by","Preview tx and migrate":"Preview tx and migrate","Price":"Price","Price data is not currently available for this reserve on the protocol subgraph":"Price data is not currently available for this reserve on the protocol subgraph","Price impact":"Price impact","Price impact is the spread between the total value of the entry tokens switched and the destination tokens obtained (in USD), which results from the limited liquidity of the trading pair.":"Price impact is the spread between the total value of the entry tokens switched and the destination tokens obtained (in USD), which results from the limited liquidity of the trading pair.","Price impact {0}%":["Price impact ",["0"],"%"],"Privacy":"Privacy","Proposal details":"Proposal details","Proposal overview":"Proposal overview","Proposals":"Proposals","Proposition":"Proposition","Protocol borrow cap at 100% for this asset. Further borrowing unavailable.":"Protocol borrow cap at 100% for this asset. Further borrowing unavailable.","Protocol borrow cap is at 100% for this asset. Further borrowing unavailable.":"Protocol borrow cap is at 100% for this asset. Further borrowing unavailable.","Protocol debt ceiling is at 100% for this asset. Further borrowing against this asset is unavailable.":"Protocol debt ceiling is at 100% for this asset. Further borrowing against this asset is unavailable.","Protocol debt ceiling is at 100% for this asset. Futher borrowing against this asset is unavailable.":"Protocol debt ceiling is at 100% for this asset. Futher borrowing against this asset is unavailable.","Protocol supply cap at 100% for this asset. Further supply unavailable.":"Protocol supply cap at 100% for this asset. Further supply unavailable.","Protocol supply cap is at 100% for this asset. Further supply unavailable.":"Protocol supply cap is at 100% for this asset. Further supply unavailable.","Quorum":"Quorum","Rate change":"Rate change","Raw-Ipfs":"Raw-Ipfs","Reached":"Reached","Reactivate cooldown period to unstake {0} {stakedToken}":["Reactivate cooldown period to unstake ",["0"]," ",["stakedToken"]],"Read more here.":"Read more here.","Read-only mode allows to see address positions in Aave, but you won't be able to perform transactions.":"Read-only mode allows to see address positions in Aave, but you won't be able to perform transactions.","Read-only mode.":"Read-only mode.","Read-only mode. Connect to a wallet to perform transactions.":"Read-only mode. Connect to a wallet to perform transactions.","Receive (est.)":"Receive (est.)","Received":"Received","Recipient address":"Recipient address","Rejected connection request":"Rejected connection request","Reload":"Reload","Reload the page":"Reload the page","Remaining debt":"Remaining debt","Remaining supply":"Remaining supply","Remind me":"Remind me","Remove":"Remove","Repaid":"Repaid","Repay":"Repay","Repay with":"Repay with","Repay {symbol}":["Repay ",["symbol"]],"Repaying {symbol}":["Repaying ",["symbol"]],"Repayment amount to reach {0}% utilization":["Repayment amount to reach ",["0"],"% utilization"],"Representative smart contract wallet (ie. Safe) addresses on other chains.":"Representative smart contract wallet (ie. Safe) addresses on other chains.","Representing smart contract wallet (ie. Safe) addresses on other chains.":"Representing smart contract wallet (ie. Safe) addresses on other chains.","Reserve Size":"Reserve Size","Reserve factor":"Reserve factor","Reserve factor is a percentage of interest which goes to a {0} that is controlled by Aave governance to promote ecosystem growth.":["Reserve factor is a percentage of interest which goes to a ",["0"]," that is controlled by Aave governance to promote ecosystem growth."],"Reserve status & configuration":"Reserve status & configuration","Reset":"Reset","Restake":"Restake","Restake {symbol}":["Restake ",["symbol"]],"Restaked":"Restaked","Restaking {symbol}":["Restaking ",["symbol"]],"Review approval tx details":"Review approval tx details","Review tx":"Review tx","Review tx details":"Review tx details","Revoke power":"Revoke power","Reward(s) to claim":"Reward(s) to claim","Rewards APR":"Rewards APR","Risk details":"Risk details","SEE CHARTS":"SEE CHARTS","Safety of your deposited collateral against the borrowed assets and its underlying value.":"Safety of your deposited collateral against the borrowed assets and its underlying value.","Save and share":"Save and share","Seems like we can't switch the network automatically. Please check if you can change it from the wallet.":"Seems like we can't switch the network automatically. Please check if you can change it from the wallet.","Select":"Select","Select APY type to switch":"Select APY type to switch","Select an asset":"Select an asset","Select language":"Select language","Select slippage tolerance":"Select slippage tolerance","Selected assets have successfully migrated. Visit the Market Dashboard to see them.":"Selected assets have successfully migrated. Visit the Market Dashboard to see them.","Selected borrow assets":"Selected borrow assets","Selected supply assets":"Selected supply assets","Send Feedback":"Send Feedback","Send feedback":"Send feedback","Set up delegation":"Set up delegation","Setup notifications about your Health Factor using the Hal app.":"Setup notifications about your Health Factor using the Hal app.","Share on Lens":"Share on Lens","Share on twitter":"Share on twitter","Show":"Show","Show Frozen or paused assets":"Show Frozen or paused assets","Show assets with 0 balance":"Show assets with 0 balance","Sign to continue":"Sign to continue","Signatures ready":"Signatures ready","Signing":"Signing","Since this asset is frozen, the only available actions are withdraw and repay which can be accessed from the <0>Dashboard":"Since this asset is frozen, the only available actions are withdraw and repay which can be accessed from the <0>Dashboard","Since this is a test network, you can get any of the assets if you have ETH on your wallet":"Since this is a test network, you can get any of the assets if you have ETH on your wallet","Slippage":"Slippage","Slippage is the difference between the quoted and received amounts from changing market conditions between the moment the transaction is submitted and its verification.":"Slippage is the difference between the quoted and received amounts from changing market conditions between the moment the transaction is submitted and its verification.","Some migrated assets will not be used as collateral due to enabled isolation mode in {marketName} V3 Market. Visit <0>{marketName} V3 Dashboard to manage isolation mode.":["Some migrated assets will not be used as collateral due to enabled isolation mode in ",["marketName"]," V3 Market. Visit <0>",["marketName"]," V3 Dashboard to manage isolation mode."],"Something went wrong":"Something went wrong","Sorry, an unexpected error happened. In the meantime you may try reloading the page, or come back later.":"Sorry, an unexpected error happened. In the meantime you may try reloading the page, or come back later.","Sorry, we couldn't find the page you were looking for.":"Sorry, we couldn't find the page you were looking for.","Spanish":"Spanish","Stable":"Stable","Stable Interest Type is disabled for this currency":"Stable Interest Type is disabled for this currency","Stable borrowing is enabled":"Stable borrowing is enabled","Stable borrowing is not enabled":"Stable borrowing is not enabled","Stable debt supply is not zero":"Stable debt supply is not zero","Stable interest rate will <0>stay the same for the duration of your loan. Recommended for long-term loan periods and for users who prefer predictability.":"Stable interest rate will <0>stay the same for the duration of your loan. Recommended for long-term loan periods and for users who prefer predictability.","Stablecoin":"Stablecoin","Stake":"Stake","Stake AAVE":"Stake AAVE","Stake ABPT":"Stake ABPT","Stake GHO":"Stake GHO","Stake cooldown activated":"Stake cooldown activated","Staked":"Staked","Staking":"Staking","Staking APR":"Staking APR","Staking Rewards":"Staking Rewards","Staking balance":"Staking balance","Staking discount":"Staking discount","State":"State","Submission did not work, please try again later or contact wecare@avara.xyz":"Submission did not work, please try again later or contact wecare@avara.xyz","Supplied":"Supplied","Supplied asset amount":"Supplied asset amount","Supplied assets":"Supplied assets","Supply":"Supply","Supply APY":"Supply APY","Supply apy":"Supply apy","Supply balance":"Supply balance","Supply balance after switch":"Supply balance after switch","Supply cap is exceeded":"Supply cap is exceeded","Supply cap on target reserve reached. Try lowering the amount.":"Supply cap on target reserve reached. Try lowering the amount.","Supply {symbol}":["Supply ",["symbol"]],"Supplying your":"Supplying your","Supplying {symbol}":["Supplying ",["symbol"]],"Switch":"Switch","Switch APY type":"Switch APY type","Switch E-Mode":"Switch E-Mode","Switch E-Mode category":"Switch E-Mode category","Switch Network":"Switch Network","Switch borrow position":"Switch borrow position","Switch rate":"Switch rate","Switch to":"Switch to","Switched":"Switched","Switching":"Switching","Switching E-Mode":"Switching E-Mode","Switching rate":"Switching rate","Techpaper":"Techpaper","Terms":"Terms","Test Assets":"Test Assets","Testnet mode":"Testnet mode","Testnet mode is ON":"Testnet mode is ON","Thank you for submitting feedback!":"Thank you for submitting feedback!","Thank you for voting!!":"Thank you for voting!!","The % of your total borrowing power used. This is based on the amount of your collateral supplied and the total amount that you can borrow.":"The % of your total borrowing power used. This is based on the amount of your collateral supplied and the total amount that you can borrow.","The Aave Balancer Pool Token (ABPT) is a liquidity pool token. You can receive ABPT by depositing a combination of AAVE + wstETH in the Balancer liquidity pool. You can then stake your BPT in the Safety Module to secure the protocol and earn Safety Incentives.":"The Aave Balancer Pool Token (ABPT) is a liquidity pool token. You can receive ABPT by depositing a combination of AAVE + wstETH in the Balancer liquidity pool. You can then stake your BPT in the Safety Module to secure the protocol and earn Safety Incentives.","The Aave Protocol is programmed to always use the price of 1 GHO = $1. This is different from using market pricing via oracles for other crypto assets. This creates stabilizing arbitrage opportunities when the price of GHO fluctuates.":"The Aave Protocol is programmed to always use the price of 1 GHO = $1. This is different from using market pricing via oracles for other crypto assets. This creates stabilizing arbitrage opportunities when the price of GHO fluctuates.","The Maximum LTV ratio represents the maximum borrowing power of a specific collateral. For example, if a collateral has an LTV of 75%, the user can borrow up to 0.75 worth of ETH in the principal currency for every 1 ETH worth of collateral.":"The Maximum LTV ratio represents the maximum borrowing power of a specific collateral. For example, if a collateral has an LTV of 75%, the user can borrow up to 0.75 worth of ETH in the principal currency for every 1 ETH worth of collateral.","The Stable Rate is not enabled for this currency":"The Stable Rate is not enabled for this currency","The address of the pool addresses provider is invalid":"The address of the pool addresses provider is invalid","The app is running in fork mode.":"The app is running in fork mode.","The app is running in testnet mode. Learn how it works in":"The app is running in testnet mode. Learn how it works in","The caller of the function is not an AToken":"The caller of the function is not an AToken","The caller of this function must be a pool":"The caller of this function must be a pool","The collateral balance is 0":"The collateral balance is 0","The collateral chosen cannot be liquidated":"The collateral chosen cannot be liquidated","The cooldown period is the time required prior to unstaking your tokens (20 days). You can only withdraw your assets from the Security Module after the cooldown period and within the unstake window.<0>Learn more":"The cooldown period is the time required prior to unstaking your tokens (20 days). You can only withdraw your assets from the Security Module after the cooldown period and within the unstake window.<0>Learn more","The cooldown period is {0}. After {1} of cooldown, you will enter unstake window of {2}. You will continue receiving rewards during cooldown and unstake window.":["The cooldown period is ",["0"],". After ",["1"]," of cooldown, you will enter unstake window of ",["2"],". You will continue receiving rewards during cooldown and unstake window."],"The loan to value of the migrated positions would cause liquidation. Increase migrated collateral or reduce migrated borrow to continue.":"The loan to value of the migrated positions would cause liquidation. Increase migrated collateral or reduce migrated borrow to continue.","The requested amount is greater than the max loan size in stable rate mode":"The requested amount is greater than the max loan size in stable rate mode","The total amount of your assets denominated in USD that can be used as collateral for borrowing assets.":"The total amount of your assets denominated in USD that can be used as collateral for borrowing assets.","The underlying asset cannot be rescued":"The underlying asset cannot be rescued","The underlying balance needs to be greater than 0":"The underlying balance needs to be greater than 0","The weighted average of APY for all borrowed assets, including incentives.":"The weighted average of APY for all borrowed assets, including incentives.","The weighted average of APY for all supplied assets, including incentives.":"The weighted average of APY for all supplied assets, including incentives.","There are not enough funds in the{0}reserve to borrow":["There are not enough funds in the",["0"],"reserve to borrow"],"There is not enough collateral to cover a new borrow":"There is not enough collateral to cover a new borrow","There is not enough liquidity for the target asset to perform the switch. Try lowering the amount.":"There is not enough liquidity for the target asset to perform the switch. Try lowering the amount.","There was some error. Please try changing the parameters or <0><1>copy the error":"There was some error. Please try changing the parameters or <0><1>copy the error","These assets are temporarily frozen or paused by Aave community decisions, meaning that further supply / borrow, or rate swap of these assets are unavailable. Withdrawals and debt repayments are allowed. Follow the <0>Aave governance forum for further updates.":"These assets are temporarily frozen or paused by Aave community decisions, meaning that further supply / borrow, or rate swap of these assets are unavailable. Withdrawals and debt repayments are allowed. Follow the <0>Aave governance forum for further updates.","These funds have been borrowed and are not available for withdrawal at this time.":"These funds have been borrowed and are not available for withdrawal at this time.","This action will reduce V2 health factor below liquidation threshold. retain collateral or migrate borrow position to continue.":"This action will reduce V2 health factor below liquidation threshold. retain collateral or migrate borrow position to continue.","This action will reduce health factor of V3 below liquidation threshold. Increase migrated collateral or reduce migrated borrow to continue.":"This action will reduce health factor of V3 below liquidation threshold. Increase migrated collateral or reduce migrated borrow to continue.","This action will reduce your health factor. Please be mindful of the increased risk of collateral liquidation.":"This action will reduce your health factor. Please be mindful of the increased risk of collateral liquidation.","This address is blocked on app.aave.com because it is associated with one or more":"This address is blocked on app.aave.com because it is associated with one or more","This asset has almost reached its borrow cap. There is only {messageValue} available to be borrowed from this market.":["This asset has almost reached its borrow cap. There is only ",["messageValue"]," available to be borrowed from this market."],"This asset has almost reached its supply cap. There can only be {messageValue} supplied to this market.":["This asset has almost reached its supply cap. There can only be ",["messageValue"]," supplied to this market."],"This asset has been paused due to a community decision. Supply, withdraw, borrows and repays are impacted.":"This asset has been paused due to a community decision. Supply, withdraw, borrows and repays are impacted.","This asset has reached its borrow cap. Nothing is available to be borrowed from this market.":"This asset has reached its borrow cap. Nothing is available to be borrowed from this market.","This asset has reached its supply cap. Nothing is available to be supplied from this market.":"This asset has reached its supply cap. Nothing is available to be supplied from this market.","This asset is frozen due to an Aave Protocol Governance decision. <0>More details":"This asset is frozen due to an Aave Protocol Governance decision. <0>More details","This asset is frozen due to an Aave Protocol Governance decision. On the 20th of December 2022, renFIL will no longer be supported and cannot be bridged back to its native network. It is recommended to withdraw supply positions and repay borrow positions so that renFIL can be bridged back to FIL before the deadline. After this date, it will no longer be possible to convert renFIL to FIL. <0>More details":"This asset is frozen due to an Aave Protocol Governance decision. On the 20th of December 2022, renFIL will no longer be supported and cannot be bridged back to its native network. It is recommended to withdraw supply positions and repay borrow positions so that renFIL can be bridged back to FIL before the deadline. After this date, it will no longer be possible to convert renFIL to FIL. <0>More details","This asset is frozen due to an Aave community decision. <0>More details":"This asset is frozen due to an Aave community decision. <0>More details","This asset is planned to be offboarded due to an Aave Protocol Governance decision. <0>More details":"This asset is planned to be offboarded due to an Aave Protocol Governance decision. <0>More details","This gas calculation is only an estimation. Your wallet will set the price of the transaction. You can modify the gas settings directly from your wallet provider.":"This gas calculation is only an estimation. Your wallet will set the price of the transaction. You can modify the gas settings directly from your wallet provider.","This integration was<0>proposed and approvedby the community.":"This integration was<0>proposed and approvedby the community.","This is a program initiated and implemented by the decentralised Aave community. Aave Labs does not guarantee the program and accepts no liability.":"This is a program initiated and implemented by the decentralised Aave community. Aave Labs does not guarantee the program and accepts no liability.","This is the total amount available for you to borrow. You can borrow based on your collateral and until the borrow cap is reached.":"This is the total amount available for you to borrow. You can borrow based on your collateral and until the borrow cap is reached.","This is the total amount that you are able to supply to in this reserve. You are able to supply your wallet balance up until the supply cap is reached.":"This is the total amount that you are able to supply to in this reserve. You are able to supply your wallet balance up until the supply cap is reached.","This represents the threshold at which a borrow position will be considered undercollateralized and subject to liquidation for each collateral. For example, if a collateral has a liquidation threshold of 80%, it means that the position will be liquidated when the debt value is worth 80% of the collateral value.":"This represents the threshold at which a borrow position will be considered undercollateralized and subject to liquidation for each collateral. For example, if a collateral has a liquidation threshold of 80%, it means that the position will be liquidated when the debt value is worth 80% of the collateral value.","Time left to unstake":"Time left to unstake","Time remaining until the 48 hour withdraw period starts.":"Time remaining until the 48 hour withdraw period starts.","Time remaining until the withdraw period ends.":"Time remaining until the withdraw period ends.","Tip: Try increasing slippage or reduce input amount":"Tip: Try increasing slippage or reduce input amount","To borrow you need to supply any asset to be used as collateral.":"To borrow you need to supply any asset to be used as collateral.","To continue, you need to grant Aave smart contracts permission to move your funds from your wallet. Depending on the asset and wallet you use, it is done by signing the permission message (gas free), or by submitting an approval transaction (requires gas). <0>Learn more":"To continue, you need to grant Aave smart contracts permission to move your funds from your wallet. Depending on the asset and wallet you use, it is done by signing the permission message (gas free), or by submitting an approval transaction (requires gas). <0>Learn more","To enable E-mode for the {0} category, all borrow positions outside of this category must be closed.":["To enable E-mode for the ",["0"]," category, all borrow positions outside of this category must be closed."],"To repay on behalf of a user an explicit amount to repay is needed":"To repay on behalf of a user an explicit amount to repay is needed","To request access for this permissioned market, please visit: <0>Acces Provider Name":"To request access for this permissioned market, please visit: <0>Acces Provider Name","To submit a proposal for minor changes to the protocol, you'll need at least 80.00K power. If you want to change the core code base, you'll need 320k power.<0>Learn more.":"To submit a proposal for minor changes to the protocol, you'll need at least 80.00K power. If you want to change the core code base, you'll need 320k power.<0>Learn more.","Top 10 addresses":"Top 10 addresses","Total available":"Total available","Total borrowed":"Total borrowed","Total borrows":"Total borrows","Total emission per day":"Total emission per day","Total interest accrued":"Total interest accrued","Total market size":"Total market size","Total supplied":"Total supplied","Total worth":"Total worth","Track wallet":"Track wallet","Track wallet balance in read-only mode":"Track wallet balance in read-only mode","Transaction failed":"Transaction failed","Transaction history":"Transaction history","Transaction history is not currently available for this market":"Transaction history is not currently available for this market","Transaction overview":"Transaction overview","Transactions":"Transactions","Unavailable":"Unavailable","Unbacked":"Unbacked","Unbacked mint cap is exceeded":"Unbacked mint cap is exceeded","Underlying asset does not exist in {marketName} v3 Market, hence this position cannot be migrated.":["Underlying asset does not exist in ",["marketName"]," v3 Market, hence this position cannot be migrated."],"Underlying token":"Underlying token","Unstake":"Unstake","Unstake now":"Unstake now","Unstake window":"Unstake window","Unstake {symbol}":["Unstake ",["symbol"]],"Unstaked":"Unstaked","Unstaking {symbol}":["Unstaking ",["symbol"]],"Update: Disruptions reported for WETH, WBTC, WMATIC, and USDT. AIP 230 will resolve the disruptions and the market will be operating as normal on ~26th May 13h00 UTC.":"Update: Disruptions reported for WETH, WBTC, WMATIC, and USDT. AIP 230 will resolve the disruptions and the market will be operating as normal on ~26th May 13h00 UTC.","Use it to vote for or against active proposals.":"Use it to vote for or against active proposals.","Use your AAVE, stkAAVE, or aAave balance to delegate your voting and proposition powers. You will not be sending any tokens, only the rights to vote and propose changes to the protocol. You can re-delegate or revoke power to self at any time.":"Use your AAVE, stkAAVE, or aAave balance to delegate your voting and proposition powers. You will not be sending any tokens, only the rights to vote and propose changes to the protocol. You can re-delegate or revoke power to self at any time.","Used as collateral":"Used as collateral","User cannot withdraw more than the available balance":"User cannot withdraw more than the available balance","User did not borrow the specified currency":"User did not borrow the specified currency","User does not have outstanding stable rate debt on this reserve":"User does not have outstanding stable rate debt on this reserve","User does not have outstanding variable rate debt on this reserve":"User does not have outstanding variable rate debt on this reserve","User is in isolation mode":"User is in isolation mode","User is trying to borrow multiple assets including a siloed one":"User is trying to borrow multiple assets including a siloed one","Users who stake AAVE in Safety Module (i.e. stkAAVE holders) receive a discount on GHO borrow interest rate. The discount applies to 100 GHO for every 1 stkAAVE held. Use the calculator below to see GHO borrow rate with the discount applied.":"Users who stake AAVE in Safety Module (i.e. stkAAVE holders) receive a discount on GHO borrow interest rate. The discount applies to 100 GHO for every 1 stkAAVE held. Use the calculator below to see GHO borrow rate with the discount applied.","Utilization Rate":"Utilization Rate","VIEW TX":"VIEW TX","VOTE NAY":"VOTE NAY","VOTE YAE":"VOTE YAE","Variable":"Variable","Variable debt supply is not zero":"Variable debt supply is not zero","Variable interest rate will <0>fluctuate based on the market conditions. Recommended for short-term positions.":"Variable interest rate will <0>fluctuate based on the market conditions. Recommended for short-term positions.","Variable rate":"Variable rate","Version 2":"Version 2","Version 3":"Version 3","View":"View","View Transactions":"View Transactions","View all votes":"View all votes","View contract":"View contract","View details":"View details","View on Explorer":"View on Explorer","Vote NAY":"Vote NAY","Vote YAE":"Vote YAE","Voted NAY":"Voted NAY","Voted YAE":"Voted YAE","Votes":"Votes","Voting":"Voting","Voting is on":"Voting is on","Voting power":"Voting power","Voting results":"Voting results","Wallet Balance":"Wallet Balance","Wallet balance":"Wallet balance","Wallet not detected. Connect or install wallet and retry":"Wallet not detected. Connect or install wallet and retry","Wallets are provided by External Providers and by selecting you agree to Terms of those Providers. Your access to the wallet might be reliant on the External Provider being operational.":"Wallets are provided by External Providers and by selecting you agree to Terms of those Providers. Your access to the wallet might be reliant on the External Provider being operational.","We couldn't find any assets related to your search. Try again with a different asset name, symbol, or address.":"We couldn't find any assets related to your search. Try again with a different asset name, symbol, or address.","We couldn't find any transactions related to your search. Try again with a different asset name, or reset filters.":"We couldn't find any transactions related to your search. Try again with a different asset name, or reset filters.","We couldn’t detect a wallet. Connect a wallet to stake and view your balance.":"We couldn’t detect a wallet. Connect a wallet to stake and view your balance.","We suggest you go back to the Dashboard.":"We suggest you go back to the Dashboard.","Website":"Website","When a liquidation occurs, liquidators repay up to 50% of the outstanding borrowed amount on behalf of the borrower. In return, they can buy the collateral at a discount and keep the difference (liquidation penalty) as a bonus.":"When a liquidation occurs, liquidators repay up to 50% of the outstanding borrowed amount on behalf of the borrower. In return, they can buy the collateral at a discount and keep the difference (liquidation penalty) as a bonus.","With a voting power of <0/>":"With a voting power of <0/>","With testnet Faucet you can get free assets to test the Aave Protocol. Make sure to switch your wallet provider to the appropriate testnet network, select desired asset, and click ‘Faucet’ to get tokens transferred to your wallet. The assets on a testnet are not “real,” meaning they have no monetary value. <0>Learn more":"With testnet Faucet you can get free assets to test the Aave Protocol. Make sure to switch your wallet provider to the appropriate testnet network, select desired asset, and click ‘Faucet’ to get tokens transferred to your wallet. The assets on a testnet are not “real,” meaning they have no monetary value. <0>Learn more","Withdraw":"Withdraw","Withdraw & Switch":"Withdraw & Switch","Withdraw and Switch":"Withdraw and Switch","Withdraw {symbol}":["Withdraw ",["symbol"]],"Withdrawing":"Withdrawing","Withdrawing and Switching":"Withdrawing and Switching","Withdrawing this amount will reduce your health factor and increase risk of liquidation.":"Withdrawing this amount will reduce your health factor and increase risk of liquidation.","Withdrawing {symbol}":["Withdrawing ",["symbol"]],"Wrong Network":"Wrong Network","YAE":"YAE","You are entering Isolation mode":"You are entering Isolation mode","You can borrow this asset with a stable rate only if you borrow more than the amount you are supplying as collateral.":"You can borrow this asset with a stable rate only if you borrow more than the amount you are supplying as collateral.","You can not change Interest Type to stable as your borrowings are higher than your collateral":"You can not change Interest Type to stable as your borrowings are higher than your collateral","You can not disable E-Mode as your current collateralization level is above 80%, disabling E-Mode can cause liquidation. To exit E-Mode supply or repay borrowed positions.":"You can not disable E-Mode as your current collateralization level is above 80%, disabling E-Mode can cause liquidation. To exit E-Mode supply or repay borrowed positions.","You can not switch usage as collateral mode for this currency, because it will cause collateral call":"You can not switch usage as collateral mode for this currency, because it will cause collateral call","You can not use this currency as collateral":"You can not use this currency as collateral","You can not withdraw this amount because it will cause collateral call":"You can not withdraw this amount because it will cause collateral call","You can only switch to tokens with variable APY types. After this transaction, you may change the variable rate to a stable one if available.":"You can only switch to tokens with variable APY types. After this transaction, you may change the variable rate to a stable one if available.","You can only withdraw your assets from the Security Module after the cooldown period ends and the unstake window is active.":"You can only withdraw your assets from the Security Module after the cooldown period ends and the unstake window is active.","You can report incident to our <0>Discord or<1>Github.":"You can report incident to our <0>Discord or<1>Github.","You cancelled the transaction.":"You cancelled the transaction.","You did not participate in this proposal":"You did not participate in this proposal","You do not have supplies in this currency":"You do not have supplies in this currency","You don’t have enough funds in your wallet to repay the full amount. If you proceed to repay with your current amount of funds, you will still have a small borrowing position in your dashboard.":"You don’t have enough funds in your wallet to repay the full amount. If you proceed to repay with your current amount of funds, you will still have a small borrowing position in your dashboard.","You have no AAVE/stkAAVE/aAave balance to delegate.":"You have no AAVE/stkAAVE/aAave balance to delegate.","You have not borrow yet using this currency":"You have not borrow yet using this currency","You may borrow up to <0/> GHO at <1/> (max discount)":"You may borrow up to <0/> GHO at <1/> (max discount)","You may enter a custom amount in the field.":"You may enter a custom amount in the field.","You switched to {0} rate":["You switched to ",["0"]," rate"],"You unstake here":"You unstake here","You voted {0}":["You voted ",["0"]],"You will exit isolation mode and other tokens can now be used as collateral":"You will exit isolation mode and other tokens can now be used as collateral","You {action} <0/> {symbol}":["You ",["action"]," <0/> ",["symbol"]],"You've successfully switched borrow position.":"You've successfully switched borrow position.","You've successfully switched tokens.":"You've successfully switched tokens.","You've successfully withdrew & switched tokens.":"You've successfully withdrew & switched tokens.","Your balance is lower than the selected amount.":"Your balance is lower than the selected amount.","Your borrows":"Your borrows","Your current loan to value based on your collateral supplied.":"Your current loan to value based on your collateral supplied.","Your health factor and loan to value determine the assurance of your collateral. To avoid liquidations you can supply more collateral or repay borrow positions.":"Your health factor and loan to value determine the assurance of your collateral. To avoid liquidations you can supply more collateral or repay borrow positions.","Your info":"Your info","Your proposition power is based on your AAVE/stkAAVE balance and received delegations.":"Your proposition power is based on your AAVE/stkAAVE balance and received delegations.","Your reward balance is 0":"Your reward balance is 0","Your supplies":"Your supplies","Your voting info":"Your voting info","Your voting power is based on your AAVE/stkAAVE balance and received delegations.":"Your voting power is based on your AAVE/stkAAVE balance and received delegations.","Your {name} wallet is empty. Purchase or transfer assets or use <0>{0} to transfer your {network} assets.":["Your ",["name"]," wallet is empty. Purchase or transfer assets or use <0>",["0"]," to transfer your ",["network"]," assets."],"Your {name} wallet is empty. Purchase or transfer assets.":["Your ",["name"]," wallet is empty. Purchase or transfer assets."],"Your {networkName} wallet is empty. Get free test assets at":["Your ",["networkName"]," wallet is empty. Get free test assets at"],"Your {networkName} wallet is empty. Get free test {0} at":["Your ",["networkName"]," wallet is empty. Get free test ",["0"]," at"],"Zero address not valid":"Zero address not valid","assets":"assets","blocked activities":"blocked activities","copy the error":"copy the error","disabled":"disabled","documentation":"documentation","enabled":"enabled","ends":"ends","for":"for","of":"of","on":"on","please check that the amount you want to supply is not currently being used for staking. If it is being used for staking, your transaction might fail.":"please check that the amount you want to supply is not currently being used for staking. If it is being used for staking, your transaction might fail.","repaid":"repaid","stETH supplied as collateral will continue to accrue staking rewards provided by daily rebases.":"stETH supplied as collateral will continue to accrue staking rewards provided by daily rebases.","stETH tokens will be migrated to Wrapped stETH using Lido Protocol wrapper which leads to supply balance change after migration: {0}":["stETH tokens will be migrated to Wrapped stETH using Lido Protocol wrapper which leads to supply balance change after migration: ",["0"]],"staking view":"staking view","starts":"starts","stkAAVE holders get a discount on GHO borrow rate":"stkAAVE holders get a discount on GHO borrow rate","to":"to","tokens is not the same as staking them. If you wish to stake your":"tokens is not the same as staking them. If you wish to stake your","tokens, please go to the":"tokens, please go to the","withdrew":"withdrew","{0}":[["0"]],"{0} Balance":[["0"]," Balance"],"{0} Faucet":[["0"]," Faucet"],"{0} on-ramp service is provided by External Provider and by selecting you agree to Terms of the Provider. Your access to the service might be reliant on the External Provider being operational.":[["0"]," on-ramp service is provided by External Provider and by selecting you agree to Terms of the Provider. Your access to the service might be reliant on the External Provider being operational."],"{0}{name}":[["0"],["name"]],"{currentMethod}":[["currentMethod"]],"{d}d":[["d"],"d"],"{h}h":[["h"],"h"],"{m}m":[["m"],"m"],"{networkName} Faucet":[["networkName"]," Faucet"],"{notifyText}":[["notifyText"]],"{numSelected}/{numAvailable} assets selected":[["numSelected"],"/",["numAvailable"]," assets selected"],"{stepName}":[["stepName"]],"{s}s":[["s"],"s"],"{title}":[["title"]],"{tooltipText}":[["tooltipText"]]}}; \ No newline at end of file diff --git a/src/locales/en/messages.po b/src/locales/en/messages.po index d6e16f8318..192f7432ad 100644 --- a/src/locales/en/messages.po +++ b/src/locales/en/messages.po @@ -531,6 +531,10 @@ msgstr "Borrowed" msgid "Borrowed asset amount" msgstr "Borrowed asset amount" +#: src/modules/migration/MigrationLists.tsx +msgid "Borrowed assets" +msgstr "Borrowed assets" + #: src/components/transactions/Borrow/BorrowModalContent.tsx #: src/components/transactions/Borrow/GhoBorrowModalContent.tsx msgid "Borrowing is currently unavailable for {0}." @@ -1184,14 +1188,6 @@ msgstr "Governance" msgid "Greek" msgstr "Greek" -#: src/modules/migration/MigrationBottomPanel.tsx -msgid "Health Factor ({0} v2)" -msgstr "Health Factor ({0} v2)" - -#: src/modules/migration/MigrationBottomPanel.tsx -msgid "Health Factor ({0} v3)" -msgstr "Health Factor ({0} v3)" - #: src/components/transactions/FlowCommons/TxModalDetails.tsx #: src/modules/dashboard/DashboardTopPanel.tsx #: src/modules/dashboard/LiquidationRiskParametresModal/LiquidationRiskParametresModal.tsx @@ -1514,6 +1510,11 @@ msgstr "Menu" msgid "Migrate" msgstr "Migrate" +#: src/layouts/MobileMenu.tsx +#: src/layouts/MoreMenu.tsx +msgid "Migrate to Aave V3" +msgstr "Migrate to Aave V3" + #: src/components/TopInfoPanel/PageTitle.tsx msgid "Migrate to V3" msgstr "Migrate to V3" @@ -1527,10 +1528,13 @@ msgid "Migrate to v3" msgstr "Migrate to v3" #: src/modules/dashboard/DashboardTopPanel.tsx -#: src/modules/migration/MigrationTopPanel.tsx msgid "Migrate to {0} v3 Market" msgstr "Migrate to {0} v3 Market" +#: src/modules/migration/MigrationBottomPanel.tsx +msgid "Migrate your assets" +msgstr "Migrate your assets" + #: src/components/transactions/MigrateV3/MigrateV3ModalContent.tsx #: src/components/transactions/StakingMigrate/StakingMigrateModalContent.tsx msgid "Migrated" @@ -2017,10 +2021,6 @@ msgstr "Restaking {symbol}" msgid "Review approval tx details" msgstr "Review approval tx details" -#: src/modules/migration/MigrationBottomPanel.tsx -msgid "Review changes to continue" -msgstr "Review changes to continue" - #: src/components/transactions/CollateralChange/CollateralChangeModal.tsx msgid "Review tx" msgstr "Review tx" @@ -2082,14 +2082,6 @@ msgstr "Select language" msgid "Select slippage tolerance" msgstr "Select slippage tolerance" -#: src/modules/migration/MigrationLists.tsx -msgid "Select v2 borrows to migrate" -msgstr "Select v2 borrows to migrate" - -#: src/modules/migration/MigrationLists.tsx -msgid "Select v2 supplies to migrate" -msgstr "Select v2 supplies to migrate" - #: src/components/transactions/MigrateV3/MigrateV3ModalContent.tsx msgid "Selected assets have successfully migrated. Visit the Market Dashboard to see them." msgstr "Selected assets have successfully migrated. Visit the Market Dashboard to see them." @@ -2291,6 +2283,10 @@ msgstr "Supplied" msgid "Supplied asset amount" msgstr "Supplied asset amount" +#: src/modules/migration/MigrationLists.tsx +msgid "Supplied assets" +msgstr "Supplied assets" + #: pages/index.page.tsx #: src/components/transactions/Supply/SupplyModal.tsx #: src/modules/dashboard/lists/SuppliedPositionsList/SuppliedPositionsListItem.tsx diff --git a/src/modules/dashboard/DashboardTopPanel.tsx b/src/modules/dashboard/DashboardTopPanel.tsx index 4db9edac9d..b64e7c6eba 100644 --- a/src/modules/dashboard/DashboardTopPanel.tsx +++ b/src/modules/dashboard/DashboardTopPanel.tsx @@ -121,7 +121,7 @@ export const DashboardTopPanel = () => { /> {showMigrateButton && !downToSM && ( - + - - - - - - - Migration risks - - - - Please always be aware of your Health Factor (HF) when partially migrating a - position and that your rates will be updated to V3 rates. - - - - - Migrating multiple collaterals and borrowed assets at the same time can be an expensive - operation and might fail in certain situations. - - Therefore it’s not recommended to migrate positions with more than 5 assets (deposited - + borrowed) at the same time. - - - - - Be mindful of the network congestion and gas prices. - - + + + + + Migration risks + + + + Please always be aware of your Health Factor (HF) when partially migrating a + position and that your rates will be updated to V3 rates. + + + + + Migrating multiple collaterals and borrowed assets at the same time can be an + expensive operation and might fail in certain situations. + + Therefore it’s not recommended to migrate positions with more than 5 assets + (deposited + borrowed) at the same time. + + + + + Be mindful of the network congestion and gas prices. + + + ); }; diff --git a/src/modules/migration/MigrationList.tsx b/src/modules/migration/MigrationList.tsx index 24ab1ca787..f9014bb5c9 100644 --- a/src/modules/migration/MigrationList.tsx +++ b/src/modules/migration/MigrationList.tsx @@ -83,9 +83,10 @@ export const MigrationList = ({ return ( - + {titleComponent} {isolatedReserveV3 && !isolatedReserveV3.enteringIsolationMode && ( diff --git a/src/modules/migration/MigrationLists.tsx b/src/modules/migration/MigrationLists.tsx index 179c103589..5181ec7977 100644 --- a/src/modules/migration/MigrationLists.tsx +++ b/src/modules/migration/MigrationLists.tsx @@ -1,5 +1,5 @@ import { Trans } from '@lingui/macro'; -import { Box } from '@mui/material'; +import { Paper, Typography } from '@mui/material'; import { ReactNode } from 'react'; import { BorrowMigrationReserve, @@ -53,20 +53,32 @@ export const MigrationLists = ({ computeSelections(borrowReserves, selectedBorrowAssets); return ( - + + Assets to migrate + Select v2 supplies to migrate} + titleComponent={Supplied assets} emodeCategoryId={emodeCategoryId} withCollateral disabled={allSuppliesDisabled} @@ -83,12 +95,12 @@ export const MigrationLists = ({ isAvailable={isBorrowPositionsAvailable} withBorrow disabled={allBorrowsDisabled} - titleComponent={Select v2 borrows to migrate} + titleComponent={Borrowed assets} numSelected={activeBorrowSelections.length || 0} numAvailable={borrowReserves.length || 0} > {borrowsPositions} - + ); }; diff --git a/src/modules/migration/MigrationMarketCard.tsx b/src/modules/migration/MigrationMarketCard.tsx new file mode 100644 index 0000000000..24a8795387 --- /dev/null +++ b/src/modules/migration/MigrationMarketCard.tsx @@ -0,0 +1,168 @@ +import { ArrowNarrowRightIcon } from '@heroicons/react/solid'; +import { KeyboardArrowDown, KeyboardArrowUp } from '@mui/icons-material'; +import { + Avatar, + Badge, + Box, + Divider, + IconButton, + Menu, + MenuItem, + Skeleton, + SvgIcon, + Typography, +} from '@mui/material'; +import { FC, useState } from 'react'; +import { HealthFactorNumber } from 'src/components/HealthFactorNumber'; +import { MarketDataType } from 'src/ui-config/marketsConfig'; +import { getNetworkConfig } from 'src/utils/marketsAndNetworksConfig'; + +const formatMarketName = (market: MarketDataType) => { + return `Aave ${market.v3 ? 'V3' : 'V2'} - ${market.marketTitle}${market.isFork ? ' Fork' : ''}`; +}; + +type MigrationMarketCardProps = { + marketData: MarketDataType; + userSummaryAfterMigration?: { + healthFactor: string; + }; + userSummaryBeforeMigration?: { + healthFactor: string; + }; + selectableMarkets?: SelectableMarkets; + setFromMarketData?: (marketData: MarketDataType) => void; + loading?: boolean; +}; + +export type SelectableMarkets = Array<{ + title: string; + markets: MarketDataType[]; +}>; + +export const MigrationMarketCard: FC = ({ + marketData, + userSummaryAfterMigration, + userSummaryBeforeMigration, + selectableMarkets, + setFromMarketData, + loading, +}) => { + const [anchorEl, setAnchorEl] = useState(null); + const open = Boolean(anchorEl); + const handleClick = (event: React.MouseEvent) => { + setAnchorEl(event.currentTarget); + }; + const handleClose = () => { + setAnchorEl(null); + }; + const handleSelectedMarket = (marketData: MarketDataType) => { + setFromMarketData && setFromMarketData(marketData); + setAnchorEl(null); + }; + const networkConfig = getNetworkConfig(marketData.chainId); + return ( + + + From + + + + } + > + + + + {formatMarketName(marketData)} + + {selectableMarkets && setFromMarketData && ( + <> + + {open ? : } + + + {selectableMarkets.map((selectableMarket) => ( + + + + {selectableMarket.title} + + + {selectableMarket.markets.map((market) => { + const currentNetworkConfig = getNetworkConfig(market.chainId); + return ( + handleSelectedMarket(market)} + > + + } + > + + + + {`${market.marketTitle}${market.isFork ? ' Fork' : ''}`} + + + ); + })} + + ))} + + + )} + + + + Health Factor + + + {!loading && userSummaryBeforeMigration ? ( + + ) : ( + + )} + + + + {!loading && userSummaryAfterMigration ? ( + + ) : ( + + )} + + + + + ); +}; diff --git a/src/modules/migration/MigrationSelectionBox.tsx b/src/modules/migration/MigrationSelectionBox.tsx index 6b31b06024..c5508a75e0 100644 --- a/src/modules/migration/MigrationSelectionBox.tsx +++ b/src/modules/migration/MigrationSelectionBox.tsx @@ -1,5 +1,5 @@ import { CheckIcon, MinusSmIcon } from '@heroicons/react/solid'; -import { Box, SvgIcon, Typography, useTheme } from '@mui/material'; +import { Box, SvgIcon, useTheme } from '@mui/material'; import { ListHeaderTitle } from 'src/components/lists/ListHeaderTitle'; interface MigrationSelectionBoxProps { @@ -31,46 +31,42 @@ export const MigrationSelectionBox = ({ if (disabled) { return ( - - - + ); } return ( - - {allSelected ? ( - - - - - - ) : numSelected !== 0 ? ( - - - - - - ) : ( - - )} - + {allSelected ? ( + + + + + + ) : numSelected !== 0 ? ( + + + + + + ) : ( + + )} ); }; diff --git a/src/modules/migration/MigrationTopPanel.tsx b/src/modules/migration/MigrationTopPanel.tsx index cf529b8a78..cc216f3117 100644 --- a/src/modules/migration/MigrationTopPanel.tsx +++ b/src/modules/migration/MigrationTopPanel.tsx @@ -3,18 +3,10 @@ import ArrowBackRoundedIcon from '@mui/icons-material/ArrowBackOutlined'; import { Box, Button, SvgIcon, useMediaQuery, useTheme } from '@mui/material'; import { useRouter } from 'next/router'; import { ROUTES } from 'src/components/primitives/Link'; -import { PageTitle } from 'src/components/TopInfoPanel/PageTitle'; import { TopInfoPanel } from 'src/components/TopInfoPanel/TopInfoPanel'; -import { getMarketHelpData, getMarketInfoById, MarketLogo } from '../../components/MarketSwitcher'; -import { useProtocolDataContext } from '../../hooks/useProtocolDataContext'; - export const MigrationTopPanel = () => { const router = useRouter(); - const { currentMarket } = useProtocolDataContext(); - const { market, network } = getMarketInfoById(currentMarket); - const marketNaming = getMarketHelpData(market.marketTitle); - const theme = useTheme(); const downToSM = useMediaQuery(theme.breakpoints.down('sm')); @@ -50,22 +42,6 @@ export const MigrationTopPanel = () => { Go Back - - - - Migrate to{' '} - {market.marketTitle === 'Ethereum AMM' ? 'Ethereum' : market.marketTitle} v3 - Market - - - } - /> } /> diff --git a/src/modules/reserve-overview/ReserveActions.tsx b/src/modules/reserve-overview/ReserveActions.tsx index 7136a7c135..3e9e67e812 100644 --- a/src/modules/reserve-overview/ReserveActions.tsx +++ b/src/modules/reserve-overview/ReserveActions.tsx @@ -27,7 +27,6 @@ import { } from 'src/hooks/app-data-provider/useAppDataProvider'; import { useWalletBalances } from 'src/hooks/app-data-provider/useWalletBalances'; import { useModalContext } from 'src/hooks/useModal'; -import { usePermissions } from 'src/hooks/usePermissions'; import { useWeb3Context } from 'src/libs/hooks/useWeb3Context'; import { BuyWithFiat } from 'src/modules/staking/BuyWithFiat'; import { useRootStore } from 'src/store/root'; @@ -65,7 +64,6 @@ export const ReserveActions = ({ reserve }: ReserveActionsProps) => { const [selectedAsset, setSelectedAsset] = useState(reserve.symbol); const { currentAccount, loading: loadingWeb3Context } = useWeb3Context(); - const { isPermissionsLoading } = usePermissions(); const { openBorrow, openSupply } = useModalContext(); const currentMarket = useRootStore((store) => store.currentMarket); const currentNetworkConfig = useRootStore((store) => store.currentNetworkConfig); @@ -132,7 +130,7 @@ export const ReserveActions = ({ reserve }: ReserveActionsProps) => { reserve, }); - if (!currentAccount && !isPermissionsLoading) { + if (!currentAccount) { return ; } diff --git a/src/services/MigrationService.ts b/src/services/MigrationService.ts new file mode 100644 index 0000000000..569248ed65 --- /dev/null +++ b/src/services/MigrationService.ts @@ -0,0 +1,67 @@ +import { Pool, V3MigrationHelperService } from '@aave/contract-helpers'; +import { Provider } from '@ethersproject/providers'; +import { + MIGRATION_ASSETS_EXCEPTIONS, + MigrationException, + MigrationSupplyException, +} from 'src/store/v3MigrationSlice'; +import { MarketDataType } from 'src/ui-config/marketsConfig'; +import { getNetworkConfig } from 'src/utils/marketsAndNetworksConfig'; +import invariant from 'tiny-invariant'; + +export class MigrationService { + constructor(private readonly getProvider: (chainId: number) => Provider) {} + + private getMigrationService(fromMarketData: MarketDataType, toMarketData: MarketDataType) { + invariant( + fromMarketData.addresses.V3_MIGRATOR, + 'V3_MIGRATOR address is not defined in fromMarketData' + ); + invariant(fromMarketData.chainId === toMarketData.chainId, 'ChainId mismatch'); + const provider = this.getProvider(toMarketData.chainId); + const toPool = new Pool(provider, { + POOL: toMarketData.addresses.LENDING_POOL, + REPAY_WITH_COLLATERAL_ADAPTER: toMarketData.addresses.REPAY_WITH_COLLATERAL_ADAPTER, + SWAP_COLLATERAL_ADAPTER: toMarketData.addresses.SWAP_COLLATERAL_ADAPTER, + WETH_GATEWAY: toMarketData.addresses.WETH_GATEWAY, + L2_ENCODER: toMarketData.addresses.L2_ENCODER, + }); + return new V3MigrationHelperService(provider, fromMarketData.addresses.V3_MIGRATOR, toPool); + } + + async getMigrationExceptionSupplyBalances( + migrationSupplyException: MigrationSupplyException[], + fromMarketData: MarketDataType, + toMarketData: MarketDataType + ) { + const networkConfig = getNetworkConfig(fromMarketData.chainId); + const chainId = networkConfig.underlyingChainId || fromMarketData.chainId; + const exceptions = MIGRATION_ASSETS_EXCEPTIONS[chainId] || []; + const filteredSuppliesForExceptions = migrationSupplyException.filter( + (supply) => + exceptions.indexOf(supply.underlyingAsset) >= 0 && supply.scaledATokenBalance !== '0' + ); + const migrationExceptions: Record = {}; + if (filteredSuppliesForExceptions.length !== 0) { + const migrationService = this.getMigrationService(fromMarketData, toMarketData); + const mappedSupplies = filteredSuppliesForExceptions.map( + ({ scaledATokenBalance, underlyingAsset }) => { + return migrationService.getMigrationSupply({ + amount: scaledATokenBalance, + asset: underlyingAsset, + }); + } + ); + const result = await Promise.all(mappedSupplies); + result.forEach(([asset, amount], index) => { + const v2UnderlyingAsset = filteredSuppliesForExceptions[index].underlyingAsset; + migrationExceptions[v2UnderlyingAsset] = { + v2UnderlyingAsset, + v3UnderlyingAsset: asset.toLowerCase(), + amount: amount.toString(), + }; + }); + } + return migrationExceptions; + } +} diff --git a/src/store/v3MigrationSelectors.ts b/src/store/v3MigrationSelectors.ts index b852fd7f8f..8e62d22222 100644 --- a/src/store/v3MigrationSelectors.ts +++ b/src/store/v3MigrationSelectors.ts @@ -132,7 +132,6 @@ export const selectSplittedBorrowsForMigration = (userReserves: FormattedUserRes export const selectDefinitiveSupplyAssetForMigration = ( selectedMigrationSupplyAssets: MigrationSelectedAsset[], migrationExceptions: Record, - exceptionsBalancesLoading: boolean, userReservesV3Map: Record< string, ComputedUserReserve @@ -149,13 +148,11 @@ export const selectDefinitiveSupplyAssetForMigration = ( const nonIsolatedAssets = selectedMigrationSupplyAssets.filter((supplyAsset) => { const underlyingAssetAddress = selectMigrationUnderlyingAssetWithExceptions( migrationExceptions, - exceptionsBalancesLoading, supplyAsset ); const v3UserReserve = userReservesV3Map[underlyingAssetAddress]; const v3ReserveBalanceWithExceptions = selectMigrationAssetBalanceWithExceptions( migrationExceptions, - exceptionsBalancesLoading, v3UserReserve ); if (v3UserReserve) { @@ -172,13 +169,11 @@ export const selectDefinitiveSupplyAssetForMigration = ( const isolatedAssets = selectedMigrationSupplyAssets.filter((supplyAsset) => { const underlyingAssetAddress = selectMigrationUnderlyingAssetWithExceptions( migrationExceptions, - exceptionsBalancesLoading, supplyAsset ); const v3UserReserve = userReservesV3Map[underlyingAssetAddress]; const v3ReserveBalanceWithExceptions = selectMigrationAssetBalanceWithExceptions( migrationExceptions, - exceptionsBalancesLoading, v3UserReserve ); return v3ReserveBalanceWithExceptions == '0' && v3UserReserve.reserve.isIsolated; @@ -212,13 +207,12 @@ export enum MigrationDisabled { export const selectMigrationUnderlyingAssetWithExceptions = ( migrationExceptions: Record, - exceptionsBalancesLoading: boolean, reserve: { underlyingAsset: string; } ): string => { const defaultUnderlyingAsset = reserve?.underlyingAsset; - if (!exceptionsBalancesLoading && migrationExceptions[defaultUnderlyingAsset]) { + if (migrationExceptions[defaultUnderlyingAsset]) { return migrationExceptions[defaultUnderlyingAsset].v3UnderlyingAsset; } return defaultUnderlyingAsset; @@ -238,7 +232,6 @@ export const selectMigrationUnderluingAssetWithExceptionsByV3Key = ( export const selectMigrationAssetBalanceWithExceptions = ( migrationExceptions: Record, - exceptionsBalancesLoading: boolean, reserve: { underlyingAsset: string; underlyingBalance: string; @@ -246,15 +239,11 @@ export const selectMigrationAssetBalanceWithExceptions = ( ) => { const underlyingAssetAddress = selectMigrationUnderlyingAssetWithExceptions( migrationExceptions, - exceptionsBalancesLoading, reserve ); - if (!exceptionsBalancesLoading) { - const exceptionAsset = migrationExceptions[underlyingAssetAddress]; - if (exceptionAsset) { - return exceptionAsset.amount; - } - return reserve.underlyingBalance; + const exceptionAsset = migrationExceptions[underlyingAssetAddress]; + if (exceptionAsset) { + return exceptionAsset.amount; } return reserve.underlyingBalance; }; diff --git a/src/store/v3MigrationSlice.ts b/src/store/v3MigrationSlice.ts index 1087835191..4f128dda43 100644 --- a/src/store/v3MigrationSlice.ts +++ b/src/store/v3MigrationSlice.ts @@ -43,12 +43,12 @@ export type MigrationSelectedBorrowAsset = { interestRate: InterestRate; }; -type MigrationSupplyException = { +export type MigrationSupplyException = { underlyingAsset: string; scaledATokenBalance: string; }; -const MIGRATION_ASSETS_EXCEPTIONS: Record = { +export const MIGRATION_ASSETS_EXCEPTIONS: Record = { [1]: ['0xae7ab96520de3a18e5e111b5eaab095312d7fe84'], }; @@ -60,11 +60,9 @@ export type MigrationException = { export type V3MigrationSlice = { //STATE - exceptionsBalancesLoading: boolean; selectedMigrationSupplyAssets: MigrationSelectedAsset[]; selectedMigrationBorrowAssets: MigrationSelectedBorrowAsset[]; migrationServiceInstances: Record; - migrationExceptions: Record; timestamp: number; approvalPermitsForMigrationAssets: Array; // ACTIONS @@ -95,7 +93,6 @@ export type V3MigrationSlice = { enforceAsCollateral: (underlyingAsset: string) => void; selectAllBorrow: (borrowReserves: BorrowMigrationReserve[]) => void; selectAllSupply: (supplyReserves: SupplyMigrationReserve[]) => void; - getMigrationExceptionSupplyBalances: (supplies: MigrationSupplyException[]) => void; }; export const createV3MigrationSlice: StateCreator< @@ -105,11 +102,9 @@ export const createV3MigrationSlice: StateCreator< V3MigrationSlice > = (set, get) => { return { - exceptionsBalancesLoading: false, selectedMigrationSupplyAssets: [], selectedMigrationBorrowAssets: [], migrationServiceInstances: {}, - migrationExceptions: {}, timestamp: 0, approvalPermitsForMigrationAssets: [], generatePermitPayloadForMigrationSupplyAsset: async ({ amount, underlyingAsset, deadline }) => { @@ -384,46 +379,5 @@ export const createV3MigrationSlice: StateCreator< }); return newMigratorInstance; }, - getMigrationExceptionSupplyBalances: async (supplies) => { - const chainId = get().currentNetworkConfig.underlyingChainId || get().currentChainId; - const currentChainIdExceptions = MIGRATION_ASSETS_EXCEPTIONS[chainId]; - if ( - currentChainIdExceptions && - currentChainIdExceptions.length > 0 && - !get().exceptionsBalancesLoading && - Object.keys(get().migrationExceptions).length == 0 - ) { - set({ exceptionsBalancesLoading: true }); - const filteredSuppliesForExceptions = supplies.filter( - (supply) => - currentChainIdExceptions.indexOf(supply.underlyingAsset) >= 0 && - supply.scaledATokenBalance !== '0' - ); - if (filteredSuppliesForExceptions.length > 0) { - set({ exceptionsBalancesLoading: true }); - const mappedSupplies = filteredSuppliesForExceptions.map( - ({ scaledATokenBalance, underlyingAsset }) => { - return get() - .getMigrationServiceInstance() - .getMigrationSupply({ amount: scaledATokenBalance, asset: underlyingAsset }); - } - ); - const supplyBalancesV3 = await Promise.all(mappedSupplies); - set((state) => - produce(state, (draft) => { - supplyBalancesV3.forEach(([asset, amount], index) => { - const v2UnderlyingAsset = filteredSuppliesForExceptions[index].underlyingAsset; - draft.migrationExceptions[v2UnderlyingAsset] = { - v2UnderlyingAsset, - v3UnderlyingAsset: asset.toLowerCase(), - amount: amount.toString(), - }; - }); - draft.exceptionsBalancesLoading = false; - }) - ); - } - } - }, }; }; diff --git a/src/ui-config/SharedDependenciesProvider.tsx b/src/ui-config/SharedDependenciesProvider.tsx index 1b6f48ddc4..0e4c0c5708 100644 --- a/src/ui-config/SharedDependenciesProvider.tsx +++ b/src/ui-config/SharedDependenciesProvider.tsx @@ -4,6 +4,7 @@ import { DelegationTokenService } from 'src/services/DelegationTokenService'; import { ERC20Service } from 'src/services/Erc20Service'; import { GovernanceService } from 'src/services/GovernanceService'; import { GovernanceV3Service } from 'src/services/GovernanceV3Service'; +import { MigrationService } from 'src/services/MigrationService'; import { StkAbptMigrationService } from 'src/services/StkAbptMigrationService'; import { TokenWrapperService } from 'src/services/TokenWrapperService'; import { UiGhoService } from 'src/services/UiGhoService'; @@ -33,6 +34,7 @@ interface SharedDependenciesContext { uiGhoService: UiGhoService; delegationTokenService: DelegationTokenService; stkAbptMigrationService: StkAbptMigrationService; + migrationService: MigrationService; erc20Service: ERC20Service; } @@ -64,6 +66,7 @@ export const SharedDependenciesProvider: React.FC = ({ children }) => { const approvedAmountService = new ApprovedAmountService(getProvider); const delegationTokenService = new DelegationTokenService(getGovernanceProvider); const stkAbptMigrationService = new StkAbptMigrationService(); + const migrationService = new MigrationService(getProvider); const uiPoolService = new UiPoolService(getProvider); const uiIncentivesService = new UiIncentivesService(getProvider); @@ -91,6 +94,7 @@ export const SharedDependenciesProvider: React.FC = ({ children }) => { uiGhoService, delegationTokenService, stkAbptMigrationService, + migrationService, erc20Service, }} > diff --git a/src/ui-config/queries.ts b/src/ui-config/queries.ts index 4dac9d412e..c9f58bdb09 100644 --- a/src/ui-config/queries.ts +++ b/src/ui-config/queries.ts @@ -1,3 +1,5 @@ +import { MigrationSupplyException } from 'src/store/v3MigrationSlice'; + import { MarketDataType } from './marketsConfig'; import { TokenInfo } from './TokenList'; @@ -144,6 +146,15 @@ export const queryKeysFactory = { chainId, 'tokenDelegatees', ], + migrationExceptions: ( + suplies: MigrationSupplyException[], + marketFrom: MarketDataType, + marketTo: MarketDataType + ) => [ + ...suplies.map((supply) => supply.underlyingAsset), + ...queryKeysFactory.market(marketFrom), + ...queryKeysFactory.market(marketTo), + ], tokensBalance: (tokenList: TokenInfo[], chainId: number, user: string) => [ ...queryKeysFactory.user(user), tokenList.map((elem) => elem.address), diff --git a/src/utils/theme.tsx b/src/utils/theme.tsx index b9369a632d..adee35697d 100644 --- a/src/utils/theme.tsx +++ b/src/utils/theme.tsx @@ -82,6 +82,7 @@ declare module '@mui/material/styles' { interface BreakpointOverrides { xsm: true; xxl: true; + mdlg: true; } } @@ -130,7 +131,7 @@ export const getDesignTokens = (mode: 'light' | 'dark') => { return { breakpoints: { keys: ['xs', 'xsm', 'sm', 'md', 'lg', 'xl', 'xxl'], - values: { xs: 0, xsm: 640, sm: 760, md: 960, lg: 1280, xl: 1575, xxl: 1800 }, + values: { xs: 0, xsm: 640, sm: 760, md: 960, mdlg: 1125, lg: 1280, xl: 1575, xxl: 1800 }, }, palette: { mode,