Gearbox-protocol / core-v3

Other
28 stars 4 forks source link

fix: quota min value fixed to proper formula #166

Closed 0xmikko closed 10 months ago

0xmikko commented 10 months ago

Change: fix previous mistake, when during collateral computation, it uses formula: weightedValueUSD = Math.min(valueUSD, quotaUSD) * liquidationThreshold / PERCENTAGE_FACTOR;

This approach is too risky: in case of downgrading LT, many users who have enough collateral in quoted token (for example x2 of debt size) could be liquidated - they could not take extra quotas from PQK if limit is reached.

So, in this case, lowering LT could be a problem because many users who have high hf could be liquidated without any reason.

github-actions[bot] commented 10 months ago

:tada: This PR is included in version 1.45.7 :tada:

The release is available on:

Your semantic-release bot :package::rocket: