How do you control the risks of liquidity baking?
It generally is a self-stabilizing system where arbitrageurs can easily correct the deviations of the xtz/tzBTC pair from the xtz/BTC exchange rate and liquidity providers support the order book by submitting both Tezos and tzBTC to both sides of it. Only risks for farmers come from exchange rate volatility itself and the use of leverage.
How do you handle collateral deficiencies and margin calls?
The protocol monitors the sufficiency of collateral provided for the levered liquidity baking contract and if it beaches certain thresholds the third-party liquidator gains the ability to unwind the Farm at a profit themselves. Liquidators get the difference between the farm value at market prices and what they “pay” for the loan. So if the farm is worth 120% of the collateral value, third-party liquidators can liquidate for roughly a lower percent of the collateral and pocket the difference (however, they will be exposed to exchange rate movement risk). There is also an option for Kord.Fi to perform this operation on our own as an additional protection mechanism.
When does the liquidation happen exactly? What’s the actual condition for it?
Well, it's triggered by your collateral value dropping below 120% of the total loan size. At this moment this actually means that the leverage starts being 5x or more which is too dangerous. We are being pretty conservative here precisely because we want to be sure that liquidity risks stay under control and we prevent any potential unpleasant outcomes by quickly enforcing financial discipline.
Do Lenders enjoy extra protection over Farmers? How is it achieved?
Yes, they do. Lenders have priority claims over Farmers and it is generally similar to how debt holders have much higher protection than equity holders in corporate finance as they have a seniority to their claims. Farmers are the first to eat any impermanent losses and thus they need to be extremely dramatic to anyhow affect lenders. Keep in mind that if all of the borrowed funds are utilized lenders may face delays in refunds but this will be more than compensated by higher interest rates.
Additionally, while Lenders receive losses if during the liquidation event collateral goes below the borrowed amount, they can still be made whole thanks to the additional funds that are allocated to them from the Liquidation events with extra funds that happen when Collateral is still above the Amount Loaned.