Functional Overview
This section explains how a protection is created in the system.
How is a protection created?
Once the frontend requests to quote protection plans for a loan, the backend passes the loan data to the probability engine.
The approval or rejection decision and quotes for protecting loans are run by the decisioning and pricing services* that, due to the required computing power for the calculations, are part of the backend system. With the evolution of the protocol and innovations in the EVM, these functions may run completely on chain.
Once the user choses the protection plan, the borrower service will send the corresponding data to the protocol smart contracts via the smart contracts execution service by calling the Protect Loan flow.
Figure 1 shows interaction pattern that takes place between the system components

How is a loan protected?
After the protection is attached to the loan, the backend will monitor the loan's health from the LTV monitor service.
During the duration the protection (30 days), whenever the LTV monitor service detects that the ltv_protect threshold is breached for a loan, a claim is triggered from borrower service and executed by the backend through the smart contracts execution service by calling the Create Claim flow in the smart contracts.
In this case, the smart contracts would pull funds from the LP pools (swap them to the collateral base if necessary) and deposit them in the user's position on the lending platform.
At this point, the smart contract monitor service will update the notifications and borrower services to update the new status of the loan in the backend and the UI.
Figure 2 shows the interactions between the system components involved when a claim is triggered.

Claim Fees
At this point, the claim fee is charged to the user by directly borrowing the fee amount from the user position in the lending platform.
This fee is the routed, through the revenue splitter, to the protocol treasury and back to the LP pool as part of the returns.
Last updated