Skip to content

Utiliziation of Blockaid API

Yosif Hamed edited this page Dec 20, 2023 · 6 revisions

Blockaid provides API for:

  • Dapp scans that include information about:
    • popularity
    • whether it is malicious or not
    • json rpc operations
    • contract writes and reads Result from uniswap
{
  "status": "hit",
  "url": "uniswap.org",
  "scan_start_time": "2023-12-05T16:24:25.170000",
  "scan_end_time": "2023-12-05T16:45:07.806000",
  "malicious_score": 0,
  "is_reachable": true,
  "is_web3_site": true,
  "is_malicious": false,
  "attack_types": {},
  "network_operations": [
    "https://app.uniswap.org."
  ],
  "json_rpc_operations": [],
  "contract_write": {
    "contract_addresses": [],
    "functions": {}
  },
  "contract_read": {
    "contract_addresses": [],
    "functions": {}
  },
  "modals": []
}
  • Transaction validation and simulation. From ambire account to uniswap, executing swap: Validation:
{
  "validation": {
    "result_type": "Benign",
    "description": "",
    "reason": "",
    "classification": "",
    "features": []
  }
}

Simulation:

{
  "simulation": {
    "assets_diffs": {
      "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270": [
        {
          "asset": {
            "type": "NATIVE",
            "name": "MATIC",
            "symbol": "MATIC",
            "chain_name": "Polygon Mainnet",
            "chain_id": 137,
            "decimals": 18
          },
          "in": [
            {
              "usd_price": "4.991615619942100679",
              "summary": "Received 6.388 MATIC",
              "value": "6.387657281865693371",
              "raw_value": "0x58a58474608ab718"
            }
          ],
          "out": []
        },
        {
          "asset": {
            "type": "ERC20",
            "name": "Wrapped Matic",
            "symbol": "WMATIC",
            "address": "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",
            "decimals": 18
          },
          "in": [],
          "out": [
            {
              "usd_price": "4.991615619942100679",
              "summary": "Sent 6.388 WMATIC",
              "value": "6.387657281865693371",
              "raw_value": "0x58a58474608ab718"
            }
          ]
        }
      ],
      "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45": [
        {
          "asset": {
            "type": "NATIVE",
            "name": "MATIC",
            "symbol": "MATIC",
            "chain_name": "Polygon Mainnet",
            "chain_id": 137,
            "decimals": 18
          },
          "in": [
            {
              "usd_price": "0.000000000000000181",
              "summary": "Received 0 MATIC",
              "value": "0.000000000000000232",
              "raw_value": "0xe8"
            }
          ],
          "out": []
        }
      ],
      "0x76239AC5D4A9e2D145506d20494477BA38f7EF53": [
        {
          "asset": {
            "type": "NATIVE",
            "name": "MATIC",
            "symbol": "MATIC",
            "chain_name": "Polygon Mainnet",
            "chain_id": 137,
            "decimals": 18
          },
          "in": [],
          "out": [
            {
              "usd_price": "4.991615619942100679",
              "summary": "Sent 6.388 MATIC",
              "value": "6.387657281865693371",
              "raw_value": "0x58a58474608ab800"
            }
          ]
        },
        {
          "asset": {
            "type": "ERC20",
            "name": "Wrapped Ether",
            "symbol": "WETH",
            "address": "0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619",
            "decimals": 18
          },
          "in": [
            {
              "usd_price": "5.018243393358065241",
              "summary": "Received 0.002 WETH",
              "value": "0.002259968715586942",
              "raw_value": "0x8076df87efd7e"
            }
          ],
          "out": []
        }
      ],
      "0x86f1d8390222A3691C28938eC7404A1661E618e0": [
        {
          "asset": {
            "type": "ERC20",
            "name": "Wrapped Matic",
            "symbol": "WMATIC",
            "address": "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",
            "decimals": 18
          },
          "in": [
            {
              "usd_price": "4.991615619942100679",
              "summary": "Received 6.388 WMATIC",
              "value": "6.387657281865693371",
              "raw_value": "0x58a58474608ab718"
            }
          ],
          "out": []
        },
        {
          "asset": {
            "type": "ERC20",
            "name": "Wrapped Ether",
            "symbol": "WETH",
            "address": "0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619",
            "decimals": 18
          },
          "in": [],
          "out": [
            {
              "usd_price": "5.018243393358065241",
              "summary": "Sent 0.002 WETH",
              "value": "0.002259968715586942",
              "raw_value": "0x8076df87efd7e"
            }
          ]
        }
      ]
    },
    "total_usd_diff": {
      "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270": {
        "in": "4.991615619942100679",
        "out": "4.991615619942100679",
        "total": "0.0"
      },
      "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45": {
        "in": "0.000000000000000181",
        "out": "0.0",
        "total": "0.000000000000000181"
      },
      "0x76239AC5D4A9e2D145506d20494477BA38f7EF53": {
        "in": "5.018243393358065241",
        "out": "4.991615619942100679",
        "total": "0.026627773415964562"
      },
      "0x86f1d8390222A3691C28938eC7404A1661E618e0": {
        "in": "4.991615619942100679",
        "out": "5.018243393358065241",
        "total": "-0.026627773415964562"
      }
    },
    "exposures": {},
    "total_usd_exposure": {},
    "address_details": {
      "0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619": {
        "name_tag": "Wrapped Ether",
        "contract_name": "MaticWETH"
      },
      "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270": {
        "name_tag": "Polygon: WMATIC Token",
        "contract_name": "WMATIC"
      },
      "0x76239AC5D4A9e2D145506d20494477BA38f7EF53": {
        "contract_name": "Identity"
      },
      "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45": {
        "name_tag": "Uniswap V3: Router 2",
        "contract_name": "SwapRouter02"
      },
      "0x86f1d8390222A3691C28938eC7404A1661E618e0": {
        "contract_name": "UniswapV3Pool"
      }
    },
    "account_summary": {
      "assets_diffs": [
        {
          "asset": {
            "type": "NATIVE",
            "name": "MATIC",
            "symbol": "MATIC",
            "chain_name": "Polygon Mainnet",
            "chain_id": 137,
            "decimals": 18
          },
          "in": [],
          "out": [
            {
              "usd_price": "4.991615619942100679",
              "summary": "Sent 6.388 MATIC",
              "value": "6.387657281865693371",
              "raw_value": "0x58a58474608ab800"
            }
          ]
        },
        {
          "asset": {
            "type": "ERC20",
            "name": "Wrapped Ether",
            "symbol": "WETH",
            "address": "0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619",
            "decimals": 18
          },
          "in": [
            {
              "usd_price": "5.018243393358065241",
              "summary": "Received 0.002 WETH",
              "value": "0.002259968715586942",
              "raw_value": "0x8076df87efd7e"
            }
          ],
          "out": []
        }
      ],
      "total_usd_diff": {
        "in": "5.018243393358065241",
        "out": "4.991615619942100679",
        "total": "0.026627773415964562"
      },
      "exposures": [],
      "total_usd_exposure": {}
    }
  }
}
- Transaction simulation, risk analysis and 
Clone this wiki locally