# 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.


---

# 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/smart-contract-backdoor-detection.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.
