Liquidation Formula

During liquidation, the amount_of(c) of collateral to be liquidated is expressed with amount_of(d) repaid debt and market rule penalty parameters:
amoutOf(c)=priceOf(d)priceOf(c)amountOf(d)(1+penaltyOf(c)+penaltyOf(d)),\text{amoutOf}(c)=\frac{\text{priceOf}(d)}{\text{priceOf}(c)} \cdot \text{amountOf}(d)\cdot (1+\text{penaltyOf}(c)+\text{penaltyOf}(d)),