-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add initial redemption base rate #110
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3551,8 +3551,8 @@ contract("BorrowerOperations", async (accounts) => { | |
|
||
const baseRateBefore = await troveManager.baseRate(); | ||
|
||
// Artificially make baseRate 5% | ||
await troveManager.setBaseRate(dec(5, 16)); | ||
// Artificially make baseRate 6% (higher than the intital 5%) | ||
await troveManager.setBaseRate(dec(6, 16)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, it wasn't immediately obvious why this had to be changed to 6%, but I guess it's because it has to be higher than There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, right! |
||
await troveManager.setLastFeeOpTimeToNow(); | ||
|
||
assert.isTrue((await troveManager.baseRate()).gt(baseRateBefore)); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since it still decays with the same half-life, in ~4 days it will be down to 0.2%. I wonder if this decrease is too rapid? We may want at least 1-2 weeks for TVL to build up.
Also, we've commented out redemption fees (see
_calcRedemptionRate
) so in practice no redemption fee will be charged until we change that.