Submitted by rvierdiiev.
Position contract allows to interact with positions that are liquidated. Because of that user can loose funds.
When new position is created, the amount of tokens that were supplied as collateral are saved as well.
Later, when the user wants to close position, they will redeem that amount.
If a user wants to add collateral to avoid liquidation or for any other reason, they can call increaseMargin, which will increase their bath token amount that is used as collateral for the position.
In this case, if Position bathToken collateral is liquidated, that means that their debt becomes 0 and if they call closePosition, then the call will revert, as it will need to redeem bathToken amount that the Position contract doesnt control anymore.
So in this case, if the user will call increaseMargin, just after it was liquidated, then the provided collateral will never be possible to withdraw, as closePosition will always revert.
Example:
As a result, the  users 100 USDC is locked and can be used only as collateral for borrowing.
VsCode
Do not allow users to interact with liquidated positions.
daoio (Rubicon) confirmed
