-
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
Conversation
@@ -3552,7 +3552,7 @@ contract("BorrowerOperations", async (accounts) => { | |||
const baseRateBefore = await troveManager.baseRate(); | |||
|
|||
// Artificially make baseRate 5% | |||
await troveManager.setBaseRate(dec(5, 16)); | |||
await troveManager.setBaseRate(dec(6, 16)); |
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.
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 baseRateBefore
, which is now 5%. Should the comment be updated too?
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.
Yes, right!
From what I can tell this sets the initial baseRate to 5% as intended ✅ but doesn't actually enable the redemption fee, which remains hardcoded at 0%. I guess this is intended for now? Also, as this lets the baseRate decay from the start: are we going to revisit the decay rate, or leave it be? Within 4 days it'll naturally decay from 5% to 0.3125%, which is not much of a bootstrap period in my opinion. I know we agreed to let it decay, but I can't remember the reasoning. Wouldn't it be better if the rate stayed at 5% for some period of time, and only started decaying after that? Redemptions would still be allowed at a fee rate of 5%. We could skip the baseRate increase during this bootstrap period so that the price floor doesn't drop below 0.95 if there are redemptions during that time. |
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.
Looks good - though in practice if we want redemption fees for Dubai we need to add those back in.
constructor() ERC721(NAME, SYMBOL) { | ||
// Update the baseRate state variable | ||
// To prevent redemptions unless Bold depegs below 0.95 and allow the system to take off | ||
baseRate = INITIAL_REDEMPTION_RATE; |
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.
Yes, that sounds reasonable. Edit: Worst case we could put a crazily high initial base rate, so that it gets to 5% after the time we want (we should do the math). In practice it would be similar to block redemptions, which was the previous behaviour. |
And remove previous bootsrap 2-week lock for redemptions.
Remove unused constant. Add commen to test.
5ba5c54
to
ac8dc73
Compare
And remove previous bootsrap 2-week lock for redemptions.
Closes #109 .