We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b92f8d commit 6f19fe8Copy full SHA for 6f19fe8
contracts/Controller.vy
@@ -1173,7 +1173,7 @@ def liquidate(
1173
1174
final_debt: uint256 = debt
1175
assert _frac <= WAD, "frac>100%"
1176
- debt = unsafe_div(debt * frac + (WAD - 1), WAD)
+ debt = unsafe_div(debt * _frac + (WAD - 1), WAD)
1177
assert debt > 0
1178
final_debt = unsafe_sub(final_debt, debt)
1179
@@ -1183,7 +1183,7 @@ def liquidate(
1183
# where h is health limit.
1184
# This is less than full h discount but more than no discount
1185
xy: uint256[2] = extcall AMM.withdraw(
1186
- user, self._get_f_remove(frac, health_limit)
+ user, self._get_f_remove(_frac, health_limit)
1187
) # [stable, collateral]
1188
1189
# x increase in same block -> price up -> good
0 commit comments