-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modify DAIInterestRateModel.sol => DAIInterestRateModelV2.sol (#23)
* Modify DAIInterestRateModel.sol => DAIInterestRateModelV2.sol The primary intention behind this change is to "smooth out" the cDai interest rate model to promote greater rate stability. It does so by increasing the `gapPerBlock`, or additional "slope" of the interest rate curve added to the Dai stability fee, from 0.05% to 2%. There are also a few minor changes, designed to clean up the interest rate model contract. Summary of changes: - `gapPerBlock` constant changed from `0.05e16 / blocksPerYear` to `2e16 / blocksPerYear` - `uint` => `uint256` (explicit > implicit) - added parenthesis to SafeMath expressions to make ordering explicit - used an interface (rather than an abstract contract) for the maker interfaces - modified a tiny bit of `poke()` to add `gapPerBlock` to `stabilityFeePerBlock` _before_ subtracting `baseRatePerBlock` for resiliency against a very unlikely underflow - named some unnamed return values * strip out stylistic changes from DAIInterestRateModelV2 * make changes to DAIInterestRateModelV2 as slim as possible
- Loading branch information
Showing
2 changed files
with
23 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters