Live data from Hacker News

Zerocoin implementation bug

zcoin.io

51–60 of 142 posts

Re: Zerocoin implementation bug

#51

Earlier quoted context omitted.

> how superior centralized systems are Tell us? Because around here, I saw a huge number of bank fraud basically unpunished. "Yes those guys duplicated your SIM and stole all your funds. Too bad for you since we're not going to even try to catch them." Centralized systems might be efficient but the rule is, they don't care about you, so it's not your problems that they're going to solve. At least I can have some fait…

Code is law until well connected people need a bailout

Law is code until well connected people need a bailout.

Re: Zerocoin implementation bug

#52

Earlier quoted context omitted.

Seems very unlikely since it would inevitably cause many to lose faith in the currency. If they really want to cash out, they can just do what almost every other upstart cryptocurrency founder does and make it clear they're taking some of the pie.

If they just want out, the things that happen to the currency don't matter to them - they're already gone.

That's true, but if this was the epic exit scam they were planning for so many years, it's a bit disappointing.

Re: Zerocoin implementation bug

#53
post #31

Exploiting such a tiny bug is damn impressive if you ask me. The bloke who pulled this off deserves the cash.

Unless the "bug" was inserted by a developer...

I'm really curious to see the "single character" in question and assess whether it might have been intentional.

Re: Zerocoin implementation bug

#54

Let me get this straight. Zerocoin has a bug, money gets stolen, the bug is fixed. Everyone in the comments lose their shit and call doom and gloom for all cryptocurrencies. The experiment is failed, centralization was right all along! Meanwhile, centralized systems like credit cards are stolen en masse, identity theft abounds, anybody can file your taxes with the IRS and collect your refund, and an ACH can be initia…

Stating the obvious here, but...

Fiat financial security is based on monitoring, paper trails, and legal consequences for fraud. Yes, you can initiate a fraudulent ACH knowing only the numbers printed on a check you received, but you'll probably end up in jail for it. It's far from perfect but it mostly works.

Cryptocurrency intentionally doesn't have any paper trails. Anonymity is the selling point. If you find a bug in the code and exploit it, the anonymity protects you and you likely won't be caught. That means that security depends entirely on the code (and the theory!) being correct.

So yes, when bugs in fact lead to massive amounts of money being lost... some point are going to argue that cryptocurrency may not be a good idea.

(Note: My personal opinion is mixed.)

> Zerocoin has a bug, money gets stolen, the bug is fixed.

You say this as if it isn't a big deal. Sure, the bug is fixed, but the attacker essentially stole 25% of everyone else's zcoin (via inflation), and fixing the bug doesn't bring any of it back. That seems like a big deal to me.

Re: Zerocoin implementation bug

#55

Earlier quoted context omitted.

Better look at commits. I am not familiar with their code base, but latest commit seems like a bugfix: https://github.com/zcoinofficial/zcoin/commit/33796c839f7d4d...

So... were's a unit test to make sure this never happens again?

I rather actually see a real comment if there is no time to create a unit test.

Why does changing ZQ_PEDERSEN to ZQ_WILLIAMSON fix the bug?

Having meaningful named constants would make much more sense.

Edit: On full view of the code, the bug could be avoid if they broke out the if blocks into their own function, and to prevent "typo" errors, it would be good to have a local variable named current_demoniation = demoniationX, and then reference that local variable instead of referencing the constant everytime.

Re: Zerocoin implementation bug

#56
post #54

Let me get this straight. Zerocoin has a bug, money gets stolen, the bug is fixed. Everyone in the comments lose their shit and call doom and gloom for all cryptocurrencies. The experiment is failed, centralization was right all along! Meanwhile, centralized systems like credit cards are stolen en masse, identity theft abounds, anybody can file your taxes with the IRS and collect your refund, and an ACH can be initia…

Stating the obvious here, but... Fiat financial security is based on monitoring, paper trails, and legal consequences for fraud. Yes, you can initiate a fraudulent ACH knowing only the numbers printed on a check you received, but you'll probably end up in jail for it. It's far from perfect but it mostly works. Cryptocurrency intentionally doesn't have any paper trails. Anonymity is the selling point. If you find a bu…

Actually the whole point of the distributed blockchain is that there's a very public paper trail. The only hope for anonymity is obfuscating the movement of value through the blockchain, which can be accomplished to varying degrees depending on the sophistication of who is trying to track you. If your theft is high profile enough then you'll have a good deal of trouble liquidating your funds anonymously.

Re: Zerocoin implementation bug

#57
post #10

Anyone know which line of code they're talking about? I took a glance at their Github bug tracker and couldn't find any references to this bug. [0] https://github.com/zcoinofficial/zcoin/issues?q=is%3Aissue+i...

Better look at commits. I am not familiar with their code base, but latest commit seems like a bugfix: https://github.com/zcoinofficial/zcoin/commit/33796c839f7d4d...

Actually I think this might have been the fix.

https://github.com/zcoinofficial/zcoin/commit/584e1c60617d59...

Re: Zerocoin implementation bug

#58
post #18
post #12

The current market cap of Zcoin is 1,538 BTC [0], so this person created 1/4 of all the coins in circulation (410 BTC), and these guys are saying: "We knew we were being attacked when we saw that the total mint transactions did not match up with the total spend transactions". It took them way too long to realize that they were being outsmarted. EDIT: u/aftbit also posted this on the thread: "They even cited the abili…

Or alternatively, the developers designed this hard-to-find typo/bug years ago and have now just quietly cashed out.

Making a currency is already a gold mine. Mine the first 100k coins and hide them for 5 years.

Re: Zerocoin implementation bug

#59
post #54

Let me get this straight. Zerocoin has a bug, money gets stolen, the bug is fixed. Everyone in the comments lose their shit and call doom and gloom for all cryptocurrencies. The experiment is failed, centralization was right all along! Meanwhile, centralized systems like credit cards are stolen en masse, identity theft abounds, anybody can file your taxes with the IRS and collect your refund, and an ACH can be initia…

Stating the obvious here, but... Fiat financial security is based on monitoring, paper trails, and legal consequences for fraud. Yes, you can initiate a fraudulent ACH knowing only the numbers printed on a check you received, but you'll probably end up in jail for it. It's far from perfect but it mostly works. Cryptocurrency intentionally doesn't have any paper trails. Anonymity is the selling point. If you find a bu…

Yes, the security of the traditional financial system is largely based around the ability to reverse transactions.

One time I was transferring money from one of my accounts into a trading institution. Except by mistake, I was looking at one of my parents' checks instead of my own. I typed the wrong account number. Only after my parents noticed the unexplained withdrawal of a five figure sum, and called the bank to reverse it, was the mistake detected.

Re: Zerocoin implementation bug

#60
post #38
post #23

Earlier quoted context omitted.

Well yes, they were not wrong to cite the ability to detect hacks like this as a feature over zcash. This same class of error could exist in zcash and we would never know . We know it happened here because of the ability to audit.

You are completely right, I hadn't considered that. This is what Zcash has to say about it: Since the value sent between shielded addresses is private, how can we determine the number ZEC in circulation? Currently, we know that every miner validates every transaction, and each transaction comes with a zero-knowledge proof that it doesn't violate conservation-of-money (i.e. a proof that the money coming out of the tra…

This type of challenge is implicit in any cryptocurrency with strong confidentiality (i.e. which conceals the amount being transferred from public view) unless you trust the "inputs-equal-outputs" proving mechanism (which, in Zcash's case, is the zk-SNARK that accompanies a shielded transaction).

One potential solution is to periodically require that all coins be unshielded (i.e. sent to a t-address) and passed through a turnstile mechanism (thus allowing them to be counted). After a reasonable amount of time, a new consensus rule kicks in that prevents coins from being spent unless/until they've been put through the turnstile. That would effectively allow for a full audit of the monetary base without compromising privacy.

Post reply on HN