[论文解读] SquirRL: Automating Attack Analysis on Blockchain Incentive Mechanisms with Deep Reinforcement Learning
SquirRL 是一个深度强化学习框架,通过模拟理性代理之间的战略互动,自动发现区块链激励机制中的攻击。它复现了已知攻击(如自私挖矿和区块隐瞒攻击),并揭示了新型缺陷——例如在多代理自私挖矿中不存在有利可图的纳什均衡,以及以太坊 Casper FFG 中存在高达30%的奖励放大攻击——展示了其在发现理论分析难以触及的漏洞方面的强大能力。
Incentive mechanisms are central to the functionality of permissionless blockchains: they incentivize participants to run and secure the underlying consensus protocol. Designing incentive-compatible incentive mechanisms is notoriously challenging, however. As a result, most public blockchains today use incentive mechanisms whose security properties are poorly understood and largely untested. In this work, we propose SquirRL, a framework for using deep reinforcement learning to analyze attacks on blockchain incentive mechanisms. We demonstrate SquirRL's power by first recovering known attacks: (1) the optimal selfish mining attack in Bitcoin [52], and (2) the Nash equilibrium in block withholding attacks [16]. We also use SquirRL to obtain several novel empirical results. First, we discover a counterintuitive flaw in the widely used rushing adversary model when applied to multi-agent Markov games with incomplete information. Second, we demonstrate that the optimal selfish mining strategy identified in [52] is actually not a Nash equilibrium in the multi-agent selfish mining setting. In fact, our results suggest (but do not prove) that when more than two competing agents engage in selfish mining, there is no profitable Nash equilibrium. This is consistent with the lack of observed selfish mining in the wild. Third, we find a novel attack on a simplified version of Ethereum's finalization mechanism, Casper the Friendly Finality Gadget (FFG) that allows a strategic agent to amplify her rewards by up to 30%. Notably, [10] show that honest voting is a Nash equilibrium in Casper FFG: our attack shows that when Casper FFG is composed with selfish mining, this is no longer the case. Altogether, our experiments demonstrate SquirRL's flexibility and promise as a framework for studying attack settings that have thus far eluded theoretical and empirical understanding.
研究动机与目标
- 为解决在复杂多代理环境中缺乏系统化、自动化分析区块链激励机制攻击的方法,特别是针对此类环境的挑战。
- 开发一个灵活且可泛化的框架,使研究人员能够在不依赖理论假设的前提下,对区块链协议中的战略行为进行实证探索。
- 识别现实世界激励机制中此前未知的漏洞,例如比特币和以太坊 Casper FFG 中的漏洞。
- 评估现有理论模型(如冲势对手模型)在多代理、不完全信息环境下的鲁棒性。
- 为区块链开发者提供一个实用工具,用于在早期协议设计阶段探测激励相容性并发现可利用的策略。
提出的方法
- SquirRL 将区块链激励机制建模为多代理马尔可夫决策过程(MADP),根据代理的视角和能力定义状态空间与动作空间。
- 采用深度强化学习算法(如PPO、SAC)训练代理在模拟的对抗环境中最大化个体收益。
- 框架使用通用的状态表示,在特征维度与准确性之间取得平衡,支持在不同协议和配置下的适应性。
- 奖励函数被设计为反映协议特定的激励机制,如区块奖励和交易费用,以引导代理采取利润最大化的策略。
- 框架支持不同数量的代理,包括混合类型(如诚实、自私、合谋),并能模拟动态变化(如算力的转移)。
- 它与模拟环境集成,可仿真共识协议,实现可扩展且可重复的攻击探索。
实验结果
研究问题
- RQ1深度强化学习能否完全自动化地恢复已知的最优攻击策略,例如比特币中的自私挖矿攻击?
- RQ2先前研究中确定的最优自私挖矿策略在包含超过两个理性代理的多代理环境中是否构成纳什均衡?
- RQ3当自私挖矿与最终性机制(如以太坊的 Casper FFG)结合时,会暴露哪些新漏洞?
- RQ4在多代理、不完全信息环境下,冲势对手模型在何处失效?其对攻击建模有何影响?
- RQ5SquirRL 能否发现理论分析尚未察觉的、具有实际盈利潜力的新攻击?
主要发现
- SquirRL 有效复现了比特币中已知的最优自私挖矿策略,验证了其通过强化学习自动再现理论结果的能力。
- 先前研究中确定的最优自私挖矿策略在多代理环境中并非纳什均衡,表明当超过两个代理参与自私挖矿时,不存在有利可图的均衡。
- 实证结果表明,多代理自私挖矿中缺乏有利可图的纳什均衡,可能是现实中未观察到自私挖矿现象的原因。
- SquirRL 在以太坊 Casper FFG 的简化版本上发现了一种新型攻击,使策略性代理的奖励最高可放大30%。
- 该攻击表明,当 Casper FFG 与自私挖矿结合时,诚实投票不再构成纳什均衡,从而破坏了其预设的安全性。
- 该框架揭示了在不完全信息、多代理马尔可夫博弈中,冲势对手模型存在根本性缺陷,挑战了先前理论工作中所依赖的假设。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。