The redemption amount falls in the gap the debt floor creates (MK-048).
redeemCollateral hands the whole requested amount to the first eligible Trove
(TroveManager.sol:1218-1221). If that would take the Trove's net debt below minNetDebt the
partial is CANCELLED (:1299-1306), the loop breaks (:392), and with nothing drawn the whole
call reverts (:406-408). Consuming the Trove WHOLE takes a different branch (:1252) with no
floor check, so the amounts that work are not an interval:
amount <= maxWithoutConsuming works, a partial inside the headroom
in between REVERTS, which is this error
amount >= nextViableAmount works, the Trove is consumed whole
The blocking condition lives in someone else's position, which is why this is prechecked
rather than left to the revert: a caller cannot see it, cannot cause it, and cannot fix it. The
two numbers on the error are the edges of the gap, so a caller can move to either side.
The redemption amount falls in the gap the debt floor creates (MK-048).
redeemCollateralhands the whole requested amount to the first eligible Trove (TroveManager.sol:1218-1221). If that would take the Trove's net debt belowminNetDebtthe partial is CANCELLED (:1299-1306), the loop breaks (:392), and with nothing drawn the whole call reverts (:406-408). Consuming the Trove WHOLE takes a different branch (:1252) with no floor check, so the amounts that work are not an interval:amount <= maxWithoutConsuming works, a partial inside the headroom in between REVERTS, which is this error amount >= nextViableAmount works, the Trove is consumed whole
The blocking condition lives in someone else's position, which is why this is prechecked rather than left to the revert: a caller cannot see it, cannot cause it, and cannot fix it. The two numbers on the error are the edges of the gap, so a caller can move to either side.