arXiv:2608.17220cs.CRcs.AI2026-08

让AI在去中心化金融中安全执行交易,防止恶意指令注入。

PACE: Policy-Attested Contract Execution for Safe AI Agents in Decentralized Finance

  • 通过签名的政策决策记录绑定交易意图与实际执行
  • 在40个任务中实现0%不安全执行率,优于基线0.80%
  • 适合关注AI代理安全性的区块链开发者与研究人员

自主AI代理正成为去中心化金融(DeFi)中进行交换、借贷和收益管理等操作的接口。由于这些代理依赖大语言模型(LLMs)规划交易,易受提示注入攻击,且缺乏将验证者审批绑定到链上实际提交交易的机制。我们提出PACE(Policy-Attested Contract Execution),一个介于LLM代理与链上执行之间的交易级授权框架。PACE引入类型化交易意图、确定性策略验证器以及经签名的政策决策记录(PDRs),通过密码学方式将批准的意图、策略和仿真报告绑定至确切的执行字节,并具备重放与过期防护。一个Solidity智能账户在链上强制校验PDR签名,开销为29,826–31,822 gas。我们在涵盖四类攻击及正常用途的40个任务上,对六个基线进行了评估(2,800次试验,10个种子)。在确定性沙箱中,PACE实现0.00%不安全执行率和0.00%误报率,而未加保护的基线为0.80%。消融实验表明,宽松策略设置(+57.5个百分点)和触碰合约白名单(+12.5个百分点)是主要安全贡献因素。为测试真实模型输出是否保持相同确定性,附加提供了三模型实时LLM评估。提供主网分叉测试环境用于归档RPC部署,但仅在生成相应成果时报告分叉结果。这些辅助研究独立于主基准,从不替代主基准。本文主张在可复现基准下的逻辑级安全,而非部署就绪的DeFi安全保障。

原文摘要 · Abstract (English)

Autonomous AI agents are emerging as interfaces for decentralized finance (DeFi) actions such as swaps, lending operations, and yield management. Because these agents rely on large language models (LLMs) to plan transactions, they inherit the LLM's susceptibility to prompt injection and lack of mechanisms to bind a verifier's approval to the exact transaction ultimately submitted on-chain. We present PACE (Policy-Attested Contract Execution), a transaction-level authorization framework that interposes between an LLM-based agent and on-chain execution. PACE introduces typed transaction intents, a deterministic policy verifier, and signed Policy Decision Records (PDRs) that cryptographically bind the approved intent, policy, and simulation report to the exact execution bytes, with replay and expiration protection. A Solidity smart account enforces PDR signatures on-chain with a measured overhead of 29,826-31,822 gas. We evaluate PACE against six baselines on 40 tasks spanning four attack categories plus benign utility (2,800 trials, 10 seeds). In our deterministic sandbox, PACE achieves a 0.00 unsafe execution rate and 0.00 false-positive rate on benign tasks, compared to 0.80 for the unguarded baseline. Ablation studies identify permissive policy settings (+57.5 pp) and the touched-contract allowlist (+12.5 pp) as the dominant safety components. To test whether the same deterministic floor holds for real model outputs, the artifact additionally provides a three-model live-LLM evaluation over the full task suite with repeated runs. A mainnet-fork harness is included for archive-RPC deployments, but fork results are reported only when the corresponding artifacts are generated. These auxiliary studies are separate from, and never substitute for, the deterministic benchmark. We frame our claims as logic-level safety within a reproducible benchmark rather than deployment-ready DeFi security.

AI安全DeFi智能合约验证机制

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。