config: added borrowCap config to matic, amm markets, all default to max borrow cap

This commit is contained in:
Hadrien Charlanes 2021-04-29 10:16:12 +02:00
parent a9fce4dd4b
commit be4fc154ba
2 changed files with 54 additions and 26 deletions

View File

@ -1,3 +1,4 @@
import { MAX_BORROW_CAP } from '../../helpers/constants';
import { eContractid, IReserveParams} from '../../helpers/types'; import { eContractid, IReserveParams} from '../../helpers/types';
import { import {
rateStrategyAmmBase, rateStrategyAmmBase,
@ -15,7 +16,8 @@ export const strategyWETH: IReserveParams = {
stableBorrowRateEnabled: false, stableBorrowRateEnabled: false,
reserveDecimals: '18', reserveDecimals: '18',
aTokenImpl: eContractid.AToken, aTokenImpl: eContractid.AToken,
reserveFactor: '1000' reserveFactor: '1000',
borrowCap: MAX_BORROW_CAP,
}; };
export const strategyWBTC: IReserveParams = { export const strategyWBTC: IReserveParams = {
@ -27,7 +29,8 @@ export const strategyWBTC: IReserveParams = {
stableBorrowRateEnabled: false, stableBorrowRateEnabled: false,
reserveDecimals: '8', reserveDecimals: '8',
aTokenImpl: eContractid.AToken, aTokenImpl: eContractid.AToken,
reserveFactor: '2000' reserveFactor: '2000',
borrowCap: MAX_BORROW_CAP,
}; };
export const strategyDAI: IReserveParams = { export const strategyDAI: IReserveParams = {
@ -39,7 +42,8 @@ export const strategyDAI: IReserveParams = {
stableBorrowRateEnabled: false, stableBorrowRateEnabled: false,
reserveDecimals: '18', reserveDecimals: '18',
aTokenImpl: eContractid.AToken, aTokenImpl: eContractid.AToken,
reserveFactor: '1000' reserveFactor: '1000',
borrowCap: MAX_BORROW_CAP,
}; };
export const strategyUSDC: IReserveParams = { export const strategyUSDC: IReserveParams = {
@ -51,7 +55,8 @@ export const strategyUSDC: IReserveParams = {
stableBorrowRateEnabled: false, stableBorrowRateEnabled: false,
reserveDecimals: '6', reserveDecimals: '6',
aTokenImpl: eContractid.AToken, aTokenImpl: eContractid.AToken,
reserveFactor: '1000' reserveFactor: '1000',
borrowCap: MAX_BORROW_CAP,
}; };
export const strategyUSDT: IReserveParams = { export const strategyUSDT: IReserveParams = {
@ -63,7 +68,8 @@ export const strategyUSDT: IReserveParams = {
stableBorrowRateEnabled: false, stableBorrowRateEnabled: false,
reserveDecimals: '6', reserveDecimals: '6',
aTokenImpl: eContractid.AToken, aTokenImpl: eContractid.AToken,
reserveFactor: '1000' reserveFactor: '1000',
borrowCap: MAX_BORROW_CAP,
}; };
export const strategyDAIWETH: IReserveParams = { export const strategyDAIWETH: IReserveParams = {
@ -75,7 +81,8 @@ export const strategyDAIWETH: IReserveParams = {
stableBorrowRateEnabled: false, stableBorrowRateEnabled: false,
reserveDecimals: '18', reserveDecimals: '18',
aTokenImpl: eContractid.AToken, aTokenImpl: eContractid.AToken,
reserveFactor: '1000' reserveFactor: '1000',
borrowCap: MAX_BORROW_CAP,
}; };
export const strategyWBTCWETH: IReserveParams = { export const strategyWBTCWETH: IReserveParams = {
@ -87,7 +94,8 @@ export const strategyWBTCWETH: IReserveParams = {
stableBorrowRateEnabled: false, stableBorrowRateEnabled: false,
reserveDecimals: '18', reserveDecimals: '18',
aTokenImpl: eContractid.AToken, aTokenImpl: eContractid.AToken,
reserveFactor: '1500' reserveFactor: '1500',
borrowCap: MAX_BORROW_CAP,
}; };
export const strategyAAVEWETH: IReserveParams = { export const strategyAAVEWETH: IReserveParams = {
@ -99,7 +107,8 @@ export const strategyAAVEWETH: IReserveParams = {
stableBorrowRateEnabled: false, stableBorrowRateEnabled: false,
reserveDecimals: '18', reserveDecimals: '18',
aTokenImpl: eContractid.AToken, aTokenImpl: eContractid.AToken,
reserveFactor: '500' reserveFactor: '500',
borrowCap: MAX_BORROW_CAP,
}; };
export const strategyBATWETH: IReserveParams = { export const strategyBATWETH: IReserveParams = {
@ -111,7 +120,8 @@ export const strategyBATWETH: IReserveParams = {
stableBorrowRateEnabled: false, stableBorrowRateEnabled: false,
reserveDecimals: '18', reserveDecimals: '18',
aTokenImpl: eContractid.AToken, aTokenImpl: eContractid.AToken,
reserveFactor: '1500' reserveFactor: '1500',
borrowCap: MAX_BORROW_CAP,
}; };
export const strategyDAIUSDC: IReserveParams = { export const strategyDAIUSDC: IReserveParams = {
@ -123,7 +133,8 @@ export const strategyDAIUSDC: IReserveParams = {
stableBorrowRateEnabled: false, stableBorrowRateEnabled: false,
reserveDecimals: '18', reserveDecimals: '18',
aTokenImpl: eContractid.AToken, aTokenImpl: eContractid.AToken,
reserveFactor: '1000' reserveFactor: '1000',
borrowCap: MAX_BORROW_CAP,
}; };
export const strategyCRVWETH: IReserveParams = { export const strategyCRVWETH: IReserveParams = {
@ -135,7 +146,8 @@ export const strategyCRVWETH: IReserveParams = {
stableBorrowRateEnabled: false, stableBorrowRateEnabled: false,
reserveDecimals: '18', reserveDecimals: '18',
aTokenImpl: eContractid.AToken, aTokenImpl: eContractid.AToken,
reserveFactor: '1500' reserveFactor: '1500',
borrowCap: MAX_BORROW_CAP,
}; };
export const strategyLINKWETH: IReserveParams = { export const strategyLINKWETH: IReserveParams = {
@ -147,7 +159,8 @@ export const strategyLINKWETH: IReserveParams = {
stableBorrowRateEnabled: false, stableBorrowRateEnabled: false,
reserveDecimals: '18', reserveDecimals: '18',
aTokenImpl: eContractid.AToken, aTokenImpl: eContractid.AToken,
reserveFactor: '1500' reserveFactor: '1500',
borrowCap: MAX_BORROW_CAP,
}; };
export const strategyMKRWETH: IReserveParams = { export const strategyMKRWETH: IReserveParams = {
@ -159,7 +172,8 @@ export const strategyMKRWETH: IReserveParams = {
stableBorrowRateEnabled: false, stableBorrowRateEnabled: false,
reserveDecimals: '18', reserveDecimals: '18',
aTokenImpl: eContractid.AToken, aTokenImpl: eContractid.AToken,
reserveFactor: '1500' reserveFactor: '1500',
borrowCap: MAX_BORROW_CAP,
}; };
export const strategyRENWETH: IReserveParams = { export const strategyRENWETH: IReserveParams = {
@ -171,7 +185,8 @@ export const strategyRENWETH: IReserveParams = {
stableBorrowRateEnabled: false, stableBorrowRateEnabled: false,
reserveDecimals: '18', reserveDecimals: '18',
aTokenImpl: eContractid.AToken, aTokenImpl: eContractid.AToken,
reserveFactor: '1500' reserveFactor: '1500',
borrowCap: MAX_BORROW_CAP,
}; };
export const strategySNXWETH: IReserveParams = { export const strategySNXWETH: IReserveParams = {
@ -183,7 +198,8 @@ export const strategySNXWETH: IReserveParams = {
stableBorrowRateEnabled: false, stableBorrowRateEnabled: false,
reserveDecimals: '18', reserveDecimals: '18',
aTokenImpl: eContractid.AToken, aTokenImpl: eContractid.AToken,
reserveFactor: '2000' reserveFactor: '2000',
borrowCap: MAX_BORROW_CAP,
}; };
export const strategyUNIWETH: IReserveParams = { export const strategyUNIWETH: IReserveParams = {
@ -195,7 +211,8 @@ export const strategyUNIWETH: IReserveParams = {
stableBorrowRateEnabled: false, stableBorrowRateEnabled: false,
reserveDecimals: '18', reserveDecimals: '18',
aTokenImpl: eContractid.AToken, aTokenImpl: eContractid.AToken,
reserveFactor: '1500' reserveFactor: '1500',
borrowCap: MAX_BORROW_CAP,
}; };
export const strategyUSDCWETH: IReserveParams = { export const strategyUSDCWETH: IReserveParams = {
@ -207,7 +224,8 @@ export const strategyUSDCWETH: IReserveParams = {
stableBorrowRateEnabled: false, stableBorrowRateEnabled: false,
reserveDecimals: '18', reserveDecimals: '18',
aTokenImpl: eContractid.AToken, aTokenImpl: eContractid.AToken,
reserveFactor: '1000' reserveFactor: '1000',
borrowCap: MAX_BORROW_CAP,
}; };
export const strategyWBTCUSDC: IReserveParams = { export const strategyWBTCUSDC: IReserveParams = {
@ -219,7 +237,8 @@ export const strategyWBTCUSDC: IReserveParams = {
stableBorrowRateEnabled: false, stableBorrowRateEnabled: false,
reserveDecimals: '18', reserveDecimals: '18',
aTokenImpl: eContractid.AToken, aTokenImpl: eContractid.AToken,
reserveFactor: '1500' reserveFactor: '1500',
borrowCap: MAX_BORROW_CAP,
}; };
export const strategyYFIWETH: IReserveParams = { export const strategyYFIWETH: IReserveParams = {
@ -231,7 +250,8 @@ export const strategyYFIWETH: IReserveParams = {
stableBorrowRateEnabled: false, stableBorrowRateEnabled: false,
reserveDecimals: '18', reserveDecimals: '18',
aTokenImpl: eContractid.AToken, aTokenImpl: eContractid.AToken,
reserveFactor: '1500' reserveFactor: '1500',
borrowCap: MAX_BORROW_CAP,
}; };
export const strategyBALWETH: IReserveParams = { export const strategyBALWETH: IReserveParams = {
@ -243,5 +263,6 @@ export const strategyBALWETH: IReserveParams = {
stableBorrowRateEnabled: false, stableBorrowRateEnabled: false,
reserveDecimals: '18', reserveDecimals: '18',
aTokenImpl: eContractid.AToken, aTokenImpl: eContractid.AToken,
reserveFactor: '1500' reserveFactor: '1500',
borrowCap: MAX_BORROW_CAP,
} }

View File

@ -1,5 +1,6 @@
// import BigNumber from 'bignumber.js'; // import BigNumber from 'bignumber.js';
// import { oneRay } from '../../helpers/constants'; // import { oneRay } from '../../helpers/constants';
import { MAX_BORROW_CAP } from '../../helpers/constants';
import { eContractid, IReserveParams } from '../../helpers/types'; import { eContractid, IReserveParams } from '../../helpers/types';
import { import {
rateStrategyStableOne, rateStrategyStableOne,
@ -21,7 +22,8 @@ export const strategyDAI: IReserveParams = {
stableBorrowRateEnabled: true, stableBorrowRateEnabled: true,
reserveDecimals: '18', reserveDecimals: '18',
aTokenImpl: eContractid.AToken, aTokenImpl: eContractid.AToken,
reserveFactor: '1000' reserveFactor: '1000',
borrowCap: MAX_BORROW_CAP,
}; };
export const strategyUSDC: IReserveParams = { export const strategyUSDC: IReserveParams = {
@ -33,7 +35,8 @@ export const strategyUSDC: IReserveParams = {
stableBorrowRateEnabled: true, stableBorrowRateEnabled: true,
reserveDecimals: '6', reserveDecimals: '6',
aTokenImpl: eContractid.AToken, aTokenImpl: eContractid.AToken,
reserveFactor: '1000' reserveFactor: '1000',
borrowCap: MAX_BORROW_CAP,
}; };
export const strategyUSDT: IReserveParams = { export const strategyUSDT: IReserveParams = {
@ -45,7 +48,8 @@ export const strategyUSDT: IReserveParams = {
stableBorrowRateEnabled: true, stableBorrowRateEnabled: true,
reserveDecimals: '6', reserveDecimals: '6',
aTokenImpl: eContractid.AToken, aTokenImpl: eContractid.AToken,
reserveFactor: '1000' reserveFactor: '1000',
borrowCap: MAX_BORROW_CAP,
}; };
export const strategyWETH: IReserveParams = { export const strategyWETH: IReserveParams = {
@ -57,7 +61,8 @@ export const strategyWETH: IReserveParams = {
stableBorrowRateEnabled: true, stableBorrowRateEnabled: true,
reserveDecimals: '18', reserveDecimals: '18',
aTokenImpl: eContractid.AToken, aTokenImpl: eContractid.AToken,
reserveFactor: '1000' reserveFactor: '1000',
borrowCap: MAX_BORROW_CAP,
}; };
export const strategyWBTC: IReserveParams = { export const strategyWBTC: IReserveParams = {
@ -69,7 +74,8 @@ export const strategyWBTC: IReserveParams = {
stableBorrowRateEnabled: true, stableBorrowRateEnabled: true,
reserveDecimals: '8', reserveDecimals: '8',
aTokenImpl: eContractid.AToken, aTokenImpl: eContractid.AToken,
reserveFactor: '2000' reserveFactor: '2000',
borrowCap: MAX_BORROW_CAP,
}; };
export const strategyMATIC: IReserveParams = { export const strategyMATIC: IReserveParams = {
@ -81,5 +87,6 @@ export const strategyMATIC: IReserveParams = {
stableBorrowRateEnabled: true, stableBorrowRateEnabled: true,
reserveDecimals: '18', reserveDecimals: '18',
aTokenImpl: eContractid.AToken, aTokenImpl: eContractid.AToken,
reserveFactor: '2000' reserveFactor: '2000',
borrowCap: MAX_BORROW_CAP,
}; };