dss
dss copied to clipboard
[draft] make bad debt grace period configurable per-Ilk
Vow.wait
exists in order to avoid creating unnecessary flop
auctions immediately after a position has entered liquidation (creating bad debt), but before the flip
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 any flip
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 force wait
to be longer, unnecessarily delaying flop
auctions for other collateral types.
This PR makes wait
configurable per Ilk
, as Vow.ilks(ilk).wait
.
TODOs:
- adjust tests
I know this is still a very early PR, but have 2 suggestions that might make sense:
-
Keep the
wait
value per collateral in thevow
. That way we might save replacing thecat
. I haven't analysed if keeping the samecat
is something convenient or which implications it might have, but at least the possibility of replacing just thevow
is there (similar analysis should be done forflapper
andflopper
). -
Instead of saving the
tab
in the 2 dimensionsera
andwait
mapping, just save it in one dimension mapping with the addition of both values.
Hi @gbalabasquer, thanks for your attention and suggestions:
-
It seemed better to avoid introducing the concept of
Ilk
s (and per-Ilk
data) in theVow
, seeing as currently theVow
does not concern itself with collateral-specific information. Also, even if we were to store per-Ilk
wait
in theVow
, we would still need a way of referencing whichIlk
thefess
is coming from (to know whichwait
to use), meaning that the interface would change and would require a change in theCat
anyway. -
Good point, I have further simplified
fess
with this idea.
Overall, the main disadvantage of this change is the need to deploy a new Vow
(and new Cat
), which seems unavoidable. I wanted to flag this limitation, so that it can at least be incorporated the next time it is convenient to redeploy the Vow
(if ever).
-
Right, I forgot about having to identify the
ilk
wait time when executingfess
. -
Great.
Yes, as you know, replacing the vow
is a bit complicate process. We made some analysis about it at the moment the flop
stuck auctions happened. We ended up fixing that specific problem with some work around in the flop
. However a more natural fix would be in the vow
.
I guess at some point vow
should be updated with all these improvements.