-
Notifications
You must be signed in to change notification settings - Fork 413
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
[draft] make bad debt grace period configurable per-Ilk #147
base: master
Are you sure you want to change the base?
Conversation
I know this is still a very early PR, but have 2 suggestions that might make sense:
|
Hi @gbalabasquer, thanks for your attention and suggestions:
Overall, the main disadvantage of this change is the need to deploy a new |
Yes, as you know, replacing the |
@@ -155,7 +157,7 @@ contract Cat is LibNote { | |||
vat.grab( | |||
ilk, urn, address(this), address(vow), -int256(dink), -int256(dart) | |||
); | |||
vow.fess(mul(dart, rate)); | |||
vow.fess(add(now, milk.wait), mul(dart, 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.
Make sure these changes make it into the dog.sol
Vow.wait
exists in order to avoid creating unnecessaryflop
auctions immediately after a position has entered liquidation (creating bad debt), but before theflip
auction has had time to finish and cancel the bad debt. Currently,Vow.wait
has to be configured to apply to debt generated by all collateral types, meaning that it should be set to the maximum running time of anyflip
auction. This is a limitation, since some future collateral types may wish to allow much longer liquidation auction durations than the existing ones, which would forcewait
to be longer, unnecessarily delayingflop
auctions for other collateral types.This PR makes
wait
configurable perIlk
, asVow.ilks(ilk).wait
.TODOs: