# Flash Loan Event Scoring

**Implementation Details**

**Class Names**

| Model Name            | Parameters Class     | Data Class         |
| --------------------- | -------------------- | ------------------ |
| FlashLoanEventScoring | FlashLoanQueryParams | FlashLoanEventData |

**Import Statement**

```python
pythonCopyEditfrom satoshi_terminal.models.flash_loan_event_scoring import (
    FlashLoanEventScoring,
    FlashLoanQueryParams,
    FlashLoanEventData,
)
```

***

**Parameters**

| Name            | Type  | Description                                                                   | Default | Optional |
| --------------- | ----- | ----------------------------------------------------------------------------- | ------- | -------- |
| protocol\_name  | str   | Name of the protocol to monitor for flash loan events (e.g., Aave, Compound). | None    | False    |
| event\_window   | int   | Time window (in minutes) for detecting flash loan activity.                   | 60      | True     |
| risk\_threshold | float | Risk score threshold (0-100) to flag suspicious events.                       | 75      | True     |

***

**Data**

| Name           | Type     | Description                                                     |
| -------------- | -------- | --------------------------------------------------------------- |
| protocol\_name | str      | Name of the protocol where the flash loan occurred.             |
| event\_id      | str      | Unique identifier for the flash loan event.                     |
| loan\_amount   | float    | Amount borrowed in the flash loan.                              |
| risk\_score    | float    | Risk score (0-100) based on the event’s impact and abnormality. |
| timestamp      | datetime | Timestamp of the event.                                         |

***

**Key Features**

* **Anomaly Detection:** Identifies abnormal flash loan activity, such as rapid liquidations or exploit patterns.
* **Impact Scoring:** Quantifies the financial and systemic risk of each event.
* **Protocol-Specific Tracking:** Enables focused monitoring on specific DeFi protocols.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.satoshiterminal.io/resources/copy-of-defi-analytics/risk-management-and-security-analytics/flash-loan-event-scoring.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
