> For the complete documentation index, see [llms.txt](https://docs.satoshiterminal.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.satoshiterminal.io/resources/copy-of-defi-analytics/risk-management-and-security-analytics/smart-contract-backdoor-detection.md).

# Smart Contract Backdoor Detection

**Implementation Details**

**Class Names**

| Model Name                     | Parameters Class             | Data Class            |
| ------------------------------ | ---------------------------- | --------------------- |
| SmartContractBackdoorDetection | BackdoorDetectionQueryParams | BackdoorDetectionData |

**Import Statement**

```python
pythonCopyEditfrom satoshi_terminal.models.smart_contract_backdoor_detection import (
    SmartContractBackdoorDetection,
    BackdoorDetectionQueryParams,
    BackdoorDetectionData,
)
```

***

**Parameters**

| Name                | Type                    | Description                                                                         | Default | Optional |
| ------------------- | ----------------------- | ----------------------------------------------------------------------------------- | ------- | -------- |
| contract\_address   | Union\[str, List\[str]] | Smart contract address(es) to analyze.                                              | None    | False    |
| detection\_criteria | List\[str]              | Specific backdoor types to check for (e.g., "Unauthorized Access," "Hidden Admin"). | None    | True     |
| code\_snapshot      | bool                    | Include a snapshot of the contract code in the analysis.                            | False   | True     |

***

**Data**

| Name                  | Type     | Description                                                          |
| --------------------- | -------- | -------------------------------------------------------------------- |
| contract\_address     | str      | Address of the smart contract analyzed.                              |
| backdoor\_detected    | bool     | Whether a backdoor was detected in the contract.                     |
| backdoor\_description | str      | Detailed explanation of the detected backdoor, if any.               |
| severity\_score       | float    | Risk score (0-100) indicating the severity of the detected backdoor. |
| timestamp             | datetime | Timestamp of the analysis.                                           |

***

**Key Features**

* **Code-Level Vulnerability Analysis:** Detects backdoors such as unauthorized function calls, hidden admin privileges, and token minting loopholes.
* **Severity Scoring:** Provides actionable insights with quantified risk levels.
* **Automated Code Snapshots:** Allows users to review the exact lines of code containing vulnerabilities.
