斯坦福研究者构思以太坊上的可逆交易:ERC-20R 与 ERC-721R

FPublished on 2022-09-25Last updated on 2022-09-25

Abstract

如果以太坊上的交易可以逆转,「黑客 summer」会终结吗?

区块链交易的不可逆性既是福也是祸。BAYC 网络钓鱼、PolyNetwork 攻击、Harmony Bridge 妥协、Ronin 被黑,仅在 2021 年,就​​有 140 亿美元的加密货币被盗。如此之多「不可否认」的盗窃频繁发生,却没有「撤消按钮」(例如信用卡支付撤销)来取消交易,也并非每个人都像 Wormhole 那样好运,有 Jump Crypto 在需要时帮他们兜底。

但是,如果有一种公平的方法可以扭转这些盗窃行为呢?

这是我们斯坦福大学的几个人(Dan Boneh、Qinchen Wang 和我)在过去几个月里一直在努力回答的问题。我们为 ERC-20 和 ERC-721 设计了支持逆向交易的代币标准(当有足够的证据证明时),写了一篇关于它们的论文,并实现了它们的代码原型。我们将这些代币标准分别称为 ERC-20R 和 ERC-721R。

现在,你可能在想:可逆代币?这不是违背了区块链的目的吗?实际上,没有。该提案不会从区块链中删除交易;它只是允许事后通过去中心化的司法投票程序将资金转回到其合法所有者手中。

工作原理

撤销交易的流程

假设攻击者从受害者那里盗取资金。资金可能会进一步转移到其他地址,如下图 1 所示,会发生以下情况:

受害者要求冻结被盗资金。受害者向治理合约发布冻结请求,并提交相关证据和一些抵押资产。有争议的交易必须是最近发生的(有一个固定的可逆时间窗口)。

法官接受或拒绝冻结请求。一定人数的法官通过去中心化投票的方式决定是否冻结资产,这个审议期最多需要一两天。如果他们拒绝该请求,撤销交易程序将停止,受害者将失去他们的抵押资产。如果他们接受请求,那么治理合约将调用 ERC-20R/ERC-721R 合约中的 freeze 函数。

执行冻结。对于 NFT,冻结只是阻止 NFT 被转移。对于 ERC-20R,它将追踪被盗资金并禁止转移这些资金。请注意,只要账户所有者的余额在冻结金额以上,账户所有者仍然可以与其他人进行交易。这个过程可能会变得复杂,我将在下一节中解释。

审判。双方可以向去中心化法庭提供证据,最终法官做出判决,此时他们指示治理合约调用受影响的 ERC-20R/ERC-721R 合约的 reverse 或者 rejectReverse 函数。如果调用 rejectReverse 函数,则解除对争议资产的冻结。审判过程可能会持续较长时间,可能需要几周。

逆转交易。调用 reverse 函数将冻结的资产发送回给受害者。

图 1:交易图

追踪被盗资金

被盗取的资产很少只是放在一个地方。攻击者通常用某些方式将资产从一个帐户转移到另一个帐户。在这种情况下,攻击者甚至可以监控 mempool,并在看到冻结请求提交时将资产转移到前端交易中。避免这种情况的解决方案是在单笔交易中在链上进行整个冻结,这样攻击者就无法「逃脱」冻结。

但是我们不能只禁用所有相关资产的账户,那么我们如何决定冻结什么以及冻结谁的账户呢?如果它是 NFT,冻结非常简单:只需查看当前拥有 NFT 的人,然后冻结该帐户即可。然而如果是 ERC-20 资产,货币的可分割性使得冻结变得非常复杂。这些资金可以分配到数十个账户中,投入到 Tornado 等匿名混合器中,或者兑换成另一种加密货币。如果它通过许多帐户,至少其中一些将与黑客相关联,但有些人很可能是无辜的。不可能总是正确地辨别每个帐户的是否有罪。因此,我们提供了用于追踪和锁定被盗资金的默认冻结流程。我们的算法确保:

假设没有销毁,将冻结足够的资产来支付盗窃金额。(从返还的金额中减去销毁的资产),

账户资金只有在与盗窃资产有直接交易流的情况下才会被冻结

相对于交易图(图 1),该算法以合理的运行时复杂度运行。

可逆性是病毒

⠀⠀

在交易中,像往常一样交换两种不同的可逆代币是安全的;如果一方要求冻结,则有可能从另一方收回资金。但是,将可逆代币换成不可逆代币会很危险;为了保护自己免受逆转,交易可能仅在可逆时间窗口过去后才完成交换。这意味着可逆→不可逆交易将有很长的延迟。因此,一旦几个主要代币变得可逆,其他代币也面临着巨大的可逆压力。

去中心化司法系统

这个难题中比较模糊的部分涉及「法官的法定人数」。这些法官是谁?他们如何投票?他们如何获得奖励?

这些工作最终取决于治理,即创建 ERC-20R/ERC-721R 实例的人。然而,一般来说,法官必须从交易池中随机选择案例(使用以太坊的随机信标),他们的奖励独立于他们的投票决定。奖励来自与冻结请求一起提交的受害者的初始权益。法官的选举最好秘密进行,在提交选票之前不公开,以保证法官可以独立投票。

Related Reads

The Full Story of How Crypto Unicorn Blockstream Is Mired in Serious Fraud Allegations

This article details serious allegations of fraud against Bitcoin infrastructure company Blockstream, founded by Bitcoin pioneer Adam Back. In June 2024, investigative account NatInfoSec published a report accusing Blockstream's mining note (BMN) program of potentially operating a multi-billion dollar scheme with Ponzi-like characteristics. The core allegations focus on Blockstream Mining Notes (BMNs), which offer investors fixed annual yields up to approximately 20% from Bitcoin mining. NatInfoSec's investigation raises several key issues: 1. **Suspicious Hashrate & Payout Capacity**: The analysis suggests Blockstream would need 20-45 EH/s of mining power to cover its BMN obligations, but its public dashboard shows only around 15 EH/s. Furthermore, no verifiable public evidence (e.g., grid connection records, import data) was found to support the massive mining operation required. 2. **Questionable Payout Source**: The BMN contract allows Blockstream to use Bitcoin from *any source* (Substitute Performance BTC) to fulfill investor payouts, raising concerns that payouts may not come from actual mining revenue. 3. **High-Risk, Fixed Returns**: Offering ~20% fixed yields in the volatile, cyclical Bitcoin mining industry is viewed as highly unusual and requires clear explanation. 4. **Undisclosed Criminal Record of Key Figure**: Christopher William Cook, a key figure in Blockstream's mining operations and CEO of spin-off Exacore, was found to have a federal felony conviction for mail fraud in 2008, a fact not disclosed in BMN offering documents. His background was also allegedly embellished. 5. **Potential Contagion to BSTR SPAC**: Questions were raised about whether these liabilities and Cook's record should have been disclosed in the SEC filings for Bitcoin Standard Treasury Company (BSTR), a separate Adam Back-associated firm planning a SPAC merger. The crypto community is divided. BitMEX Research validated Cook's criminal record and expressed concern over the high yields but found other evidence lacking or misleading, noting the legal separation between BMN, Blockstream, and BSTR. Blockstream defenders, like Samson Mow, argue the mining is real. Critics, however, emphasize the lack of independent, verifiable proof of the mining operation's scale and the true source of investor payouts. The article concludes that BMN remains shrouded in key unanswered questions regarding its actual size, the verifiability of its underlying mining assets and payouts, the source of its high yields, and the full role and disclosure concerning Chris Cook. Blockstream had not issued a comprehensive response at the time of writing.

marsbit2h ago

The Full Story of How Crypto Unicorn Blockstream Is Mired in Serious Fraud Allegations

marsbit2h ago

The Full Story Behind Encryption Unicorn Blockstream's Deep Entanglement in Serious Fraud Allegations

This article details allegations of serious fraud surrounding the crypto company Blockstream, founded by Bitcoin pioneer Adam Back. Investigation account NatInfoSec accuses Blockstream of raising billions through its Blockstream Mining Note (BMN) products, which offer high fixed yields of up to 20% from purported mining revenue. The core allegations are: 1) Blockstream's public mining hash rate (15 EH/s) appears insufficient to cover the massive payout obligations from sold BMN notes, raising questions about the true source of investor payouts. 2) Key executive Christopher William Cook, central to the mining operations, has a prior federal conviction for mail fraud, a fact not disclosed to investors. Cook's background and lavish lifestyle are highlighted as red flags. 3) The structure allows payouts from any source of BTC, not necessarily mining revenue, which critics argue gives it Ponzi-like characteristics. The controversy also touches on Bitcoin Standard Treasury Company (BSTR), a related entity planning a SPAC上市. Critics question whether BMN's liabilities and Cook's record should be disclosed in BSTR's filings. BitMEX Research offered a tempered analysis, confirming Cook's criminal record is likely true and the high yields concerning, but found other claims like insufficient抵押证据 less substantiated. Community debate centers on the need for verifiable proof of Blockstream's mining output and revenue. The article concludes that while fraud is not proven, BMN presents significant, unresolved questions regarding its actual scale, the source of its high fixed returns, the verifiability of its mining operations and payouts, and the full disclosure of associated risks and personnel backgrounds. Blockstream has not yet issued a formal response.

链捕手3h ago

The Full Story Behind Encryption Unicorn Blockstream's Deep Entanglement in Serious Fraud Allegations

链捕手3h ago

Trading

Spot
Futures
活动图片