Live data from Hacker News

Chasing the DAO Attacker’s Wake – A second exploit

pdaian.com

111–120 of 180 posts

Re: Chasing the DAO Attacker’s Wake – A second exploit

#111
post #30

As the article briefly suggests, this problem can be completely avoided if every method has no more than one external call and always puts it last. I'm messing around with contracts to do about a dozen different things, and it turns out to be easy to meet this restriction, as long as I'm willing to design the UI accordingly. (E.g. don't send money to lots of users in one step, just update their balances and make them…

Patchwork solutions won't cut it. "Solidity" is inherently unsuited for the task of safe and correct contract design.

Re: Chasing the DAO Attacker’s Wake – A second exploit

#112
post #99

With all this fuss over ethereum security flaws, can someone explain to me the practical use case for these smart contracts? I just don't understand where the benefit comes in. It seems like any type of contract that would be useful requires a human to qualify the meaning of the terms since these contracts cannot autonomously measure the state of the world. Even something as trivial as betting on sports requires defe…

Contracts I'm working on include variants of anti-theft vaulting, blind auctions, crowdfunding, person-to-person gambling, currencies, exchanges, and a simple implementation of Bitcoin's Lightning. None of them require external data. For those contracts that do, at least you're reducing the third-party trust to "provide accurate data" instead of "hold my funds without stealing them." To reduce trust in a single entit…

Stuff like blind auctions and gambling is somewhat constrained by the fact that Etherium applications have to be deterministic and their state information and transaction history has to be publicly visible.

Re: Chasing the DAO Attacker’s Wake – A second exploit

#113

Every article I see on etherium mentions the DAO. Not one of them explains what it means. Gotta love unexplained acronyms!

Okay, so let me preface this with a warning. This will be an imprecise analogy! This is just meant to be an aid to understanding. Obviously, there are nuances of the DAO that don't fit perfectly into this model.

Imagine a publicly owned company. It has a CEO, COO, CFO, board, and shareholders. Most decisions are made by the chief officers of the company, and these officers are kept in check by the board of directors. Some shareholders can vote on certain decisions as well if they have the right kind of stock, but for the most part, consensus isn't really needed for most decisions. Day to day operations are handled by the COO, finances are handled by the CFO, and the CEO sort of steers the company as a whole. Most of the time, the board is hand picked to make sure that this centralization of power remains intact. In most companies, shareholders exist primarily to cash in on their own stake in the company either through dividends or by eventually selling their stock. They don't really have to make decisions most of the time, they just provide the capital. The board is there to make sure that their best interests are being catered to basically.

The DAO is almost as if you got rid of management entirely. With the DAO, you have a distributed consensus platform for all shareholders to participate in. Decisions are made democratically through a proposal system ("Should we invest x amount of Ether into y?"), and regulated semi-autonomously by Ethereum contracts. I say semi-autonomously because there is a sort of "board of directors" that takes proposals and filters them out to make sure that a) there aren't too many proposals to be voting on, and b) all the proposals to be voted on are reasonable. You can also split off your stake in the DAO into a smaller DAO if you feel your voice isn't being heard or you don't like the direction the current DAO is going. This is what was attacked the first time IIRC.

There's a whole lot more to it of course, but that's basically how I understand it.

Re: Chasing the DAO Attacker’s Wake – A second exploit

#114
post #94
post #67

Earlier quoted context omitted.

> What are you talking about? Please don't be uncivil. It's damaging to collegial conversation, and it's against the rules ( https://news.ycombinator.com/newsguidelines.html ). Please edit such stuff out of your comments here.

edited.

Appreciated!

Re: Chasing the DAO Attacker’s Wake – A second exploit

#115
post #99

Earlier quoted context omitted.

Contracts I'm working on include variants of anti-theft vaulting, blind auctions, crowdfunding, person-to-person gambling, currencies, exchanges, and a simple implementation of Bitcoin's Lightning. None of them require external data. For those contracts that do, at least you're reducing the third-party trust to "provide accurate data" instead of "hold my funds without stealing them." To reduce trust in a single entit…

> anti-theft vaulting Can you go into more details about this? > blind auctions Or this? How does the contract ensure that the winner of the auction receives what they have purchased? > crowdfunding In what respects beyond simply collecting funds? How does the contract judge that the terms of the funding are adhered to or ensure that the crowdfunders receive whatever it is they are entitled to as funders? > person-to…

So this gets into the difference between the rhetoric about smart contracts, and what they actually do. Obviously a smart contract can't ensure that an auction winner or crowdfunder gets the item. At best there could be some kind of reputation system. But to enforce something in the real world, you'd have to get an actual court involved. The smart contract removes the need to have an auctioneer running the auction and handling funds, that's all.

But that still means that, for example, when I'm trying to implement a new variant on crowdfunding, I can write the whole backend in several pages of code and just publish it, instead of renting servers, administering databases, signing up with a payment provider and having to comply with its terms of service.

An example of a vault is this scheme: http://hackingdistributed.com/2016/02/26/how-to-implement-se...

...which some researchers proposed for Bitcoin, saying it'd be "easy" to implement with a hard fork adding a new opcode. I implemented the same scheme in a smart contract and it took 20 minutes.

Sports betting needs third-party data, but casino games don't.

Re: Chasing the DAO Attacker’s Wake – A second exploit

#116

With all this fuss over ethereum security flaws, can someone explain to me the practical use case for these smart contracts? I just don't understand where the benefit comes in. It seems like any type of contract that would be useful requires a human to qualify the meaning of the terms since these contracts cannot autonomously measure the state of the world. Even something as trivial as betting on sports requires defe…

I think the basic idea is that with Bitcoin, you sort of have to hack at it to achieve any unintended functionality. These things can and do exist in the Bitcoin world, but when you get down to it, Bitcoin is meant to be a currency; anything built on top of that is just a hack that happens to work. Ethereum and its smart contracts, on the other hand, are structured to handle these sorts of extensions by design. There…

This makes sense, but I guess I just don't see much practical utility beyond what is already achievable and less prone to security flaws with bitcoin. There just doesn't seem to be much useful code that can come out of "money as variables in a program" since just about everything related to how humans intend to distribute money hinges on the facts of the real world for which the program must rely on humans to input.

Re: Chasing the DAO Attacker’s Wake – A second exploit

#117

Earlier quoted context omitted.

> anti-theft vaulting Can you go into more details about this? > blind auctions Or this? How does the contract ensure that the winner of the auction receives what they have purchased? > crowdfunding In what respects beyond simply collecting funds? How does the contract judge that the terms of the funding are adhered to or ensure that the crowdfunders receive whatever it is they are entitled to as funders? > person-to…

So this gets into the difference between the rhetoric about smart contracts, and what they actually do. Obviously a smart contract can't ensure that an auction winner or crowdfunder gets the item. At best there could be some kind of reputation system. But to enforce something in the real world, you'd have to get an actual court involved. The smart contract removes the need to have an auctioneer running the auction an…

Thanks for the reply. I think I understand what you're getting at.

Re: Chasing the DAO Attacker’s Wake – A second exploit

#118
post #90

Earlier quoted context omitted.

Some simple use cases: - a multisignature wallet, that requires more than one person to sign off on a transaction before it can happen. - payment schedules or any kind of transaction that does not function exactly like a one time, full size payment (payments, debt, etc). - more ambitious ideas, like the Slock.it ones, involve smart locks that hold funds while granting use to a resource, and only return them after acc…

> a multisignature wallet, that requires more than one person to sign off on a transaction before it can happen. This is possible with bitcoin isn't it? What does the added complexity of ethereum bring to the table? > payment schedules or any kind of transaction that does not function exactly like a one time, full size payment This also seems possible with bitcoin, but it's also a problem that has already been solved…

> netflix debits my credit card every month, why would I use a cryptocurrency solution instead?

Presumably you trust Netflix enough to give them your credit card details, and you trust your credit card company enough to pay them when they present you with a list of transactions they claim you made.

That's fine for such big, entrenched players; presumably you wouldn't put as much trust in some unknown, anonymous online entity. (Although presumably trust in Ethereum isn't exactly high right now)

Re: Chasing the DAO Attacker’s Wake – A second exploit

#119
post #90

Earlier quoted context omitted.

Some simple use cases: - a multisignature wallet, that requires more than one person to sign off on a transaction before it can happen. - payment schedules or any kind of transaction that does not function exactly like a one time, full size payment (payments, debt, etc). - more ambitious ideas, like the Slock.it ones, involve smart locks that hold funds while granting use to a resource, and only return them after acc…

> a multisignature wallet, that requires more than one person to sign off on a transaction before it can happen. This is possible with bitcoin isn't it? What does the added complexity of ethereum bring to the table? > payment schedules or any kind of transaction that does not function exactly like a one time, full size payment This also seems possible with bitcoin, but it's also a problem that has already been solved…

>Can you go into specifics here? I'm not really understanding.

It sounds like a security deposit, of a type. For example, I had to leave one of my shoes at the front counter of a store that hosted a small gaming LAN in the back.

Re: Chasing the DAO Attacker’s Wake – A second exploit

#120
Any code that calls arbitrary callbacks is prone to failure. The context in which a callback is called matters.

Calling a callback at the end of a method avoids interfering with the caller's state but ignores the state of the caller's caller.

An ethereum contract will only be tractably analyzable if it avoids dynamically invoking arbitrary callbacks.

Post reply on HN