Skip to content

Commit

Permalink
fix: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Valeri committed Aug 2, 2021
1 parent 650f771 commit 6c787df
Show file tree
Hide file tree
Showing 26 changed files with 257 additions and 301 deletions.
42 changes: 19 additions & 23 deletions markets/aave/rateStrategies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { IInterestRateStrategyParams } from '../../helpers/types';

// BUSD SUSD
export const rateStrategyStableOne: IInterestRateStrategyParams = {
name: "rateStrategyStableOne",
name: 'rateStrategyStableOne',
optimalUtilizationRate: new BigNumber(0.8).multipliedBy(oneRay).toFixed(),
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.04).multipliedBy(oneRay).toFixed(),
Expand All @@ -15,91 +15,87 @@ export const rateStrategyStableOne: IInterestRateStrategyParams = {

// DAI TUSD
export const rateStrategyStableTwo: IInterestRateStrategyParams = {
name: "rateStrategyStableTwo",
name: 'rateStrategyStableTwo',
optimalUtilizationRate: new BigNumber(0.8).multipliedBy(oneRay).toFixed(),
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.04).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(0.75).multipliedBy(oneRay).toFixed(),
stableRateSlope1: new BigNumber(0.02).multipliedBy(oneRay).toFixed(),
stableRateSlope2: new BigNumber(0.75).multipliedBy(oneRay).toFixed(),
}
};

// USDC USDT
export const rateStrategyStableThree: IInterestRateStrategyParams = {
name: "rateStrategyStableThree",
name: 'rateStrategyStableThree',
optimalUtilizationRate: new BigNumber(0.9).multipliedBy(oneRay).toFixed(),
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.04).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(0.60).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
stableRateSlope1: new BigNumber(0.02).multipliedBy(oneRay).toFixed(),
stableRateSlope2: new BigNumber(0.60).multipliedBy(oneRay).toFixed(),
}
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
};

// WETH
export const rateStrategyWETH: IInterestRateStrategyParams = {
name: "rateStrategyWETH",
name: 'rateStrategyWETH',
optimalUtilizationRate: new BigNumber(0.65).multipliedBy(oneRay).toFixed(),
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(),
}
};

// AAVE
export const rateStrategyAAVE: IInterestRateStrategyParams = {
name: "rateStrategyAAVE",
name: 'rateStrategyAAVE',
optimalUtilizationRate: new BigNumber(0.45).multipliedBy(oneRay).toFixed(),
baseVariableBorrowRate: '0',
variableRateSlope1: '0',
variableRateSlope2: '0',
stableRateSlope1: '0',
stableRateSlope2: '0',
}
};

// BAT ENJ LINK MANA MKR REN YFI ZRX
export const rateStrategyVolatileOne: IInterestRateStrategyParams = {
name: "rateStrategyVolatileOne",
name: 'rateStrategyVolatileOne',
optimalUtilizationRate: new BigNumber(0.45).multipliedBy(oneRay).toFixed(),
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(),
}
};

// KNC WBTC
export const rateStrategyVolatileTwo: IInterestRateStrategyParams = {
name: "rateStrategyVolatileTwo",
name: 'rateStrategyVolatileTwo',
optimalUtilizationRate: new BigNumber(0.65).multipliedBy(oneRay).toFixed(),
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.08).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(),
}
};

// SNX
export const rateStrategyVolatileThree: IInterestRateStrategyParams = {
name: "rateStrategyVolatileThree",
name: 'rateStrategyVolatileThree',
optimalUtilizationRate: new BigNumber(0.65).multipliedBy(oneRay).toFixed(),
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.08).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(),
}

};

export const rateStrategyVolatileFour: IInterestRateStrategyParams = {
name: "rateStrategyVolatileFour",
name: 'rateStrategyVolatileFour',
optimalUtilizationRate: new BigNumber(0.45).multipliedBy(oneRay).toFixed(),
baseVariableBorrowRate: '0',
variableRateSlope1: new BigNumber(0.07).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(3).multipliedBy(oneRay).toFixed(),
stableRateSlope1: '0',
stableRateSlope2: '0',
}



};
21 changes: 0 additions & 21 deletions markets/aave/reservesConfigs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export const strategyBUSD: IReserveParams = {
reserveFactor: '1000',
borrowCap: '0',
supplyCap: '0',

};

export const strategyDAI: IReserveParams = {
Expand All @@ -39,7 +38,6 @@ export const strategyDAI: IReserveParams = {
reserveFactor: '1000',
borrowCap: '0',
supplyCap: '0',

};

export const strategySUSD: IReserveParams = {
Expand All @@ -54,7 +52,6 @@ export const strategySUSD: IReserveParams = {
reserveFactor: '2000',
borrowCap: '0',
supplyCap: '0',

};

export const strategyTUSD: IReserveParams = {
Expand All @@ -69,7 +66,6 @@ export const strategyTUSD: IReserveParams = {
reserveFactor: '1000',
borrowCap: '0',
supplyCap: '0',

};

export const strategyUSDC: IReserveParams = {
Expand All @@ -84,7 +80,6 @@ export const strategyUSDC: IReserveParams = {
reserveFactor: '1000',
borrowCap: '0',
supplyCap: '0',

};

export const strategyUSDT: IReserveParams = {
Expand All @@ -99,7 +94,6 @@ export const strategyUSDT: IReserveParams = {
reserveFactor: '1000',
borrowCap: '0',
supplyCap: '0',

};

export const strategyAAVE: IReserveParams = {
Expand All @@ -114,7 +108,6 @@ export const strategyAAVE: IReserveParams = {
reserveFactor: '0',
borrowCap: '0',
supplyCap: '0',

};

export const strategyBAT: IReserveParams = {
Expand All @@ -129,7 +122,6 @@ export const strategyBAT: IReserveParams = {
reserveFactor: '2000',
borrowCap: '0',
supplyCap: '0',

};

export const strategyENJ: IReserveParams = {
Expand All @@ -144,7 +136,6 @@ export const strategyENJ: IReserveParams = {
reserveFactor: '2000',
borrowCap: '0',
supplyCap: '0',

};

export const strategyWETH: IReserveParams = {
Expand All @@ -159,7 +150,6 @@ export const strategyWETH: IReserveParams = {
reserveFactor: '1000',
borrowCap: '0',
supplyCap: '0',

};

export const strategyKNC: IReserveParams = {
Expand All @@ -174,7 +164,6 @@ export const strategyKNC: IReserveParams = {
reserveFactor: '2000',
borrowCap: '0',
supplyCap: '0',

};

export const strategyLINK: IReserveParams = {
Expand All @@ -189,7 +178,6 @@ export const strategyLINK: IReserveParams = {
reserveFactor: '2000',
borrowCap: '0',
supplyCap: '0',

};

export const strategyMANA: IReserveParams = {
Expand All @@ -204,7 +192,6 @@ export const strategyMANA: IReserveParams = {
reserveFactor: '3500',
borrowCap: '0',
supplyCap: '0',

};

export const strategyMKR: IReserveParams = {
Expand All @@ -219,7 +206,6 @@ export const strategyMKR: IReserveParams = {
reserveFactor: '2000',
borrowCap: '0',
supplyCap: '0',

};

export const strategyREN: IReserveParams = {
Expand All @@ -234,7 +220,6 @@ export const strategyREN: IReserveParams = {
reserveFactor: '2000',
borrowCap: '0',
supplyCap: '0',

};

export const strategySNX: IReserveParams = {
Expand All @@ -249,7 +234,6 @@ export const strategySNX: IReserveParams = {
reserveFactor: '3500',
borrowCap: '0',
supplyCap: '0',

};

// Invalid borrow rates in params currently, replaced with snx params
Expand All @@ -265,7 +249,6 @@ export const strategyUNI: IReserveParams = {
reserveFactor: '2000',
borrowCap: '0',
supplyCap: '0',

};

export const strategyWBTC: IReserveParams = {
Expand All @@ -280,7 +263,6 @@ export const strategyWBTC: IReserveParams = {
reserveFactor: '2000',
borrowCap: '0',
supplyCap: '0',

};

export const strategyYFI: IReserveParams = {
Expand All @@ -295,7 +277,6 @@ export const strategyYFI: IReserveParams = {
reserveFactor: '2000',
borrowCap: '0',
supplyCap: '0',

};

export const strategyZRX: IReserveParams = {
Expand All @@ -310,7 +291,6 @@ export const strategyZRX: IReserveParams = {
reserveFactor: '2000',
borrowCap: '0',
supplyCap: '0',

};

export const strategyXSUSHI: IReserveParams = {
Expand All @@ -325,5 +305,4 @@ export const strategyXSUSHI: IReserveParams = {
reserveFactor: '3500',
borrowCap: '0',
supplyCap: '0',

};
3 changes: 1 addition & 2 deletions markets/amm/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ export const AmmConfig: IAmmConfiguration = {
BptWBTCWETH: '0x110569E3261bC0934dA637b019f6f1b6F50ec574',
BptBALWETH: '0xad01D8e0Fa9EAA8Fe76dA30CFb1BCe12707aE6c5',
},
[eEthereumNetwork.ropsten]: {
},
[eEthereumNetwork.ropsten]: {},
[eEthereumNetwork.main]: {
DAI: '0x6B175474E89094C44Da98b954EedeAC495271d0F',
USDC: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
Expand Down
48 changes: 24 additions & 24 deletions markets/amm/rateStrategies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,33 @@ import { IInterestRateStrategyParams } from '../../helpers/types';

// DAIWETH WBTCWETH AAVEWETH BATWETH DAIUSDC CRVWETH LINKWETH MKRWETH RENWETH SNXWETH UNIWETH USDCWETH WBTCUSDC YFIWETH
export const rateStrategyAmmBase: IInterestRateStrategyParams = {
name: "rateStrategyAmmBase",
optimalUtilizationRate: new BigNumber(0.45).multipliedBy(oneRay).toFixed(),
baseVariableBorrowRate: new BigNumber(0.03).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.10).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(3.00).multipliedBy(oneRay).toFixed(),
stableRateSlope1: new BigNumber(0.1).multipliedBy(oneRay).toFixed(),
stableRateSlope2: new BigNumber(3).multipliedBy(oneRay).toFixed(),
}
name: 'rateStrategyAmmBase',
optimalUtilizationRate: new BigNumber(0.45).multipliedBy(oneRay).toFixed(),
baseVariableBorrowRate: new BigNumber(0.03).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.1).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(3.0).multipliedBy(oneRay).toFixed(),
stableRateSlope1: new BigNumber(0.1).multipliedBy(oneRay).toFixed(),
stableRateSlope2: new BigNumber(3).multipliedBy(oneRay).toFixed(),
};

// WETH WBTC
export const rateStrategyBaseOne: IInterestRateStrategyParams = {
name: "rateStrategyBaseOne",
optimalUtilizationRate: new BigNumber(0.65).multipliedBy(oneRay).toFixed(),
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(),
}
name: 'rateStrategyBaseOne',
optimalUtilizationRate: new BigNumber(0.65).multipliedBy(oneRay).toFixed(),
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(),
};

// DAI USDC USDT
export const rateStrategyStable: IInterestRateStrategyParams = {
name: "rateStrategyStable",
optimalUtilizationRate: new BigNumber(0.8).multipliedBy(oneRay).toFixed(),
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.04).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(0.75).multipliedBy(oneRay).toFixed(),
stableRateSlope1: new BigNumber(0.02).multipliedBy(oneRay).toFixed(),
stableRateSlope2: new BigNumber(0.60).multipliedBy(oneRay).toFixed(),
}
name: 'rateStrategyStable',
optimalUtilizationRate: new BigNumber(0.8).multipliedBy(oneRay).toFixed(),
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),
variableRateSlope1: new BigNumber(0.04).multipliedBy(oneRay).toFixed(),
variableRateSlope2: new BigNumber(0.75).multipliedBy(oneRay).toFixed(),
stableRateSlope1: new BigNumber(0.02).multipliedBy(oneRay).toFixed(),
stableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
};
Loading

0 comments on commit 6c787df

Please sign in to comment.