mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
Added AAVE to Matic market config
This commit is contained in:
parent
356f45f8da
commit
55201296f2
|
@ -297,7 +297,7 @@ export type iLpPoolAssets<T> = Pick<
|
||||||
|
|
||||||
export type iMaticPoolAssets<T> = Pick<
|
export type iMaticPoolAssets<T> = Pick<
|
||||||
iAssetsWithoutUSD<T>,
|
iAssetsWithoutUSD<T>,
|
||||||
'DAI' | 'USDC' | 'USDT' | 'WBTC' | 'WETH' | 'WMATIC'
|
'DAI' | 'USDC' | 'USDT' | 'WBTC' | 'WETH' | 'WMATIC' | 'AAVE'
|
||||||
>;
|
>;
|
||||||
|
|
||||||
export type iXDAIPoolAssets<T> = Pick<
|
export type iXDAIPoolAssets<T> = Pick<
|
||||||
|
|
|
@ -57,6 +57,9 @@ export const CommonsConfig: ICommonConfiguration = {
|
||||||
WMATIC: {
|
WMATIC: {
|
||||||
borrowRate: oneRay.multipliedBy(0.05).toFixed(), // TEMP
|
borrowRate: oneRay.multipliedBy(0.05).toFixed(), // TEMP
|
||||||
},
|
},
|
||||||
|
AAVE: {
|
||||||
|
borrowRate: oneRay.multipliedBy(0.03).toFixed(),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
// ----------------
|
// ----------------
|
||||||
// COMMON PROTOCOL ADDRESSES ACROSS POOLS
|
// COMMON PROTOCOL ADDRESSES ACROSS POOLS
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { oneRay, ZERO_ADDRESS } from '../../helpers/constants';
|
|
||||||
import { IMaticConfiguration, ePolygonNetwork } from '../../helpers/types';
|
import { IMaticConfiguration, ePolygonNetwork } from '../../helpers/types';
|
||||||
|
|
||||||
import { CommonsConfig } from './commons';
|
import { CommonsConfig } from './commons';
|
||||||
|
@ -9,6 +8,7 @@ import {
|
||||||
strategyWBTC,
|
strategyWBTC,
|
||||||
strategyWETH,
|
strategyWETH,
|
||||||
strategyMATIC,
|
strategyMATIC,
|
||||||
|
strategyAAVE,
|
||||||
} from './reservesConfigs';
|
} from './reservesConfigs';
|
||||||
|
|
||||||
// ----------------
|
// ----------------
|
||||||
|
@ -18,7 +18,7 @@ import {
|
||||||
export const MaticConfig: IMaticConfiguration = {
|
export const MaticConfig: IMaticConfiguration = {
|
||||||
...CommonsConfig,
|
...CommonsConfig,
|
||||||
MarketId: 'Matic Market',
|
MarketId: 'Matic Market',
|
||||||
ProviderId: 3, // Unknown?
|
ProviderId: 3, // Unknown?
|
||||||
ReservesConfig: {
|
ReservesConfig: {
|
||||||
DAI: strategyDAI,
|
DAI: strategyDAI,
|
||||||
USDC: strategyUSDC,
|
USDC: strategyUSDC,
|
||||||
|
@ -26,6 +26,7 @@ export const MaticConfig: IMaticConfiguration = {
|
||||||
WBTC: strategyWBTC,
|
WBTC: strategyWBTC,
|
||||||
WETH: strategyWETH,
|
WETH: strategyWETH,
|
||||||
WMATIC: strategyMATIC,
|
WMATIC: strategyMATIC,
|
||||||
|
AAVE: strategyAAVE,
|
||||||
},
|
},
|
||||||
ReserveAssets: {
|
ReserveAssets: {
|
||||||
[ePolygonNetwork.matic]: {
|
[ePolygonNetwork.matic]: {
|
||||||
|
@ -35,8 +36,10 @@ export const MaticConfig: IMaticConfiguration = {
|
||||||
WBTC: '0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6',
|
WBTC: '0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6',
|
||||||
WETH: '0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619',
|
WETH: '0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619',
|
||||||
WMATIC: '0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270',
|
WMATIC: '0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270',
|
||||||
|
AAVE: '0xD6DF932A45C0f255f85145f286eA0b292B21C90B',
|
||||||
},
|
},
|
||||||
[ePolygonNetwork.mumbai]: { // Mock tokens with a simple "mint" external function, except wmatic
|
[ePolygonNetwork.mumbai]: {
|
||||||
|
// Mock tokens with a simple "mint" external function, except wmatic
|
||||||
DAI: '0x13b3fda609C1eeb23b4F4b69257840760dCa6C4a',
|
DAI: '0x13b3fda609C1eeb23b4F4b69257840760dCa6C4a',
|
||||||
USDC: '0x52b63223994433FdE2F1350Ba69Dfd2779f06ABA',
|
USDC: '0x52b63223994433FdE2F1350Ba69Dfd2779f06ABA',
|
||||||
USDT: '0xB3abd1912F586fDFFa13606882c28E27913853d2',
|
USDT: '0xB3abd1912F586fDFFa13606882c28E27913853d2',
|
||||||
|
|
|
@ -1,15 +1,13 @@
|
||||||
// import BigNumber from 'bignumber.js';
|
// import BigNumber from 'bignumber.js';
|
||||||
// import { oneRay } from '../../helpers/constants';
|
// import { oneRay } from '../../helpers/constants';
|
||||||
import { eContractid, IReserveParams } from '../../helpers/types';
|
import { eContractid, IReserveParams } from '../../helpers/types';
|
||||||
import {
|
import {
|
||||||
rateStrategyStableOne,
|
|
||||||
rateStrategyStableTwo,
|
rateStrategyStableTwo,
|
||||||
rateStrategyStableThree,
|
rateStrategyStableThree,
|
||||||
rateStrategyWETH,
|
rateStrategyWETH,
|
||||||
rateStrategyAAVE,
|
rateStrategyAAVE,
|
||||||
rateStrategyVolatileOne,
|
rateStrategyVolatileOne,
|
||||||
rateStrategyVolatileTwo,
|
rateStrategyVolatileTwo,
|
||||||
rateStrategyVolatileThree,
|
|
||||||
} from './rateStrategies';
|
} from './rateStrategies';
|
||||||
|
|
||||||
export const strategyDAI: IReserveParams = {
|
export const strategyDAI: IReserveParams = {
|
||||||
|
@ -21,7 +19,7 @@ export const strategyDAI: IReserveParams = {
|
||||||
stableBorrowRateEnabled: true,
|
stableBorrowRateEnabled: true,
|
||||||
reserveDecimals: '18',
|
reserveDecimals: '18',
|
||||||
aTokenImpl: eContractid.AToken,
|
aTokenImpl: eContractid.AToken,
|
||||||
reserveFactor: '1000'
|
reserveFactor: '1000',
|
||||||
};
|
};
|
||||||
|
|
||||||
export const strategyUSDC: IReserveParams = {
|
export const strategyUSDC: IReserveParams = {
|
||||||
|
@ -33,19 +31,19 @@ export const strategyUSDC: IReserveParams = {
|
||||||
stableBorrowRateEnabled: true,
|
stableBorrowRateEnabled: true,
|
||||||
reserveDecimals: '6',
|
reserveDecimals: '6',
|
||||||
aTokenImpl: eContractid.AToken,
|
aTokenImpl: eContractid.AToken,
|
||||||
reserveFactor: '1000'
|
reserveFactor: '1000',
|
||||||
};
|
};
|
||||||
|
|
||||||
export const strategyUSDT: IReserveParams = {
|
export const strategyUSDT: IReserveParams = {
|
||||||
strategy: rateStrategyStableThree,
|
strategy: rateStrategyStableThree,
|
||||||
baseLTVAsCollateral: '8000',
|
baseLTVAsCollateral: '8000',
|
||||||
liquidationThreshold: '8500',
|
liquidationThreshold: '8500',
|
||||||
liquidationBonus: '10500',
|
liquidationBonus: '10500',
|
||||||
borrowingEnabled: true,
|
borrowingEnabled: true,
|
||||||
stableBorrowRateEnabled: true,
|
stableBorrowRateEnabled: true,
|
||||||
reserveDecimals: '6',
|
reserveDecimals: '6',
|
||||||
aTokenImpl: eContractid.AToken,
|
aTokenImpl: eContractid.AToken,
|
||||||
reserveFactor: '1000'
|
reserveFactor: '1000',
|
||||||
};
|
};
|
||||||
|
|
||||||
export const strategyWETH: IReserveParams = {
|
export const strategyWETH: IReserveParams = {
|
||||||
|
@ -57,7 +55,7 @@ export const strategyWETH: IReserveParams = {
|
||||||
stableBorrowRateEnabled: true,
|
stableBorrowRateEnabled: true,
|
||||||
reserveDecimals: '18',
|
reserveDecimals: '18',
|
||||||
aTokenImpl: eContractid.AToken,
|
aTokenImpl: eContractid.AToken,
|
||||||
reserveFactor: '1000'
|
reserveFactor: '1000',
|
||||||
};
|
};
|
||||||
|
|
||||||
export const strategyWBTC: IReserveParams = {
|
export const strategyWBTC: IReserveParams = {
|
||||||
|
@ -69,11 +67,11 @@ export const strategyWBTC: IReserveParams = {
|
||||||
stableBorrowRateEnabled: true,
|
stableBorrowRateEnabled: true,
|
||||||
reserveDecimals: '8',
|
reserveDecimals: '8',
|
||||||
aTokenImpl: eContractid.AToken,
|
aTokenImpl: eContractid.AToken,
|
||||||
reserveFactor: '2000'
|
reserveFactor: '2000',
|
||||||
};
|
};
|
||||||
|
|
||||||
export const strategyMATIC: IReserveParams = {
|
export const strategyMATIC: IReserveParams = {
|
||||||
strategy: rateStrategyVolatileOne, //Temp?
|
strategy: rateStrategyVolatileOne, //Temp?
|
||||||
baseLTVAsCollateral: '5000',
|
baseLTVAsCollateral: '5000',
|
||||||
liquidationThreshold: '6500',
|
liquidationThreshold: '6500',
|
||||||
liquidationBonus: '11000',
|
liquidationBonus: '11000',
|
||||||
|
@ -81,5 +79,17 @@ export const strategyMATIC: IReserveParams = {
|
||||||
stableBorrowRateEnabled: true,
|
stableBorrowRateEnabled: true,
|
||||||
reserveDecimals: '18',
|
reserveDecimals: '18',
|
||||||
aTokenImpl: eContractid.AToken,
|
aTokenImpl: eContractid.AToken,
|
||||||
reserveFactor: '2000'
|
reserveFactor: '2000',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const strategyAAVE: IReserveParams = {
|
||||||
|
strategy: rateStrategyAAVE,
|
||||||
|
baseLTVAsCollateral: '5000',
|
||||||
|
liquidationThreshold: '6500',
|
||||||
|
liquidationBonus: '11000',
|
||||||
|
borrowingEnabled: false,
|
||||||
|
stableBorrowRateEnabled: false,
|
||||||
|
reserveDecimals: '18',
|
||||||
|
aTokenImpl: eContractid.AToken,
|
||||||
|
reserveFactor: '0',
|
||||||
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user