{
  "id": "2023/592",
  "url": "https://opencryptology.org/2023/592",
  "original_url": "https://eprint.iacr.org/2023/592",
  "title": "Blockchain Large Language Models",
  "authors": [
    "Yu Gai",
    "Liyi Zhou",
    "Kaihua Qin",
    "Dawn Song",
    "Arthur Gervais"
  ],
  "affiliations": null,
  "abstract": "This paper presents a dynamic, real-time approach to detecting anomalous blockchain transactions. The proposed tool, BlockGPT, generates tracing representations of blockchain activity and trains from scratch a large language model to act as a real-time Intrusion Detection System. Unlike traditional methods, BlockGPT is designed to offer an unrestricted search space and does not rely on predefined rules or patterns, enabling it to detect a broader range of anomalies. We demonstrate the effectiveness of BlockGPT through its use as an anomaly detection tool for Ethereum transactions. In our experiments, it effectively identifies abnormal transactions among a dataset of 68M transactions and has a batched throughput of 2284 trans- actions per second on average. Our results show that, BlockGPT identifies abnormal transactions by ranking 49 out of 124 attacks among the top-3 most abnormal transactions interacting with their victim contracts. This work makes contributions to the field of blockchain transaction analysis by introducing a custom data encoding compatible with the transformer architecture, a domain-specific tokenization technique, and a tree encoding method specifically crafted for the Ethereum Virtual Machine (EVM) trace representation.",
  "category": "Applications",
  "license": {
    "code": "CC BY-NC-ND",
    "url": "https://creativecommons.org/licenses/by-nc-nd/4.0/",
    "label": "CC BY-NC-ND 4.0",
    "attribution": "“Blockchain Large Language Models” by Yu Gai, Liyi Zhou, Kaihua Qin, Dawn Song, Arthur Gervais, Cryptology ePrint Archive, Paper 2023/592, https://eprint.iacr.org/2023/592. Licensed under CC BY-NC-ND 4.0 (https://creativecommons.org/licenses/by-nc-nd/4.0/).",
    "retroactive": false,
    "redistribute_verbatim_only": true,
    "non_commercial": true
  },
  "dates": {
    "submitted": "2023-04-25T12:06:39Z",
    "updated": "2023-04-29T16:23:09Z",
    "withdrawn": null
  },
  "withdrawn": false,
  "withdrawn_on": null,
  "pdf": {
    "url": "https://opencryptology.org/2023/592.pdf",
    "sha256": "c95562d2ba5e596a2b2f2344666a9b60d031e3216907bd1281971103436c7edb",
    "size": 564234,
    "source": "github-mirror",
    "source_date": "2024-01-14T06:13:41Z",
    "maybe_stale": false,
    "newer_on_eprint": null,
    "withdrawn": false
  },
  "versions": [
    {
      "url": "https://opencryptology.org/2023/592/versions/20240114T061341Z.pdf",
      "captured_at": "2024-01-14T06:13:41Z",
      "label": "copy captured 2024-01-14",
      "source": "github-mirror",
      "source_url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2023/592.pdf",
      "size": 564234,
      "sha256": "c95562d2ba5e596a2b2f2344666a9b60d031e3216907bd1281971103436c7edb",
      "is_default_pdf": true
    }
  ],
  "other_sources": [
    {
      "kind": "wayback",
      "url": "https://web.archive.org/web/20251114173421id_/https://eprint.iacr.org/2023/592.pdf",
      "captured_at": "2025-11-14T17:34:21Z",
      "size": 524733
    },
    {
      "kind": "github-mirror",
      "url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2023/592.pdf",
      "captured_at": "2024-01-14T06:13:41Z",
      "size": 564234
    }
  ],
  "bibtex": "@misc{cryptoeprint:2023/592,\n      author = {Yu Gai and Liyi Zhou and Kaihua Qin and Dawn Song and Arthur Gervais},\n      title = {Blockchain Large Language Models},\n      howpublished = {Cryptology {ePrint} Archive, Paper 2023/592},\n      year = {2023},\n      url = {https://eprint.iacr.org/2023/592}\n}"
}
