Liquidations 1.2 Technical Details

Background

The Liquidations 1.2 upgrade was conceived to mitigate the risk of a very large amount of collateral being sent to auction in a short time, overwhelming Keepers’ DAI liquidity. The high-level reasoning behind this upgrade was explained in the post linked in the previous sentence; this post will focus on the exact technical changes that have been implemented, especially the meaning of new governance parameters. This post is intended for MKR holders who must vote on installing the 1.2 upgrade and govern the system if installed, those who maintain Keepers, and those wishing to integrate with the Maker auction system post-1.2 upgrade.

The final core contract changes to be deployed can be found here. The only on-chain changes are to the Cat and Flipper contracts (found in cat.sol and flip.sol, respectively). Just to be clear, the addresses of the Cat and all Flipper contracts will therefore change post-deployment of 1.2.

Technical Changes

box parameter (Cat contract, global)

This parameter represents a limit on the total DAI needed to cover the debt and penalty fees on all active auctions. In the dss numerical type system, it is a rad (45 decimal digit fixed point value). A variable called litter in the Cat contract is incremented every time an auction is created, and decremented when an auction finishes (i.e. when deal or yank is called for that auction). Whenever box - litter is less than the dust limit (minimum Vault debt), liquidations cannot occur. Liquidations are done in a partial fashion when necessary to ensure that litter never exceeds box.

dunk parameter (Cat contract, per-ilk)

The dunk (“debt chunk”) parameter represents the amount of debt plus penalty fee to be covered in a single auction, assuming the liquidated Vault is large enough and there is a sufficient difference between litter and box. In the dss numerical type system, it is a rad (45 decimal digit fixed point value). It replaces the lump parameter (which previously represented an amount of collateral to be sold in a single auction). Note that due to rounding error, the tab of an active auction will almost never be exactly equal to dunk.

REMOVED: lump parameter

As noted above, the lump parameter has been discarded in favor of the dunk parameter.

chop (liquidation penalty) is now a wad

The chop parameter, which represents the liquidation penalty, has had its numerical type adjusted from ray (27 decimal digits) to wad (18 decimal digits). For example, a 13% penalty fee will be represented by a chop of 1.13 * 10^18 post-1.2 integration. This must be kept in mind by technical teams changing chop, and by anyone with an integration that reads and uses the on-chain chop value. This change mitigates an overflow that set a relatively low upper bound (~ 100K) on the size of dunk.

10 Likes

Hi Kurt! So the parameters for the Box are set by MKR Governance, or is this automated?

Also, can you please define litter = 5 * MLN * RAD – can’t figure out MLN – don’t see in the glossary

Set by governance, for now.

The line you reference is part of a test file, not the code that will be deployed–it’s just setting a value for use in the tests. If you’re still curious MLN is just a constant with value 10^6 (1 MiLlioN), and can be seen defined elsewhere in that file.

2 Likes