Submitted by jonah1005, also found by WatchPug
Its similar to the issue misuse amount as increasing debt in the vault contract.
Similar issue in a different place that leads to different exploit patterns and severity.
When users borrow usdm from a vault, the debt increases by the amount * 1.005.
However, when the contract records the total debt it uses _amount instead of increasingDebt.
MochiVault.sol L242-L249
The contracts debt is inconsistent with the total sum of all users debt. The bias increases overtime and would break the vault at the end.
For simplicity, we assume theres only one user in the vault.
Example:
inaccurate accounting would lead to serious issues. I consider this a high-risk issue.
This is a web3.py script that a liquidation may fail.
I believe this is a mistake. Recommend to check the contract to make sure increasingDebt is used consistently.
