在贫瘠UTXO区块链上安全编译丰富智能合约
Secure compilation of rich smart contracts on poor UTXO blockchains
AI总结:
本文提出ILLUM,一种面向UTXO区块链的中间级语言,支持丰富智能合约表达,并设计安全编译器,证明编译不引入新漏洞,且可作为高级语言的编译目标。
摘要:
从以太坊开始的大多数区块链平台将智能合约呈现为有状态的反应式对象,这些对象响应交易而更新其状态并转移加密资产。这种设计的一个缺点是,当用户提交交易时,他们无法预测交易将在何种状态下执行。这使用户面临交易排序攻击,这是一类广泛的攻击,其中拥有构建交易区块能力的对手可以从智能合约中提取价值(即所谓的MEV攻击)。UTXO模型是一种替代性的区块链设计,通过要求新交易花费过去的交易来阻止这些攻击:由于交易具有唯一标识符,重排序攻击是无效的。目前,遵循UTXO模型的区块链要么提供表达力有限的合约(如比特币),要么需要复杂的运行时环境(如卡尔达诺)。我们提出了ILLUM,一种用于UTXO模型的中间级语言。ILLUM可以表达现实世界的智能合约,例如去中心化金融中的合约。我们定义了一个从ILLUM到具有无循环脚本的极简UTXO区块链的编译器。我们的编译目标仅需要对比特币脚本进行最小扩展:特别是,我们利用covenants,一种沿交易链保留脚本的机制。我们证明了编译器的安全性:即,任何针对编译后合约的攻击在ILLUM层面也是可观察的。因此,编译器不会引入源ILLUM合约中原本不存在的新漏洞。我们评估了ILLUM作为高级语言编译目标的实用性。为此,我们实现了一个从受Solidity启发的合约语言到ILLUM的编译器,并将其应用于一个基准或现实世界的智能合约。
英文摘要:
Most blockchain platforms from Ethereum onwards render smart contracts as stateful reactive objects that update their state and transfer crypto-assets in response to transactions. A drawback of this design is that when users submit a transaction, they cannot predict in which state it will be executed. This exposes them to transaction-ordering attacks, a widespread class of attacks where adversaries with the power to construct blocks of transactions can extract value from smart contracts (the so-called MEV attacks). The UTXO model is an alternative blockchain design that thwarts these attacks by requiring new transactions to spend past ones: since transactions have unique identifiers, reordering attacks are ineffective. Currently, the blockchains following the UTXO model either provide contracts with limited expressiveness (Bitcoin), or require complex run-time environments (Cardano). We present ILLUM , an Intermediate-Level Language for the UTXO Model. ILLUM can express real-world smart contracts, e.g. those found in Decentralized Finance. We define a compiler from ILLUM to a bare-bone UTXO blockchain with loop-free scripts. Our compilation target only requires minimal extensions to Bitcoin Script: in particular, we exploit covenants, a mechanism for preserving scripts along chains of transactions. We prove the security of our compiler: namely, any attack targeting the compiled contract is also observable at the ILLUM level. Hence, the compiler does not introduce new vulnerabilities that were not already present in the source ILLUM contract. We evaluate the practicality of ILLUM as a compilation target for higher-level languages. To this purpose, we implement a compiler from a contract language inspired by Solidity to ILLUM, and we apply it to a benchmark or real-world smart contracts.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。