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 0ed3f84 commit e198e90Copy full SHA for e198e90
contracts/Controller.vy
@@ -160,7 +160,6 @@ def __init__(
160
COLLATERAL_PRECISION = pow_mod256(10, 18 - collateral_decimals)
161
162
BORROWED_TOKEN = _borrowed_token
163
- # TODO refactor this logic to be shared with view
164
borrowed_decimals: uint256 = convert(staticcall BORROWED_TOKEN.decimals(), uint256)
165
BORROWED_PRECISION = pow_mod256(10, 18 - borrowed_decimals)
166
@@ -1173,7 +1172,7 @@ def liquidate(
1173
1172
), "Not enough rekt"
1174
1175
final_debt: uint256 = debt
1176
- # TODO shouldn't clamp max
+ assert _frac <= WAD, "frac>100%"
1177
frac: uint256 = min(_frac, WAD)
1178
debt = unsafe_div(debt * frac + (WAD - 1), WAD)
1179
assert debt > 0
0 commit comments