Flash Loan Event Scoring

Implementation Details

Class Names

Model Name
Parameters Class
Data Class

FlashLoanEventScoring

FlashLoanQueryParams

FlashLoanEventData

Import Statement

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.

Last updated