When I implemented, redeem, deposit, and mintDsc in my invariant test (around video 22 of the section), my redeemCollateral handler started to break because of a health factor < 1.
Did anyone else experience this? I didn't see any similar issues reported, so I may have missed an aspect of the tutorial (I double-checked my code with this repo, and all seems correct from what I checked so far).
However, the code below fixed the issue by avoiding calls to redeem that would redeem too much collateral—lowering the HF below 1.
If this is a valid bug, please let me know, and I'd be happy to open a PR.
When I implemented, redeem, deposit, and mintDsc in my invariant test (around video 22 of the section), my
redeemCollateral
handler started to break because of a health factor < 1.Did anyone else experience this? I didn't see any similar issues reported, so I may have missed an aspect of the tutorial (I double-checked my code with this repo, and all seems correct from what I checked so far).
However, the code below fixed the issue by avoiding calls to redeem that would redeem too much collateral—lowering the HF below 1.
If this is a valid bug, please let me know, and I'd be happy to open a PR.
Here are my logs before the fix: