Live data from Hacker News

Missing line in a smart contract leads to $10M hack

rekt.news

121–130 of 333 posts

Re: Missing line in a smart contract leads to $10M hack

#121

Earlier quoted context omitted.

What is the purpose of Solidity? Why did there need to be a new language for interacting with the Ethereum Virtual Machine? This really couldn't be accomplished by a python SDK?

Solidity is a DSL. DSLs have their purposes and this happened to be a correct purpose. It just also happens to be that Solidity is a terribly designed language.

In what way is Solidity terribly designed?

Re: Missing line in a smart contract leads to $10M hack

#122
post #96

Earlier quoted context omitted.

"That the legal system has no say over contracts, " An agreement is an agreement subject to laws and jurisdiction. There's no avoiding that. It will be interesting to see how this plays out in the courts.

If distributed and decentralized it also runs across a common issue with courts - the ‘make me’ problem. If someone buys product x from seller y, which is based on some decentralized ‘contract’ which is defacto enforced by every node of the network independently - and that product then produces a unjust outcome. You go to court, but what if Y is just a node on the network? And everyone involved is outside the courts…

I doubt the judge is going to care that the “contract” passed through a bunch of different peoples hands (nodes in a network). They could still fine the seller or order them to return the funds to X.

If Y can’t be hauled into court because they are in another country or you just don’t know their identity, well that isn’t a problem specific to these “distributed smart contracts.”

Re: Missing line in a smart contract leads to $10M hack

#123
post #55

Many people are asking what happened, because the article does not go much into detail. The code is there (linked in the article): https://bscscan.com/address/0x7a8ac384d3a9086afcc13eb58e9091... After spending 2min on it and using this hint from the article: > The affected pool contract had an initialize() function that should have been activated after deployment. > The line: initialized = true; is missing from the f…

so where does one draw the line between theft and just doing what the code allows? I wonder in the future crypto courts is the defense, "your honor, the code allowed me to call initialize again, they specifically didn't set it to true." going to fly? Or will you have to prove that the 10 mil you now have was intended to be given to you and your "victim" isn't a victim at all.

In the future I think smart contracts will be standardized - these kinds of things won’t happen unless you’re trying something new. If that’s the case there will probably be services/testnets to properly vet it before launching on a mainnet.

Re: Missing line in a smart contract leads to $10M hack

#124
post #112

Earlier quoted context omitted.

> because nobody likes to lose their live savings because they missed a semicolon. Yeah, but shouldn't it be possible that these things will be avoided by confirming the validity of the code with theorem provers such as Coq, Lean, or something similar, at some point in the not too distant future? That's what I've been wondering, without currently having any stakes in the game (and probably not until there's compellin…

Theorem provers require code for defining what you want to prove and the method through which you reach said proof. Proofs and theorems can have bugs.

But aren't proofs exact in what they state? So it wouldn't be the proof that would be faulty. It'd be the interpretation of what somebody thinks the proof means to them, and that'd be something you could entirely objectively reason/work on.

Re: Missing line in a smart contract leads to $10M hack

#125
post #55

Many people are asking what happened, because the article does not go much into detail. The code is there (linked in the article): https://bscscan.com/address/0x7a8ac384d3a9086afcc13eb58e9091... After spending 2min on it and using this hint from the article: > The affected pool contract had an initialize() function that should have been activated after deployment. > The line: initialized = true; is missing from the f…

so where does one draw the line between theft and just doing what the code allows? I wonder in the future crypto courts is the defense, "your honor, the code allowed me to call initialize again, they specifically didn't set it to true." going to fly? Or will you have to prove that the 10 mil you now have was intended to be given to you and your "victim" isn't a victim at all.

The legal system isn't a computer that implements the law strictly to the letter based on only factual information. There are "reasonable person" standards, allowance/tolerance for mistakes, etc.

Relevant to this discussion is rules covering mistaken deposits to a bank account: recipients are obliged to return the assets, not shrug their shoulders and use the cash while they proclaim "Bank's fault; they're responsible!"

Re: Missing line in a smart contract leads to $10M hack

#126
post #55

Many people are asking what happened, because the article does not go much into detail. The code is there (linked in the article): https://bscscan.com/address/0x7a8ac384d3a9086afcc13eb58e9091... After spending 2min on it and using this hint from the article: > The affected pool contract had an initialize() function that should have been activated after deployment. > The line: initialized = true; is missing from the f…

so where does one draw the line between theft and just doing what the code allows? I wonder in the future crypto courts is the defense, "your honor, the code allowed me to call initialize again, they specifically didn't set it to true." going to fly? Or will you have to prove that the 10 mil you now have was intended to be given to you and your "victim" isn't a victim at all.

I don't follow any of this too closely, but I thought the whole idea was to get rid of courts by using precisely codified contracts?

What's the advantage if the result is the same system as before (lawsuits, courts, etc.) with added complexity of "smart contracts"?

Re: Missing line in a smart contract leads to $10M hack

#127
post #55

Many people are asking what happened, because the article does not go much into detail. The code is there (linked in the article): https://bscscan.com/address/0x7a8ac384d3a9086afcc13eb58e9091... After spending 2min on it and using this hint from the article: > The affected pool contract had an initialize() function that should have been activated after deployment. > The line: initialized = true; is missing from the f…

so where does one draw the line between theft and just doing what the code allows? I wonder in the future crypto courts is the defense, "your honor, the code allowed me to call initialize again, they specifically didn't set it to true." going to fly? Or will you have to prove that the 10 mil you now have was intended to be given to you and your "victim" isn't a victim at all.

All exploits are technically some version of “just doing what the code allows”, I don’t see how that would change whether or not a hack/theft actually occurred.

Re: Missing line in a smart contract leads to $10M hack

#128

Earlier quoted context omitted.

so where does one draw the line between theft and just doing what the code allows? I wonder in the future crypto courts is the defense, "your honor, the code allowed me to call initialize again, they specifically didn't set it to true." going to fly? Or will you have to prove that the 10 mil you now have was intended to be given to you and your "victim" isn't a victim at all.

if it went to court, i am guessing presuambly under a plea deal the hacker would be required give back all or most of the crpyto to rectify the 'mistake;' if not, it would prove intent to steal . For example, there is the 2005 Sammy MySpace XSS incident. Technically, his code was interpreted by Myspace as valid CSS/html, but was still guilty due to intent.

[deleted]

Re: Missing line in a smart contract leads to $10M hack

#129
post #55

Many people are asking what happened, because the article does not go much into detail. The code is there (linked in the article): https://bscscan.com/address/0x7a8ac384d3a9086afcc13eb58e9091... After spending 2min on it and using this hint from the article: > The affected pool contract had an initialize() function that should have been activated after deployment. > The line: initialized = true; is missing from the f…

so where does one draw the line between theft and just doing what the code allows? I wonder in the future crypto courts is the defense, "your honor, the code allowed me to call initialize again, they specifically didn't set it to true." going to fly? Or will you have to prove that the 10 mil you now have was intended to be given to you and your "victim" isn't a victim at all.

Proponents of Ethereum will say that smart contracts obviate the need for courts. I don't think this sort of Ethereum bug/hack thing has ever shown up in the court system yet. I'm sure someone will bring a case if they know who did it. If gaining access to someone's system using default credentials or no credentials is a violation of the CFAA then I'm sure this is as well.

Re: Missing line in a smart contract leads to $10M hack

#130
post #96

Earlier quoted context omitted.

"That the legal system has no say over contracts, " An agreement is an agreement subject to laws and jurisdiction. There's no avoiding that. It will be interesting to see how this plays out in the courts.

If distributed and decentralized it also runs across a common issue with courts - the ‘make me’ problem. If someone buys product x from seller y, which is based on some decentralized ‘contract’ which is defacto enforced by every node of the network independently - and that product then produces a unjust outcome. You go to court, but what if Y is just a node on the network? And everyone involved is outside the courts…

If a US or EU court finds participants of said node criminally or financially liable and the political will exists (which will happen when someone important enough gets screwed over by a bad contract) they may be deported, face criminal prosecution, be banned from transacting with US financial entities, etc.

Those things are not a small deal.

Post reply on HN