Liquidations occur on Blueberry based on the Net PnL of the position NFT, which contains the collateral, debt, and deployed position.
The concept is similar to the mechanics of leverage trading, but for DeFi strategies.
A liquidation occurs when the Net PnL of the position NFT is equal to the Liquidation Threshold for the collateral supplied. A user can see how close they are to liquidation through the position health bar on the Home page.
The liquidation thresholds exist so that the lenders and protocol do not experience bad debt. A 10 or 15% margin is enough to guarantee that the liquidator can receive full repayment by liquidating assets after repaying the loan. It is recommended that users monitor their positions and close a position before it comes to liquidation, in order to maximize the value received back.
Anyone can perform a liquidation for a position that meets the threshold. As a safety mechanism, the Blueberry DAO will have a bot in place to immediately liquidate any position that meets the threshold using flash loans.