aave-protocol-v2/config/reservesConfigs.ts

215 lines
7.5 KiB
TypeScript
Raw Normal View History

2020-11-04 10:47:06 +00:00
import BigNumber from 'bignumber.js';
import {oneRay} from '../helpers/constants';
import {IReserveParams} from '../helpers/types';
export const strategyBase: IReserveParams = {
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.07).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(3).multipliedBy(oneRay).toFixed(),
stableRateSlope1: new BigNumber(0.1).multipliedBy(oneRay).toFixed(),
stableRateSlope2: new BigNumber(3).multipliedBy(oneRay).toFixed(),
baseLTVAsCollateral: '6000',
liquidationThreshold: '6500',
liquidationBonus: '11000',
borrowingEnabled: true,
stableBorrowRateEnabled: true,
reserveDecimals: '18',
};
2020-11-09 09:05:03 +00:00
export const stablecoinStrategyBase: IReserveParams = {
2020-11-04 10:47:06 +00:00
baseVariableBorrowRate: new BigNumber(0.01).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.07).multipliedBy(oneRay).toFixed(),
2020-11-09 09:05:03 +00:00
variableRateSlope2: new BigNumber(1.5).multipliedBy(oneRay).toFixed(),
2020-11-04 10:47:06 +00:00
stableRateSlope1: new BigNumber(0.06).multipliedBy(oneRay).toFixed(),
2020-11-09 09:05:03 +00:00
stableRateSlope2: new BigNumber(1.5).multipliedBy(oneRay).toFixed(),
2020-11-04 10:47:06 +00:00
baseLTVAsCollateral: '7500',
liquidationThreshold: '8000',
liquidationBonus: '10500',
borrowingEnabled: true,
stableBorrowRateEnabled: true,
2020-11-09 09:05:03 +00:00
reserveDecimals: '18',
2020-11-04 10:47:06 +00:00
};
2020-11-09 09:05:03 +00:00
export const stablecoinStrategyCentralized: IReserveParams = {
2020-11-04 10:47:06 +00:00
baseVariableBorrowRate: new BigNumber(0.01).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.07).multipliedBy(oneRay).toFixed(),
2020-11-09 09:05:03 +00:00
variableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
2020-11-04 10:47:06 +00:00
stableRateSlope1: new BigNumber(0.06).multipliedBy(oneRay).toFixed(),
2020-11-09 09:05:03 +00:00
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
2020-11-04 10:47:06 +00:00
baseLTVAsCollateral: '7500',
liquidationThreshold: '8000',
liquidationBonus: '10500',
borrowingEnabled: true,
stableBorrowRateEnabled: true,
2020-11-09 09:05:03 +00:00
reserveDecimals: '6',
2020-11-04 10:47:06 +00:00
};
2020-11-09 09:05:03 +00:00
export const strategyGovernanceTokens: IReserveParams = {
...strategyBase,
baseLTVAsCollateral: '4000',
liquidationBonus: '11500',
2020-11-04 10:47:06 +00:00
};
export const stablecoinStrategyBUSD: IReserveParams = {
...stablecoinStrategyCentralized,
reserveDecimals: '18',
baseLTVAsCollateral: '-1',
liquidationThreshold: '0',
liquidationBonus: '0',
baseVariableBorrowRate: new BigNumber(0.01).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.04).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(0.5).multipliedBy(oneRay).toFixed(),
stableBorrowRateEnabled: false,
stableRateSlope1: new BigNumber(0.14).multipliedBy(oneRay).toFixed(),
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
};
export const strategyAAVE: IReserveParams = {
...strategyBase,
baseLTVAsCollateral: '5000',
liquidationThreshold: '6500',
liquidationBonus: '11000',
borrowingEnabled: false,
stableBorrowRateEnabled: false,
reserveDecimals: '18',
};
2020-11-09 09:05:03 +00:00
export const stablecoinStrategyDAI: IReserveParams = {
...stablecoinStrategyBase,
};
export const strategyENJ: IReserveParams = {
...strategyBase,
baseLTVAsCollateral: '5500',
stableBorrowRateEnabled: false,
};
export const strategyKNC: IReserveParams = {
...strategyBase,
2020-11-04 10:47:06 +00:00
variableRateSlope1: new BigNumber(0.08).multipliedBy(oneRay).toFixed(),
};
export const strategyLINK: IReserveParams = {
...strategyBase,
baseLTVAsCollateral: '6500',
liquidationThreshold: '7000',
};
2020-11-09 09:05:03 +00:00
export const strategyMANA: IReserveParams = {
...strategyBase,
2020-11-04 10:47:06 +00:00
variableRateSlope1: new BigNumber(0.08).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(0.5).multipliedBy(oneRay).toFixed(),
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
};
2020-11-09 09:05:03 +00:00
export const strategyMKR: IReserveParams = {
2020-11-04 10:47:06 +00:00
...strategyBase,
2020-11-09 09:05:03 +00:00
baseLTVAsCollateral: '3500',
};
export const strategyREN: IReserveParams = {
...strategyBase,
baseLTVAsCollateral: '5000',
liquidationThreshold: '6500',
liquidationBonus: '11000',
borrowingEnabled: true,
stableBorrowRateEnabled: false,
2020-11-04 10:47:06 +00:00
};
export const strategyREP: IReserveParams = {
...strategyBase,
baseLTVAsCollateral: '3500',
variableRateSlope1: new BigNumber(0.07).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(3).multipliedBy(oneRay).toFixed(),
borrowingEnabled: false,
};
2020-11-09 09:05:03 +00:00
export const stablecoinStrategySUSD: IReserveParams = {
baseVariableBorrowRate: new BigNumber(0.01).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.04).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(1).multipliedBy(oneRay).toFixed(),
stableRateSlope1: new BigNumber(0.14).multipliedBy(oneRay).toFixed(),
2020-11-04 10:47:06 +00:00
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
2020-11-09 09:05:03 +00:00
baseLTVAsCollateral: '-1',
liquidationThreshold: '0',
liquidationBonus: '0',
borrowingEnabled: false,
stableBorrowRateEnabled: false,
2020-11-11 10:22:56 +00:00
reserveDecimals: '6',
2020-11-04 10:47:06 +00:00
};
export const strategySNX: IReserveParams = {
...strategyBase,
baseLTVAsCollateral: '1500',
liquidationThreshold: '4000',
baseVariableBorrowRate: new BigNumber(0.03).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.12).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(1).multipliedBy(oneRay).toFixed(),
stableBorrowRateEnabled: false,
};
2020-11-09 09:05:03 +00:00
export const stablecoinStrategyTUSD: IReserveParams = {
...stablecoinStrategyCentralized,
baseVariableBorrowRate: new BigNumber(0.01).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.04).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(1.5).multipliedBy(oneRay).toFixed(),
stableRateSlope1: new BigNumber(0.14).multipliedBy(oneRay).toFixed(),
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
borrowingEnabled: true,
2020-11-04 10:47:06 +00:00
stableBorrowRateEnabled: false,
2020-11-09 09:05:03 +00:00
reserveDecimals: '18',
2020-11-04 10:47:06 +00:00
};
2020-11-09 09:05:03 +00:00
export const strategyUNI: IReserveParams = {
...strategyGovernanceTokens,
2020-11-04 10:47:06 +00:00
stableBorrowRateEnabled: false,
};
2020-11-09 09:05:03 +00:00
export const stablecoinStrategyUSDC: IReserveParams = {
...stablecoinStrategyBase,
variableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
reserveDecimals: '6',
};
export const stablecoinStrategyUSDT: IReserveParams = {
...stablecoinStrategyBase,
baseLTVAsCollateral: '-1',
liquidationThreshold: '7000',
liquidationBonus: '0',
borrowingEnabled: false,
stableBorrowRateEnabled: true,
reserveDecimals: '6',
};
export const strategyWBTC: IReserveParams = {
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.08).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(0.5).multipliedBy(oneRay).toFixed(),
stableRateSlope1: new BigNumber(0.1).multipliedBy(oneRay).toFixed(),
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
baseLTVAsCollateral: '6000',
liquidationThreshold: '6500',
2020-11-04 10:47:06 +00:00
liquidationBonus: '11500',
2020-11-09 09:05:03 +00:00
borrowingEnabled: true,
stableBorrowRateEnabled: true,
reserveDecimals: '8',
2020-11-04 10:47:06 +00:00
};
2020-11-09 09:05:03 +00:00
export const strategyWETH: IReserveParams = {
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.08).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(1).multipliedBy(oneRay).toFixed(),
stableRateSlope1: new BigNumber(0.1).multipliedBy(oneRay).toFixed(),
stableRateSlope2: new BigNumber(1).multipliedBy(oneRay).toFixed(),
baseLTVAsCollateral: '7500',
liquidationThreshold: '8000',
liquidationBonus: '10500',
borrowingEnabled: true,
stableBorrowRateEnabled: true,
reserveDecimals: '18',
2020-11-04 10:47:06 +00:00
};
2020-11-09 09:05:03 +00:00
export const strategyYFI: IReserveParams = {
2020-11-04 10:47:06 +00:00
...strategyGovernanceTokens,
};