区块链上的侧合约承诺攻击
Side Contract Commitment Attacks on Blockchains
AI总结:
本研究发现区块链上智能体可部署侧合约会打破传统博弈均衡,提出侧合约韧性概念,验证两款去中心化商务合约的韧性差异,并展示针对首价拍卖及EIP-1559的侧合约攻击,指出该问题对智能合约安全部署的重要性。
摘要:
我们发现了一个影响智能合约设计的隐蔽安全问题,其成因是智能体自身可以部署智能合约(侧合约)。通常,博弈均衡是在体外环境下分析的,前提假设是参与者无法任意承诺策略。然而,当博弈被部署到区块链上时,这种方式得到的均衡在体内环境下通常并不成立。能够部署侧合约会改变博弈论的基本假设,催生一种元博弈:智能体会通过策略性部署最优合约来谋取优势。因此,不将侧合约纳入考量,就无法捕捉实际部署智能合约的一个重要维度。若一个博弈在参与者可部署侧合约的情况下仍能保持安全,就称其具备侧合约韧性。\n我们通过分析两款用于去中心化商务的智能合约,证明了侧合约韧性并非易事。这两款合约的预期功能完全相同,但我们证实其中只有一款具备侧合约韧性。随后,我们针对首价拍卖(多数主流区块链采用的交易机制)展示了一种侧合约攻击。我们证明,智能体可以部署一份合约,确保自身交易几乎零成本被纳入下一个区块,同时迫使绝大多数其他智能体为剩余的区块空间参与抽奖。这种攻击对所有用户有利,但会损害矿工的利益,这或许值得重新评估拍卖机制在交易费机制中的应用。我们证明,该攻击在特定条件下可行,且这些条件在自然分布下以高概率成立。该攻击同样适用于交易机制EIP-1559。我们的工作凸显了一个必须解决的问题,它对保障智能合约的安全部署至关重要,同时表明主流区块链上已部署的其他合约也可能容易受到此类攻击。
英文摘要:
We identify a subtle security issue that impacts the design of smart contracts, because agents may themselves deploy smart contracts (side contracts). Typically, equilibria of games are analyzed in vitro, under the assumption that players cannot arbitrarily commit to strategies. However, equilibria thus obtained do not hold in general in vivo, when games are deployed on a blockchain. Being able to deploy side contracts changes fundamental game-theoretic assumptions by inducing a meta-game wherein agents strategize to deploy the best contracts. Not taking side contracts into account thus fails to capture an important aspect of deploying smart contracts in practice. A game that remains secure when the players can deploy side contracts is said to be side contract resilient. We demonstrate the non-triviality of side contract resilience by analyzing two smart contracts for decentralized commerce. These contracts have the same intended functionality, but we show that only one is side contract resilient. We then demonstrate a side contract attack on first-price auctions, which are the transaction mechanisms used by most major blockchains. We show that an agent may deploy a contract ensuring their transaction is included in the next block at almost zero cost while forcing most other agents to enter into a lottery for the remaining block space. This benefits all the users, but is detrimental to the miners. This might be cause for re-evaluation of the use of auctions in transaction fee mechanisms. We show that the attack works under certain conditions that hold with high probability from natural distributions. The attack also works against the transaction mechanism EIP-1559. Our work highlights an issue that is necessary to address to ensure the secure deployment of smart contracts and suggests that other contracts already deployed on major blockchains may be susceptible to these attacks.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。