Submitted by Holmgren
A user can borrow DOLA interest-free. This requires the user to precisely manage their collateral. This issue might become especially troublesome if a Market is opened with some stablecoin as the collateral (because price fluctuations would become negligible and carefully managing collateral level would be easy).
This issue is harder to exploit (but not impossible) if gov takes responsibility for forcing replenishment, since gov has a stronger economic incentive than third parties.
If my calculations are correct, with the current gas prices it costs about $5 to call Market.forceReplenish(...). Thus  there is no economic incentive to do so as long as a debtors DBR deficit is worth less than $5/replenishmentIncentive so probably around $100.
This is because replenishing cannot push a users debt under the water (https://github.com/code-423n4/2022-10-inverse/blob/main/src/Market.sol#L567) and a user can repay their debt without having settled the DBR deficit (https://github.com/code-423n4/2022-10-inverse/blob/main/src/Market.sol#L531).
So, assuming the current prices, a user can:
All this is possible with arbitrarily large DBR deficit because due to small collateral surplus at no point was it economical for a third party to forceReplenish() the user. If gov takes responsibility for forceReplenish()ing, the above procedure is still viable although the user has to maintain the collateral surplus at no more than around $5.
Allow replenishing to push the debt under the water and disallow repaying the debt with an outstanding DBR deficit. E.g.:
0xean (judge) commented:
08xmt (Inverse) confirmed and commented:
