# Zcash Counterfeiting Vulnerability Successfully Remediated

**URL:** <https://forum.zcashcommunity.com/t/zcash-counterfeiting-vulnerability-successfully-remediated/32671>\
**Category:** General\
**Created:** [February 5, 2019, 3:57pm UTC](https://forum.zcashcommunity.com/t/zcash-counterfeiting-vulnerability-successfully-remediated/32671 "2019-02-05T15:57:37Z")\
**Posts on this page:** 20\
**Page:** 4

<div class="post-metadata">

**Author:** ![boxalex](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/boxalex/32/14872_2.png) [@boxalex](https://forum.zcashcommunity.com/u/boxalex)\
**Post date:** [March 1, 2019, 7:25pm UTC](https://forum.zcashcommunity.com/t/zcash-counterfeiting-vulnerability-successfully-remediated/32671/62 "2019-03-01T19:25:29Z")

</div>

Just out of curiousity and in general, why is it more likely that an exchange would be choosen?  
I mean IF someone has a direct buyer over the counter which pays either in cash or BTC it would be the perfect solution for the counterfier, not?

---

<div class="post-metadata">

**Author:** ![paige](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/paige/32/31152_2.png) [@paige](https://forum.zcashcommunity.com/u/paige)\
**Post date:** [March 1, 2019, 8:50pm UTC](https://forum.zcashcommunity.com/t/zcash-counterfeiting-vulnerability-successfully-remediated/32671/63 "2019-03-01T20:50:08Z")

</div>

It’s more likely simply because exchanges are the easier route. My comment didn’t deny the chance that an attacker could have established a direct buyer.

---

<div class="post-metadata">

**Author:** ![jmsjsph](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/jmsjsph/32/16507_2.png) [@jmsjsph](https://forum.zcashcommunity.com/u/jmsjsph)\
**Post date:** [March 3, 2019, 3:21am UTC](https://forum.zcashcommunity.com/t/zcash-counterfeiting-vulnerability-successfully-remediated/32671/64 "2019-03-03T03:21:58Z")

</div>

> [@paige](#):
>
> If counterfeiting occurred prior to the fix in Sapling, the attacker could have sold the counterfeit coins to someone directly for bitcoin but it’s more likely that they would have moved them to a transparent address for trading on an exchange if they wanted bitcoin or another crypto since exchanges do not yet implement shielded addresses.

It’s possible that counterfeit coins, if any, could have been moved into a shielded address before the turnstile was implemented, in which case they are beyond traceability, right. So, there could be, say, 5 million ZEC in a shielded address waiting for total ZEC issuance to reach multi-millions?

---

<div class="post-metadata">

**Author:** ![garethtdavies](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/garethtdavies/32/210_2.png) [@garethtdavies](https://forum.zcashcommunity.com/u/garethtdavies)\
**Post date:** [March 3, 2019, 3:41am UTC](https://forum.zcashcommunity.com/t/zcash-counterfeiting-vulnerability-successfully-remediated/32671/65 "2019-03-03T03:41:31Z")

</div>

So the majority of those hypothetical 5 million ZEC would have to live in the Sprout pool as that’s where the vulnerability was (it doesn’t exist in Sapling). Currently there are ~200k in the Sprout shielded pool and ~120k in the Sapling one (see [https://zcha.in/statistics/network](https://zcha.in/statistics/network)). If anyone tried to move more than 200k counterfeit ZEC out of the Sprout pool the total would go negative and it would be immediately obvious what had happened and unlikely anyone could realise anything for their Sprout ZEC.

See [Sapling Addresses & Turnstile Migration - Electric Coin Company](https://z.cash/blog/sapling-addresses-turnstile-migration/) for more.

---

<div class="post-metadata">

**Author:** ![joshs](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/joshs/32/13631_2.png) [@joshs](https://forum.zcashcommunity.com/u/joshs)\
**Post date:** [March 4, 2019, 5:49pm UTC](https://forum.zcashcommunity.com/t/zcash-counterfeiting-vulnerability-successfully-remediated/32671/66 "2019-03-04T17:49:16Z")

</div>

Beyond that, it is the ECCs policy to not allow the Sprout pool to go negative. [Defense Against Counterfeiting in Shielded Pools - Electric Coin Company](https://z.cash/blog/defense-against-counterfeiting-in-shielded-pools/)

---

<div class="post-metadata">

**Author:** ![boxalex](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/boxalex/32/14872_2.png) [@boxalex](https://forum.zcashcommunity.com/u/boxalex)\
**Post date:** [March 4, 2019, 11:15pm UTC](https://forum.zcashcommunity.com/t/zcash-counterfeiting-vulnerability-successfully-remediated/32671/67 "2019-03-04T23:15:03Z")

</div>

Just out of curiousity and hyptetically:

- what would be the measure(s) taken if let’s say in 1 year the sprout pool goes negatie due counterfeit that occuret 1-2 years earlier? Ok, if we see (hopefully not!) some day that the sprout pool goes negative that’s one thing, but what action would be taken if the source of counterfeit has happened longer time bevor? Could the source/mining pool/whatever even be identified 1-2 years later?

- what happens IF the counterfier for example buy 50,000 ZEC and counterfies 50,000 ZEC. If the bought 50,000 ZEC are sent to a shielded adress and the counterfeit 50,000 ZEC from the shielded adress to a transparent adress wouldn’t that, at least temporary, hide traces and the alarm bells?

- from the Blog Post regarding Defense agaisnt Counterfeiting: _If we are able to identify that the bug affects only a single shielded pool, we might choose to effectively deactivate that pool by invalidating any of its outgoing transactions._  
Question A: What if it affects several shielded pools as you mention only “a single pool”?  
Question B: What if it happened over longer time frames, let’s say daily 1,000 ZEC over 6 months?  
Question C: Reading the whole article at least 10x times i have the feeling that the defense is too much lagging as the counterfeit (attack) would only be visible/detectable some day just if and when the pool goes negative, not? Or do i miss something?

Again, just theoretical and hyptetical questions within IF cases…

---

<div class="post-metadata">

**Author:** ![joshs](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/joshs/32/13631_2.png) [@joshs](https://forum.zcashcommunity.com/u/joshs)\
**Post date:** [March 5, 2019, 2:03am UTC](https://forum.zcashcommunity.com/t/zcash-counterfeiting-vulnerability-successfully-remediated/32671/68 "2019-03-05T02:03:12Z")

</div>

Good questions. Let me try to clarify…

There is a bucket (Sprout pool). That bucket is different than other buckets (i.e. Sapling pool). Let’s say that we know that 100 ZEC in total has ever been placed into that bucket. If someone tries to take 101 ZEC out of the bucket, we know that counterfeiting had occurred sometime in the past. We know that 1 ZEC was created out of thin air at some point. So we don’t allow that transaction to occur.

However, if someone counterfeited 50 ZEC (or something less than 100 ZEC), they could take it out of the bucket that we know 100 ZEC was moved into. The bucket would now contain 50 ZEC, after their transfer. Now we believe there is 50 ZEC left in the bucket and no one would be allowed to take out more than the 50 ZEC remaining. Thus, the total monitory supply is protected.

Does that make any more sense?

Sorry for the confusion. We’ll publish another article in the near future with an attempt to be more clear.

---

<div class="post-metadata">

**Author:** ![tromp](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/tromp/32/522_2.png) [@tromp](https://forum.zcashcommunity.com/u/tromp)\
**Post date:** [March 5, 2019, 1:12pm UTC](https://forum.zcashcommunity.com/t/zcash-counterfeiting-vulnerability-successfully-remediated/32671/69 "2019-03-05T13:12:13Z")

</div>

> [@joshs](#):
>
> no one would be allowed to take out more than the 50 ZEC remaining.

If people are not allowed to take out the ZEC that they put into the Sprout pool, then I expect they will demand the Zcash company make them whole…

---

<div class="post-metadata">

**Author:** ![boxalex](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/boxalex/32/14872_2.png) [@boxalex](https://forum.zcashcommunity.com/u/boxalex)\
**Post date:** [March 5, 2019, 2:09pm UTC](https://forum.zcashcommunity.com/t/zcash-counterfeiting-vulnerability-successfully-remediated/32671/70 "2019-03-05T14:09:50Z")

</div>

That’s about what i had in mind when i wrote one of the questions above.

> what happens IF the counterfier for example buy 50,000 ZEC and counterfies 50,000 ZEC. If the bought 50,000 ZEC are sent to a shielded adress and the counterfeit 50,000 ZEC from the shielded adress to a transparent adress wouldn’t that, at least temporary, hide traces and the alarm bells?

In the meaning the counterfier could put these 50,000 legally bought with proof into the sprout pool. Pull out at the same time his counterfeit 50,000 ZEC and than have a legal claim on the ECC company if he can’t get out his real bought 50,000 ZEC, not?

---

<div class="post-metadata">

**Author:** ![ChileBob](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/chilebob/32/26546_2.png) [@ChileBob](https://forum.zcashcommunity.com/u/ChileBob)\
**Post date:** [March 5, 2019, 3:40pm UTC](https://forum.zcashcommunity.com/t/zcash-counterfeiting-vulnerability-successfully-remediated/32671/71 "2019-03-05T15:40:26Z")

</div>

…doubt that would work as they’ve already been told what would happen under those circumstances.

---

<div class="post-metadata">

**Author:** ![kek](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/kek/32/17068_2.png) [@kek](https://forum.zcashcommunity.com/u/kek)\
**Post date:** [March 5, 2019, 5:20pm UTC](https://forum.zcashcommunity.com/t/zcash-counterfeiting-vulnerability-successfully-remediated/32671/72 "2019-03-05T17:20:52Z")

</div>

bet a lot of zcash still in sprout pool are owned by dead ☠ people

---

<div class="post-metadata">

**Author:** ![ChileBob](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/chilebob/32/26546_2.png) [@ChileBob](https://forum.zcashcommunity.com/u/ChileBob)\
**Post date:** [March 5, 2019, 6:16pm UTC](https://forum.zcashcommunity.com/t/zcash-counterfeiting-vulnerability-successfully-remediated/32671/73 "2019-03-05T18:16:26Z")

</div>

Surprised the sprout pool hasn’t emptied faster, its not exactly hard to do.

---

<div class="post-metadata">

**Author:** ![Autotunafish](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/autotunafish/32/7827_2.png) [@Autotunafish](https://forum.zcashcommunity.com/u/Autotunafish)\
**Post date:** [March 5, 2019, 6:19pm UTC](https://forum.zcashcommunity.com/t/zcash-counterfeiting-vulnerability-successfully-remediated/32671/74 "2019-03-05T18:19:27Z")

</div>

Maybe not dead per say but the likelihood of it emptying completely is yea bout zip

---

<div class="post-metadata">

**Author:** ![boxalex](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/boxalex/32/14872_2.png) [@boxalex](https://forum.zcashcommunity.com/u/boxalex)\
**Post date:** [March 5, 2019, 8:20pm UTC](https://forum.zcashcommunity.com/t/zcash-counterfeiting-vulnerability-successfully-remediated/32671/75 "2019-03-05T20:20:22Z")

</div>

> [@ChileBob](#):
>
> …doubt that would work as they’ve already been told what would happen under those circumstances.

what have they been told? A counterfier wouldn’t pull the coins to the same wallet he has the bought coins. Means the claims would be from the buyer of the legit coins while the counterfied coins leaving the sprout pool would have been used allready. Just in theory in this example to check if the defense would be a working one in such case …

---

<div class="post-metadata">

**Author:** ![ChileBob](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/chilebob/32/26546_2.png) [@ChileBob](https://forum.zcashcommunity.com/u/ChileBob)\
**Post date:** [March 5, 2019, 8:28pm UTC](https://forum.zcashcommunity.com/t/zcash-counterfeiting-vulnerability-successfully-remediated/32671/76 "2019-03-05T20:28:01Z")

</div>

“What will happen to prevent the sprout pool going negative” is public knowledge already - joshs post for example, echoed in other places.

If someone tried to hold ECC liable I think they’d fail, many examples of ‘We told you so’… just my humble opinion of course (not a lawyer).

---

<div class="post-metadata">

**Author:** ![boxalex](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/boxalex/32/14872_2.png) [@boxalex](https://forum.zcashcommunity.com/u/boxalex)\
**Post date:** [March 5, 2019, 8:44pm UTC](https://forum.zcashcommunity.com/t/zcash-counterfeiting-vulnerability-successfully-remediated/32671/77 "2019-03-05T20:44:26Z")

</div>

Ok, i get now what you had in mind. But i doubt this will work that way. Let’s just for one second forget the counterfeit part but YOU, for whatever reason have 10,000 ZEC in the sprout pool. A sudden an unknow counterfier pulls his counterfeit ZEC and the sprout pool goes negative. Would mean you lost ALL your holdings without any vault other than having ZEC and having them in the sprout pool, which isn’t forbidden.  
Just my amateurish opinon on the legal side IF someone witholds legal bought ZEC, pretty sure there would be claims, leave alone maybe possible devastating community/holder feedback if the holdings of 100’s of small holders in the sprout pool are affected.

---

<div class="post-metadata">

**Author:** ![jmsjsph](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/jmsjsph/32/16507_2.png) [@jmsjsph](https://forum.zcashcommunity.com/u/jmsjsph)\
**Post date:** [March 6, 2019, 2:23am UTC](https://forum.zcashcommunity.com/t/zcash-counterfeiting-vulnerability-successfully-remediated/32671/78 "2019-03-06T02:23:42Z")

</div>

AHHH… I see. I was mixing the sequence of events up in my head assuming that…

…we know how much in the sprout shielded pool because it is the total issued minus the unshielded amount, right?

If the vulnerability was exploited, maintaining the shield means going through sapling’s turnstile.

The only other way to escape with the infinite zcash is to go to market. There are not many markets supporting shielded addresses. Of those that do (Rock, etc), I presume exorbitant volume was not evidenced.

So, I can keep calm and carry on…

---

<div class="post-metadata">

**Author:** ![garethtdavies](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/garethtdavies/32/210_2.png) [@garethtdavies](https://forum.zcashcommunity.com/u/garethtdavies)\
**Post date:** [March 6, 2019, 2:52am UTC](https://forum.zcashcommunity.com/t/zcash-counterfeiting-vulnerability-successfully-remediated/32671/79 "2019-03-06T02:52:49Z")

</div>

> [@jmsjsph](#):
>
> …we know how much in the sprout shielded pool because it is the total issued minus the unshielded amount, right?

There is the Sapling pool as well. It’s actually possible to measure what goes in/out of the pools (which is what zcashd does) as it must come from a transparent address so it is visible going in and out at the individual transaction level.

> [@jmsjsph](#):
>
> The only other way to escape with the infinite zcash is to go to market. There are not many markets supporting shielded addresses. Of those that do (Rock, etc), I presume exorbitant volume was not evidenced.

Right and if there are indeed exchanges that support Sprout addresses it’s possible an attacker could get away with some funds but it would still be detectable when whoever bought the coins moved them out of the Sprout pool. So it’s functionally little different to an attacker just moving them to a transparent address and selling them assuming they don’t make the pool go negative.

---

<div class="post-metadata">

**Author:** ![tromp](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/tromp/32/522_2.png) [@tromp](https://forum.zcashcommunity.com/u/tromp)\
**Post date:** [March 6, 2019, 4:24pm UTC](https://forum.zcashcommunity.com/t/zcash-counterfeiting-vulnerability-successfully-remediated/32671/80 "2019-03-06T16:24:55Z")

</div>

The turnstile has the side effect of making Zcash less than fungible; ZEC in the Sprout pool carries some risk of being non-redeemable.

Perhaps a majority of Sprout balances is inaccessible, as one would expect it to be moved out to eliminate said risk.

---

<div class="post-metadata">

**Author:** ![kek](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/kek/32/17068_2.png) [@kek](https://forum.zcashcommunity.com/u/kek)\
**Post date:** [March 6, 2019, 5:05pm UTC](https://forum.zcashcommunity.com/t/zcash-counterfeiting-vulnerability-successfully-remediated/32671/81 "2019-03-06T17:05:46Z")

</div>

“inaccessible” \<— that’s what i’m thinking

[Previous page](https://forum.zcashcommunity.com/t/zcash-counterfeiting-vulnerability-successfully-remediated/32671.md?page=3)
