Your current "Borrow Balance" and "Supply Balance" is calculated using our 2 Oracles, Pyth (main) and Switchboard (backup). Using these oracles, we can calculate your current health factor.
When your Health Bar reaches the orange line, your account is open to be liquidated. This orange line, the Liquidation Threshold is based on the parameters set on different tokens. We will calculate this liquidation threshold based on the weighted average of all the assets you deposited.
This can be found in your Account Details screen
When your account is open to be liquidated, our Third Party Liquidators will repay 20% of your loans by selling the equivalent amount in Collateral. Additionally, the liquidators will collect an additional 5% on the amount (20%) they liquidated, as a bounty to secure our protocol. You can learn on becoming a liquidator here.
Let's say Bob supplies $10,000 USDC and borrowed $7,500 of BTC. BTC then goes up by 6.69% putting the BTC value at ~$8,000 making Bobs account eligible for liquidation.
The liquidator then repays 20% of the BTC loan, $1,600, collects $1,600 from the collateral USDC supply to cover the BTC, then collects an additional 5% ($80) as a bonus for completing the liquidation successfully.
Now Bob has $10,000 - $1,600 - $80 = $8,320 in USDC, and $8,000 - $1,600 = $6,400 in BTC borrows while the liquidator paid $1600 in BTC and received 1,680 in USDC for a profit of $80.
Bob's Liquidation Threshold drops from 80% -> 77%.