Submitted by 0x007, also found by Koolex, 0xrugpull_detector, 0xnev, and SaeedAlipoor01988
Theres borrowOpeningFee for markets. In Singularity, this fee is accumulated over assets as a reward to asset depositors. In BigBang, assets is USD0 which would be minted and burned on borrow, and repay respectively. BigBang does not collect fees, because it uses the same mechanism as Singularity and therefore it would demand more than minted amount from user when its time to repay.
This results in a bird and egg situation where Users cant fully repay a borrowed amount unless they borrow even more.
Lets look at how borrow works
As can be seen above, amount would be minted to user, but the userBorrowPart is amount + fee. When its time to repay, user have to return amount + fee in other to get all their collateral.
Assuming the user borrowed 1,000 USD0 and borrowOpeningFee is at the default value of 0.5%. Then the users debt would be 1,005. If theres only 1 user, and the totalSupply is indeed 1,000, then theres no other way for the user to get the extra 5 USD0. Therefore he cant fully redeem his collateral and would have at least 5 * (1 + collateralizationRate) USD0 worth of collateral locked up. This fund cannot be accessed by the user, nor is it used by the protocol. It would be sitting at yieldbox forever earning yields for no one.
This issue becomes more significant when there are more users and minted amount. If more amount is minted more funds are locked.
It might seem like user Alice could go to the market to buy 5 USD0 to fully repay. But the reality is that he is transferring the unfortunate disaster to another user. Cause no matter what, Owed debts would always be higher than totalSupply.
This debt would keep accumulating after each mint and every burn. For example, assuming that one 1 billion of USD0 was minted and 990 million was burned in the first month. totalSupply and hence circulating supply would be 10 million, but user debts would be 15 million USD0. Thats 5 million USD that cant be accessed by user nor fee collector.
borrowOpeningFee should not be added to userBorrowPart. If fee is to implemented, then fee collector should receive collateral or USD0 token.
0xRektora (Tapioca) confirmed via duplicate issue 739
