320 points · by jmsflknr · 4y ago · 276 comments
If you deal with money use PostgreSQL + SERIALIZABLE transaction isolation level to be sure.
More in PostgreSQL documentation https://www.postgresql.org/docs/current/transaction-iso.html
Also Zhong was 22 years old script kiddie when he hacked Silk Road. Any smart criminal would have left United States long time ago if you sit on the top of $3B stash.
https://dev.mysql.com/doc/refman/8.0/en/innodb-transaction-i... https://mariadb.com/kb/en/mariadb-transactions-and-isolation...
[0] https://ronaldbradford.com/blog/understanding-mysql-innodb-t...
Please pick a database (relational or otherwise) with ACID transactions and replication, buy at least two different textbooks on that specific database, read both, do any exercises they suggest, and then decide whether you still want to build that system. If yes, then cool: don't hold me responsible if anything goes wrong, but you need to learn somehow.
Yes, it's possible to build systems like that on non-ACID-compliant databases, or without using the ACID functionality. It's much harder, though, and you really must understand what you're giving up in order to have a reasonable chance of success.
$balance = sql_query(“SELECT balance FROM accounts WHERE account_id = “ . $account_id);
if ($withdrawal_amount < $balance) {
withdraw_funds($account_id, $withdrawal_amount);
}
The correct solution of course requires putting the checks in an ACID transaction along with the account balance updating. This requires more work upfront (SQL is harder to write than PHP) and an impatient amateur coder probably didn’t think of it. Also I’m guessing they didn’t properly index all the DB columns and this made transactions take longer which exacerbates race conditions.I alerted the exchange operator and he let me keep the 10$.
Seems to me that REPEATABLE READ mode should be sufficient, but I'm not sure.
This feels way less like “pursing justice” and more like trying to track down everything the just I’ve department can seize and auction off. If Bitcoin hadn’t drastically increased in value since the original event, would this have ever been tracked down?
I cant even count the number of much more consumer-impacting crypto-related frauds, crimes, and hacks from the last 3 years that would be more deserving of justice department attention, rather than focusing resources and attention on a double withdrawal bug from an illegal marketplace from a decade ago.
1. I suspect that the justice system feels that, as a matter of principle, they ought to keep the heat on darknet markets generally. That getting darknet market related arrests in the news has deterrent value, and shows they're doing their job. Obviously, arresting operators or big sellers would be even better - but any darknet market arrests are better than none at all.
2. They recovered $3.3 Billion, so the ROI on agents' time is probably pretty good. American society loves it when police departments are funded with criminals' money, through aggressive traffic ticketing and civil forfeiture! So this is really no different to fining a driver for doing 55 in a 54, except with much less police time used. From a certain perspective, this is one of the most productive uses of resources the department could possibly make.
2. People largely hate when cops find someone for doing 55 in a 54, so it’s probably not a great example, but I think supports my point. This isn’t about solving an actual crime, but about optimizing for how much money the justice department is able to collect. I said elsewhere that this would be more reasonable as a tax investigation, but it’s not, and it’s (in my opinion) a pretty bad precedent that investigations should be prioritized by “how much cash can we seize”
It was also a tax investigation, which is why IRS criminal investigatoes were involved, and there clearly were tax violations involved, they just weren’t part of the plea bargain.
> it’s (in my opinion) a pretty bad precedent that investigations should be prioritized by “how much cash can we seize”
I agree that prioritizing prosecutions that way would be, but Zhong doesn’t seem to have particularly been a prosecutorial priority. OTOH, spending investigative resources to find know forfeitable assets under an existing conviction seems a perfectly sane and responsible use of resources
:)
It kind of sucks for him that he had to forfeit the Bitcoin and not just the dollar amount he stole at the time. I am sure if it was the other way around, and Bitcoin went to $0, they would take the historical dollar amount he stole instead.
However, he isn’t being charged with a tax crime. He’s being charged with “wire fraud” for double withdrawing from Silk Road.
If you're not going to track down $3.36B after a decade, you really shouldn't pursue thefts of less than $1M ever.
Just kidding, haha. I agree that many more recent events have been more impactful, and hopefully they’re pursuing those too.
I mean the sheer numbers of ICOs with somewhat notable people involved purely to make a quick buck would be a good place to start
Big withdraws suggests seller. Big deposits and withdraws without sales suggests launderer. Small deposits, or sales and big withdraws suggests insider.
Dude finally slipped up and got identified.
They found the kid in the process of looking for the missing forfeitable BTC from Silk Road. Which explains why the resources...
It's interesting how the defendant tried to hide his bitcoin holdings in very low-tech ways.
The utility ease of holding bitcoin is apparent with this seizure. What other asset could you hide the equivalent of $1B USD in a floor safe and a popcorn tin and without having to use a 3rd party custodian?
If another resident of Zhong's household had discarded the popcorn tin, he could have been out $1B. It's is difficult, but not impossible (see fat-finger transactions) to do that with other asset classes.
Impossible to prove he didn’t have his private keys backed up elsewhere.
Back in the day, the answer would have been bearer bonds, but they're no longer popular instruments.
The financial instrument of choice for movie heist villains from the 1970s to early 2000s.
https://en.wikipedia.org/wiki/Chiasso_financial_smuggling_ca...
> The total value of the counterfeit bonds was estimated at approximately one percent of total U.S. GDP in 2008
At least investment/corporate bonds usually expire, so the bearer ones eventually wash out.
(I understand these hardware wallets let you load up as many as you want.)
> U.S. Attorney Damian Williams said: “James Zhong committed wire fraud over a decade ago...."
The statute of limitations for mail fraud and wire fraud prosecutions is five years (18 U.S.C. § 3282), except for mail and wire fraud schemes that affect a financial institution, in which case the statute is ten years (18 U.S.C. § 3293).[1]
Lawyers please explain. Also, who was the victim here, and who reported the crime?
[1] https://www.justice.gov/archives/jm/criminal-resource-manual...
I’m not sure why you’re downplaying this. If I maliciously exploited a video game for serious financial gain today, there’s a good chance that will be a crime.
It is not legally a “recognized currency” now (“virtual currencies” are essentially treated as non-currency properties), and it was both property and had value before 2014.
The crime seems to have been discovered as part of the tracing of assets subject to seizure in the Ross Ulbricht cases, which is why the bukk of the assets were seized and filed for forfeiture as part of that case, and not the separate case against Zhong.
On the statute of limitations issue, its worth noting that limitations may be waived in a guilty plea, and that a defendant might do so to a lesser charge rather than facing trial on more or more serious charges (such as money laundering and/or tax fraud and/or evasion charges relating to the subsequent transactions involving the Bitcoin, which occurred at least as late as 2017, would be well within the 6-year SOL that would be applicable there.)
EDIT: To be clear, I haven’t seen a link to the Zhong plea bargain or any indictment it may have replaced (much less what prosecutors might have waived at his defense as potential charges that were never filed), so the above on the Statute of Limitations is observation of what is possible in general and how that might relate to the case, not an explanation necessarily of what did happen in the case. While there are other ways the statute of limitations might have applied differently in this case than it superficially would seem to (e.g., tolling for a request for.foreign evidence if some was used to ttace the funds) the way described above still seems most likely to me, in the absence of more facts.
The only reference I can find to what you're describing seems to apply to civil suits only, where the legitimate defendent name is substituted back in during discovery. It does not appear to be a stand-in in criminal investigations.
It is true that the news would probably use the larger number if BTC had gone up in price since then, but I suspect that the official statement would always quote the value at the time of seizure (perhaps with a parenthetical to highlight a greater present-day value).
It should be marked to value at time of the crime. Value of the property is often a metric used for setting the charges/punishment and he had no idea it would appreciate the way it did. He shouldn't get penalized for it appreciating.
May differ internationally but to my knowledge it works that way over most of the US.
Weird that he went through all this trouble to physically hide the wallets but did not use encryption...
He most likely voluntarily gave them the passwords and access as he turned himself in as well as turned over additional bitcoin.
If you thought KYC constraints were invasive today...
Even the USA as the largest economic market in the world couldn't kill crypto by seizing assets as there are dozens of other countries that will keep using crypto for the anti-corruption, stability, and efficiency benefits it provides. It's a lot like the internet where a country can ban or control it but ultimately it only harms their own citizens and prevents them from properly competing on the world stage.
If a criminal steals my bitcoin and spends it, everyone who accepts it and everyone who accepts it from them is taking delivery of stolen property, trivially traceable back to me. I'll want it back, because it is mine and was stolen.
https://en.wikipedia.org/wiki/Possession_of_stolen_goods
As a practical matter, if crypto continues to gain adoption, law must emerge to keep the ecosystem from getting jammed up.
And presumably, this is how he was caught. He hid his identity really well. The withdrawal of BCH eventually led to his downfall.
The feds pinned him on what appears to a mixup by the accused between his “unclean” and “clean” wallet wallets when dealing with a crypto broker with an IP that pointed to his house for several years.
Starts around 22 here: https://www.justice.gov/usao-sdny/press-release/file/1549821...
An interesting way to put it.
It's my understanding that in Texas it may even be possible that killing thieves is legal there in some circumstances as well.
Edit: perhaps I wasn't as explicit in the part to read between the lines. The police in US are oft perceived as being more likely to 'overlook' or consider it 'mutual combat' for acts against criminals. I don't think the analysis "that has nothing to do with them being criminal" is really a fair conclusion.
[0] https://torontosun.com/news/world/no-charges-in-deadly-chica...
If past history is any guide, the proceeds will be auctioned, making DOJ the largest government-sponsored bitcoin dealer in the world.
Lotta crypto brokers look down on VPNs for obvious reasons.
But they seemed to have gotten their wallets mixed up and that gave away their identity on of one of the early 10k Bitcoin wallets.
That’s exactly my point ;)
If they overwhelm liquidity, the price can collapse because they can always underbid those trying to sell.
The US could also overwhelm [insert any free market] by simply executing eminent domain and/or printing enough money.
Is that like the ultimate tax loss write-off? ;-)
Again, that's not how the US govt works with these things anyway (OTC auctions), so it is all a moot point.
This was detailed in previous seize operations like this.
2013:
> The FBI official pointed me towards this Bitcoin address, which received transfers of close to 144,000 in just the last 24 hours. "They finished moving them at 3am this morning," said the official.
https://www.forbes.com/sites/andygreenberg/2013/10/25/fbi-sa...
The quadrigacx (Canadian crypto exchange) bankruptcy trustee didn’t move the little they found into a wallet they controlled.
Lucky for them, it seems like nobody else had/acted on having the private keys.
How do you launder and benefit from even any of the coins, if you know you're a wanted man and everyone is watching to see where the coin pops up?
Anyone know what this refers to? Gold seized? or maybe metal plates with cold wallet keys taken from the safe?
> The metal items consisted of four one-ounce silver-colored bars, three one-ounce gold-colored bars, four 10-ounce silver-colored bars, and one gold-colored coin, all seized from Individual-1’s home on November 9, 2021.
So they weren't actual silver... So they were probably just novelty display pieces?
And even if they were real metals, the total dollar value of that lot isn't very high.
> The maximum potential sentence in this case is prescribed by Congress and is provided here for informational purposes only, as any sentencing of the defendant will be determined by the judge. ZHONG is scheduled to be sentenced by Judge Gardephe on February 22, 2023, at 3:00 p.m.
To be determined!
Whoever is responsible for selling a government asset is likely responsible for getting a good price. So a BTC dump, in addition to harming the markets, would be a violation of that duty.
https://www.fool.com/investing/2022/01/14/the-us-government-...
11, 116, 53, 44
It's very much still alive (which is probably why you're being downvoted), because it has first-mover advantage and is easier to use. I think eventually privacy-by-default coins like Monero (XMR) will gain in popularity assuming people smarten up, so if it requires people being smart, then it may never gain in popularity, who knows.
> ZHONG funded the Fraud Accounts with an initial deposit of between 200 and 2,000 Bitcoin. After the initial deposit, ZHONG then quickly executed a series of withdrawals. Through his scheme to defraud, ZHONG was able to withdraw many times more Bitcoin out of Silk Road than he had deposited in the first instance. As an example, on September 19, 2012, ZHONG deposited 500 Bitcoin into a Silk Road wallet. Less than five seconds after making the initial deposit, ZHONG executed five withdrawals of 500 Bitcoin in rapid succession — i.e., within the same second — resulting in a net gain of 2,000 Bitcoin. As another example, a different Fraud Account made a single deposit and over 50 Bitcoin withdrawals before the account ceased its activity.
So Silk Road wasn’t waiting for any transaction confirmations??? And didn’t append a nonce to each withdrawal to avoid duplicates?
Is this the guy that Ross wanted to kill?
No. The guy he "wanted to kill" was a moderator who didn't even steal from him. A FBI agent (huray, my taxes) pretended to be a drug lord for over 2yrs convincing Ross he should kill some moderator with lies about he wanting to take over silkroad or something, and then staged a mock assassination. All that for no tangible investigative benefit other then strengthen their 2yr old bro-bond.
That agent didn't even contribute to the actual arrest. Go read wired write up of the whole thing. It's better than most fiction books. Pure comedy.
Also, the current silk road is a honeypot set up by the Feds. That's why 1) they screwed up on validating transactions (it's not their money) and 2) they want after the stolen funds.
Ross Ulbricht commissioned 5 murders fully expecting each of them to be carried out.
> All that for no tangible investigative benefit other then strengthen their 2yr old bro-bond.
The murder-for-hire evidence denied him bail. But the prosecutor already had Ulbricht nailed and decided to avoid complicating the case by formally filing the murder-for-hire charges. Would your tax dollars have been better used if Mr. Ulbricht had additional life sentences and decades of prison? No, he is going to die in a prison cell either way.
Ross Ulbricht built his empire, in large part, by profiting off people's suffering. And he exhibited time and time again that he would murder people to protect it. He is nothing short of evil.
He built Silk Road, which allowed people to sell drugs to one another.
If the 'people's suffering' you are referencing is the use of drugs, I hope you have this same ire for the pharmaceutical companies and physicians prescribing opioids linked to over 500k deaths in the US over the past two decades[1]. I hope you feel the same ire for the CIA who facilitated and supported the Nicaraguan Contra groups' smuggling of crack into the US to finance their coup attempt[2].
I would hope the "nothing short of evil" rhetoric isn't exclusively saved for the kid who built an onion site and then was entrapped by FBI agents into a murder-for-hire scheme of their creation.
[1]https://www.npr.org/2022/11/02/1133523740/cvs-health-agrees-... [2]https://nsarchive2.gwu.edu/NSAEBB/NSAEBB113/north06.pdf
LOL. Wow. You clearly have no sense for nuance whatsoever.
https://www.wired.com/2014/06/silk-road-study/
https://www.theatlantic.com/technology/archive/2013/10/did-s...
Silk Road reduced deaths in a black market that was always there and would always continue to be there regardless of the presence of Silk Road. Period. Given that black markets are going to continue to exist, since anti-drug laws are dumb (just like Prohibition was; regulation of an irrepressible market is always superior to "illegalization" in a vain attempt to suppress it), it is at least less bad if there are fewer killings.
Entrapment is unethical precisely because you can use it to enforce a law regardless of the ethical justification of the law. If it was a capital offense to have sex before marriage in 2040 in the United Christian Dictatorship of America, and another Ross Ulbricht type came along and made it possible for teens to seek and meet in secret online, and a christo-fascist cop pretended to be a hot girl on said system while pretending to threaten to take the whole thing down unless a ransom was paid, and ANOTHER christo-fascist cop (or the same one pretending to be someone else) offered a "solution" to this by "getting rid of" the "problem"... Do you see where I'm going with this? Future Ross Ulbricht just wanted people to be able to find physical love before committing to wed!! Certainly not guilty enough to do life in prison, because no actual murders ever actually occurred.
The DOJ release says these transactions were from 2012
https://web.archive.org/web/20220112152207/https://www.wired...
Trivia aside, no. Entrapment is a specific concept narrower than "a fed lied to me."
> So Silk Road wasn’t waiting for any transaction confirmations??? And didn’t append a nonce to each withdrawal to avoid duplicates?
See the ACID properties of databases. [1] These are often put to the wayside in order to have greater transaction speed. We can see the results.
In computer science, ACID (atomicity, consistency, isolation, durability) is a
set of properties of database transactions intended to guarantee data validity
despite errors, power failures, and other mishaps.[1] In the context of
databases, a sequence of database operations that satisfies the ACID properties
(which can be perceived as a single logical operation on the data) is called a
transaction. For example, a transfer of funds from one bank account to another,
even involving multiple changes such as debiting one account and crediting
another, is a single transaction.
[1] https://en.wikipedia.org/wiki/ACIDACID makes sense in internal transfer, like the example you gave:
> debiting one account and crediting another, is a single transaction.
Blockchain is ACID compliant, their internal database could be ACID compliant hard part is linking it together.
The solution here is exactly going opposite of ACID. Do a transaction in database first, and hope the transaction goes through Bitcoin, if not have another job reverse the transaction. If the reverse job fails, have a support agent manually revert the transaction. A common mistake someone could do is to put transaction in processing state in the database, and have another job update it to success.
That's the issue, ACID is not ACID for a tiny bit but for the transaction. See the definition you quoted, "debiting one account and crediting another, is a single transaction." Blockchain is absolutely not ACID compliant. There must be a deterministic methodology not miner consensus for ACID. Miners can even change the blockchain.
However, why are you even mentioning blockchain instead of MYSQL without SERIALIZABLE, which enforces atomicity?
> The solution here is exactly going opposite of ACID.
What solution are you talking about? There was no solution put in place, which was the cause of the thefts.
But since this is "blockchain", is it more like... they weren't polling for the right confirmation/status/update from the blockchain network API thingie?
That's the exact same mistake I referenced. The consuming website should not be in charge of the atomicity of transactions.
It doesn't matter whether the API was used incorrectly, blockchain was used, or finanglesperunk was the technology. The vagaries of the implementation don't matter. Sending money should be atomic with the request instead of whatever this was, otherwise the result might be $3.36 Billion in theft.
PS Blockchain is a database. The developer can choose to enforce SALT instead of ACID, but something wasn't done right.
Now, I don't know for sure, but I like to think two different reviewers got my packets in parallel and never knew it, and upon changing my status the second reviewer probably wouldn't have seen any evidence of the last status change having been from an appeal.
Back in the days before email was common, I applied for a postdoc position at <famous prof's lab @ MIT>.
I mailed my letter to <famous prof>, expressing interest in working in his lab.
A few days later, I asked 3 profs in my graduate program to write letters of recommendation on my behalf to be mailed to <famous prof>.
After ~10 days, I received a response letter from <famous prof>, to the effect of: "Sorry, my lab is full. Won't have any openings for several years. etc. etc. Thanks, but no thanks."
I figured "Oh well.... No big deal."
But I was too lazy to inform the profs who were writing my recommendations to stop.
About a week after my "rejection" letter, <famous prof> phones me and says, "I always send a standard rejection letter because I'm only interested in people who are _aggressive_. Thanks for sending your recommendation letters. I _definitely_ have openings in my lab."
I didn't have the heart to tell him that he only got those letters because of my laziness.
One morning I put 20p in and it immediately came back out. It wasn’t accepting the coin so I tried two in quick succession. Both were spat back out… but the machine registered one of them.
I of course would never exploit that repeatedly for a couple free drinks and some extra change too.
Back in the early 1990s, I withdrew $10 from an ATM.
But the machine gave me two $10s (they were stuck to each other).
I then went back for a second transaction (secretly hoping there were multiple "stuck $10s" waiting to be released).
The machine only dispensed a single $10 the second time, so I stopped.
Let it be known that I owe Chemical Bank (or whoever bought them) $10 + interest.
He could withdraw whatever amount he wanted from the ATMs at college, but since that region's ATM network wasn't hooked up to his home bank's ATM network, it took months for everything to reconcile.
He could keep withdrawing, even if he had taken out far more cash than he had in his home bank account.
On breaks, he would go back home and pick up enough hours at his part-time job to cover the difference (it wasn't unusual for people to be paid weekly or in cash back then), make a deposit, and everything was fine. He just had to keep one step ahead of the computer batch processes.
Also, I think Chemical is Citibank now. I had a Chemical account, and a Dime account. I still think of Citi as "Chemical," though.
"oh wait we fucked something up? shit no, give me my money back"
Also common in professionally coded websites.
(Maybe you could have just hammered it continuously, but hopefully would have to predict when the blocks would be confirmed. They’re not exactly every 10 minutes).
It’s not exactly related to this hack, but poor blockchain practice on the part of silk road if it permitted withdraws this quick after deposits.
Not waiting for confirmations would leave you vulnerable to random chain forks and make 51% attacks cheaper.
They might want to look into this:
Many U.S. corporations use offshore tax havens and other accounting gimmicks to avoid paying as much as $90 billion a year in federal income taxes. A large loophole at the heart of U.S. tax law enables corporations to avoid paying taxes on foreign profits until they are brought home. Known as “deferral,” it provides a huge incentive to keep profits offshore as long as possible. Many corporations choose never to bring the profits home and never pay U.S. taxes on them.
https://americansfortaxfairness.org/tax-fairness-briefing-bo...
Yes, these tax loopholes are legal, but I bet the IRS and its world-class money trackers could, if they wanted, find quite a few outfits going well beyond what's technically legal.
They were when the theft occurred, but this is like when you steal a cargo container full of crap, and five years later discover that both the Mona Lisa and a nuclear football is in it.
Always reminds me on how Scientology managed to get charitable. tl;dr: Cause so much work for the IRS (or appear to be able to do so) and they'll back down.
The tax code is like the MasterLock of laws: looks complex on the outside, keeps honest people honest but is so weak it can be exploited by anyone willing to do so.