Closed mattcushman closed 11 months ago
So the
Loan.thresholdPrice
still contains the unadjusted TP. I don't see any places where it's externally exposed, but the naming is confusing. Maybe it's worth renaming it to something likeunadjustedThresholdPrice
or similar, so it's harder to confuse it with all other things called TP in the code.Same thing about
Liquidation.thresholdPrice
. It's exposed outside inauctionInfo
andauctionStatus
, so the same naming in NatSpec will also confuse integrators.Apart from naming, LGTM
I second Kirill's concern... if we have the same naming convention but have a different equation applied to the value on the back end it is likely we may miss something.
How about renaming these debtToCollateral
or similar?
in neutral price used in kicks
Description
Include the
COLLATERALIZATION_FACTOR
in the computation of the neutral price.Purpose
Resolves observation from Kirill that there are inconsistencies in how threshold price and derived quantities are computed. In particular, the neutral price was still be computed off the "raw" threshold price, meaning debt-to-collateral without the
COLLATERALIZATION_FACTOR
of 1.04 included. This resulted in unintentionally low neutral prices. This commit updates thetoNpTpRatio
to include that factor.Impact
Gas
_kick
: increase of 10K gaskickerInfo
: increase of 400borrowerInfo
: increase of 100 gasTasks