TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Simple Contracts are Better Contracts: the Meltdown of the DAO

189 点作者 jackaltman将近 9 年前

16 条评论

sandworm101将近 9 年前
How many of the TheDAO Curator members are lawyers?<p>Contracts are agreements that are meant to be legally enforceable. The enforcer has always been the King, a local governmental authority and a third party. The very concept of a contract assumes the neutral third party. That third party is to interpret the contract, identify potential scoundrels, nullify illegal contracts and generally make sure everyone isn&#x27;t playing games. Smart contracts seek to sidestep that ancient structure by replacing the neutral third party with an inflexible machine. Good luck with that.<p>Contract language is also meant as a manifestation of intent. Smart contracts seek a perfect manifestation, dismissing all notions of imperfect knowledge or misunderstanding. Typos rarely matter in real contracts. Intent can trump language where appropriate. But in smart contracts typos are everything. Good luck with that too.
评论 #11929532 未加载
评论 #11932847 未加载
评论 #11930029 未加载
评论 #11929416 未加载
评论 #11931828 未加载
评论 #11932003 未加载
评论 #11929575 未加载
评论 #11929534 未加载
grellas将近 9 年前
Can code both embody and replace law for the exact function for which it is set up?<p>DAO strives to execute through code an idealized pooled investment system by which contract issues are resolved entirely by code and wholly apart from any external societal legal or enforcement mechanisms.<p>All well and good but, where people are involved, code simply cannot define all the relations needed to capture what the law does (and, indeed, and in spite of its flaws, does very well indeed).<p>Consider the argument that the exploit here is not a flaw at all but just another variation on what the code does, with the result that investors who suddenly are $50M lighter in their wallets have not been harmed at all and should have no recourse to any remedy to restore their funds to them. The idea here is that the code <i>is</i> the contract and, if that is what the code does, well, that is what you bargained for, whether this is good or bad from any particular moral perspective. Right at the entry point of the system is a prominent disclaimer that says this in exact words. So a contract is a contract. If you don&#x27;t like the result, tough.<p>The participants here are wealthy and presumably sophisticated investors. What if they aren&#x27;t? What if this were marketed to a lot of gullible small investors who were induced to part with their money through various representations stating that their funds were entirely safe, subject only to normal investment risks relating to the underlying companies they funded? What does society do when people like this lose their life savings when some newly discovered &quot;feature&quot; of the code allows a sharpie to walk away with their funds? Are they to have no legal recourse because a &quot;contract is a contract,&quot; especially if it embodied in code?<p>And what happens if a system is set up and the person or persons who find the new &quot;feature&quot; enabling them to walk away with other people&#x27;s funds are the very people who organized the fund? Does law from the broader world step in to provide a remedy to those who lost their money? Or does the &quot;contract is a contract, especially in code&quot; logic work to deny any remedy to the participants here as well?<p>And, setting aside any of the more extreme examples, what if it is simply the case that those who did participate had reasonable expectations that any code that would define and limit their rights would do all that was expected in terms of defining their investments but would include safeguards that would prevent anyone from simply coming in to remove their funds altogether (dare I say &quot;steal&quot;)? What if they were misled into having such expectations by promoters of the venture who said or implied that such safeguards existed? Is it enough to say that none of this matters because of some disclaimer buried in fine print? Is all of this simply irrelevant just because a &quot;contract is a contract, especially in code&quot;?<p>Contracts are part of any system of law that includes private property, and a very important part at that.<p>But contracts can never define the totality of the law that applies to a given situation, even if the parties swear up and down that that is their intent.<p>That is why securities laws exist, to help investors who get swindled by sharpies with well-honed contracts.<p>That is why the laws relating to fraud exist, to help those who are misled by others to their financial detriment.<p>Indeed, that is why a sophisticated body of laws exists relating to contracts themselves, to cover cases where the intent of the parties is sometimes so frustrated by one thing or another as to make it inequitable to enforce a contract.<p>Law is and always has existed in multiple layers. Legislatures pass statutes but courts exist to interpret them to cover specific cases as disputes arise. The same with administrative regulations promulgated by agencies. Even within the courts themselves, common law courts would declare legal &quot;rules&quot; only to have courts of equity intervene to correct things where the &quot;rules&quot; led to harsh or inequitable results.<p>Basically, all of this is another way of saying that human relations are complex and any system of laws and justice needs to be able to handle such complexity if it is to be worthy of being a system of justice.<p>Perhaps in narrow cases, things such as DAO can be set up to create a rich guy&#x27;s playground of sorts in which, for the overwhelming number of cases, outside laws play no part within the self-contained system. Perhaps there is even an ideal of some type to be realized here (get rid of lawyers, etc.).<p>But no such system can ever be utterly divorced from the rules of the broader society. Ideal or no ideal, this is just not how the law works. Apart perhaps from some survivalist society or other, people simply cannot exempt themselves from the general rules of law no matter how much they desire to do so. They can limit the application of such broader laws to a degree but, when key bounds are transgressed, the law will apply in its full force regardless of their intentions.<p>So, I would say that the curators here probably had no choice. It was either do what they did or watch as lawsuits followed, probably in abundance. This may have violated some ideal in play here but it was a pragmatic necessity given how law in reality works (and always will work).
评论 #11931363 未加载
Animats将近 9 年前
There are two fundamental problems with Etherium contracts.<p>1. They&#x27;re executable programs. They could have been a set of declarative rules listed in priority order, but no, the designers went overboard and made them general programs with loops and recursion. There are straightforward ways to analyze sets of rules; they&#x27;re usually amenable to case analysis. It&#x27;s hard to analyze programs.<p>Writing a declarative contract language is a challenge. But doing so forces the designers to think through what they want the system to be able to do, and what they don&#x27;t want it to do. Doing contracts as executable programs is punting on the problem. It says &quot;we don&#x27;t know how to do this, so we&#x27;ll dump the problem on the users.&quot;<p>2. The stack overflow problem is idiotic. The system should have been designed so that if a program aborts, anything it did is rolled back. That&#x27;s the design flaw this attack exploits.
评论 #11930619 未加载
评论 #11930328 未加载
alistproducer2将近 9 年前
Bailing out the DAO undermines the core value propositions of Ethereum - contract immutability (stability) and decentralization. I understand that the argument is &quot;this is a special (ie, too big to fail) case; however, who can be sure?<p>IMO the better way to handle this is to acknowledge the mistake and let it fail. It&#x27;s embarrassing I get it. Honestly, the big bank types who threw millions at this tech without doing due diligence deserve to lose their shirt. It&#x27;s called speculation for a reason.<p>If the core team cares about the long term credibility of the project with the people who real matter - the tech community - they will not bail it out.<p>Edit:<p>For anyone interested, there&#x27;s a really great discussion on this subject at the Ethereum reddit <a href="https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;ethereum&#x2F;comments&#x2F;4oiqj7&#x2F;critical_update_re_dao_vulnerability&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;ethereum&#x2F;comments&#x2F;4oiqj7&#x2F;critical_u...</a>
louprado将近 9 年前
&quot;Simple Contracts are Better Contracts&quot; has always been the mantra of the Ethereum and DAO team. Most times when a security question was raised, &quot;simple contracts&quot; was their defacto answer [1].<p>This exploit suggests that the most competent developers in this space, who always preached simple contracts, are not yet able to consistently write secure contracts.<p>Also, the OP states the importance of being able to update a contract. As of last year that meant the original contract MUST include a self-modifying code provision. Self-modifying code doesn&#x27;t align well with keeping your code simple.<p>As an aside, &quot;contracts&quot; are Ethereum&#x27;s raison d&#x27;être and the Ether currency value is largely based on adoption. Even though this exploit did not expose a flaw in the Ethereum block chain, the Ether sell-off is an expected consequence.<p>Lastly does anyone have a link to the original contract code and how it could be rewritten so that it isn&#x27;t vulnerable to this exploit ?<p>[1] <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=cahj4WJtp20" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=cahj4WJtp20</a> Q&amp;A at 42m44s is relevant.<p>Edit: corrected time stamp for above video
评论 #11929751 未加载
alttab将近 9 年前
Simple contracts then are only as scalable, reliable, and secure as the code that runs off the blockchain.<p>Arguably, that defeats the whole purpose because it is then who controls the code (since it is no longer decentralized), controls the contract.<p>If I&#x27;m reading this right (I&#x27;m not 100% sure of that), this is the equivalent almost of not running a blockchain at all (if the idea is taken to its finality).<p>Storing the who and the what of contracts has never really been the issue, its been the execution and the honoring of the contract that man has not yet solved.<p>But centralizing the code that runs the contracts, and taking it off the blockchain doesn&#x27;t sound like the way to do it.
评论 #11929389 未加载
评论 #11929409 未加载
评论 #11929365 未加载
nzoschke将近 9 年前
As a software engineer everything here rings true to me.<p>Use as simple of tools as possible when programming and offer many ways for mere humans to change code and review correctness and review, approve and roll back critical transactions.<p>But this sounds effectively like the status quo with credit cards and Kickstarter.<p>So I&#x27;m not sure what a blockchain adds other than a different platform and maintainers than the existing financial and group purchasing corporations.
brbsix将近 9 年前
The AI equivalent to a recursive call bug are self-replicating Von Neumann probe paperclip maximixers that consume the entire universe. We&#x27;re going to be in a world of hurt if we aren&#x27;t able to sort this out. It&#x27;s pretty essential that machines are able to discern our intent or the spirit of our contracts one way or another.
评论 #11929808 未加载
cyrillic将近 9 年前
If the contract code can be upgraded by the majority of involved parties, it would be simple to buy 51% of the voting power and change the code to pay out everything else. Each takeover would double your wallet. Am I missing something here?
评论 #11930033 未加载
jcoffland将近 9 年前
If simple contracts, where much of the code is off chain, are to be the way of things it begs the question, why do we even need Turing complete contacts in the first place. A blockchain could be created which has a few fixed rules which enable the basics of a DAO with much lower risk.
simpleblend将近 9 年前
I ended up writing an article explaining my position on the whole thing: <a href="https:&#x2F;&#x2F;blog.simpleblend.net&#x2F;dao-attack-whos-blame&#x2F;" rel="nofollow">https:&#x2F;&#x2F;blog.simpleblend.net&#x2F;dao-attack-whos-blame&#x2F;</a>
modarts将近 9 年前
Thought this was a commentary on the poor API contracts exposed by data access objects
jawatson将近 9 年前
I may be stepping outside of my area of expertise, but doesn&#x27;t this seem like a perfect place to apply formal verification tools? As long as the contract isn&#x27;t too long, it should be possible to ensure that the implementation exactly matches the specification.
ybroze将近 9 年前
I really wanted to know about the Data Access Object.
Aelinsaar将近 9 年前
Just from reading commentators here at HN, it doesn&#x27;t seem like these issues were unforeseen. Rather, it seemed that whatever intense optimism exists around cryptocurrencies is capable of overwhelming investor sense in return for the promise of some ideological &quot;win&quot;.
评论 #11930439 未加载
评论 #11929564 未加载
评论 #11930587 未加载
评论 #11929720 未加载
评论 #11929845 未加载
draw_down将近 9 年前
Code is law! Ohh, ummm, err, uhhh, except when we say it&#x27;s not.