# Detecting Common Vulns

### Balance Extraction

*Confidence: 100%*

Detect whether the attackers can steal ETH / native tokens from the contract.

Example:

```solidity
function buggy() public {
    payable(msg.sender).transfer(1 ether);
}
```

### **Token Extraction**&#x20;

*Confidence: 100%*

Detect whether the attackers can steal ERC20 / ERC721 tokens from the contract, determined by the positive earnings of the attackers. The earning is calculated by liquidating the token on related Uniswap V2 pairs.&#x20;

Example:

```solidity
function buggy() public {
    // the price of tokenAddr2 is higher than tokenAddr1
    SomeToken(tokenAddr1).transferFrom(msg.sender, address(this), 1000);
    SomeToken(tokenAddr2).transfer(msg.sender, 1000);
}
```

### **Uniswap Pair Issues**&#x20;

*Confidence: Medium*

Identify misuse of Uniswap pair that could lead to price manipulation attacks.

Example:

```solidity
function buggy() public {
    burn(IUniswapPair(pairAddr), 1000000);
}
```

### **Arbitrary Selfdestruct**&#x20;

*Confidence: 100%*

Detect whether the contract can be selfdestructed by anyone.

Example:

```solidity
function buggy() public {
    selfdestruct(msg.sender);
}
```

### Integer Overflow / Underflow

*Confidence: Low*

Detect whether the contract add / multiply / subtract leading to overflow and underflow.&#x20;

Example:

```solidity
function buggy() public {
    return type(uint256).max * 2;
}

```


---

# 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.ityfuzz.rs/docs-evm-contract/detecting-common-vulns.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.
