This week, three cryptocurrencies — Bitcoin Gold, Verge, and Monacoin — were hit with a rarely-seen cyber attack. The hack, called a 51 percent attack, allowed the hackers to steal about $20 million, mostly from the Bitcoin Gold ledger.

If you’ve never heard of a 51 percent attack, that’s because for the most part, crypto experts weren’t particularly worried about them before now, according to Motherboard. These attacks weren’t very common and had only affected very small coins (there were two attacks just for a few thousand dollars in 2016), in part because there had been only a few cryptocurrencies out there. And the ones that did exist were so popular that they would have been difficult to commandeer.

But it’s no coincidence that last Sunday’s episode of the HBO show “Silicon Valley,” featured a 51 percent attack, which sidelined the characters’ recently-launched cryptocurrency. A few days later, the real-life hacks started happening.

A 51 percent attack works when someone takes over the majority of a blockchain network’s computational power. This control allows the person or group behind the attack to start their own, private ledger for the particular cryptocurrency. With this majority share of the network, the person in control can buy something with their cryptocurrency (or cash out) on the public, official ledger, and then send out their private ledger, which other computers on the network adopt as the real thing. Now it’s like they never spent their cryptocurrency at all, but still benefitted from the transaction — essentially double-spending whatever coin they’ve taken over. While they control the network, a person conducting a 51 percent attack can also make sure they get all the newly mined coin that appears on the network.

So far, it’s not clear who committed the cybercrime. And there’s no indication that authorities have yet started looking into it.

In the future, smaller cryptocurrency blockchains may be able to protect themselves by upping the amount of computational power required to buy or sell the currency. While that wouldn’t make them invulnerable to 51 percent attacks, hackers would need many more servers and computing power to take over such a big chunk of the network.

While it’s hard to assign blame for this spate of attacks on the episode of “Silicon Valley,” it doesn’t seem like this is a coincidence, either. Lots of startups eerily similar to inane businesses from the show have popped up IRL, which makes it quite possible that someone watching it was inspired to bang out some quick code and make a quick buck.