276 points · by bookmtn · 1y ago · 350 comments
He has not stolen anybody's password, has not modified DeFI code - simply executed a set of financial transactions according to the rules (expressed as DeFI smart contracts) and profited from it.
Indexed Finance is an unlicensed investment firm. The promoters knew the risk ( decentralized finance) and now they want to blame someone who outsmarted them at their own game.
If you end up using the legal system to remediate undesired transactions, what's the point of cryptocurrencies in the first place?
So far, to execute illegal transactions and using the lack of regulations to exploit the financially illiterate.
Another one to make you scratch your head/chin: The world's busiest crypto exchange is Binance. The Wiki page literally says: "Headquarters: Unknown". How can anyone trust a company like that? Who regulates it? What enforcement agency will help in the event of fraud?
What you need to argue is that the the smart contracts were valid contracts that the creators intended to and had opportunity to understand and that their creation was their act of negotiation of a position. It isn't really a stretch, but with amounts like this probably more diligence would have been due than that. Calling it theft is ridiculous on the other hand.
He's charged with:
1) wire fraud (the smart contracts/swap exploit)
2) unauthorized damage to a protected computer (running the exploit on the ethereum network)
3) attempted hobbs act extortion (contacting kyberswap to attempt to gain control of kyberswap in exchange for return of some of the crypto)
4) money laundering conspiracy
5) money laundering (knowingly laundering the proceeds of the previous, including paying an undercover agent to help bypass a blacklist to do so)
[1] https://www.justice.gov/usao-edny/media/1388036/dl?inline
Saying "he used the system as it was designed, even if not as intended" is more or less equivalent to saying that any computer hack or zero day is also "using the computer system as designed".
You even plausibly extend that to picking locks in the physical world.
So yes, it does make sense for the law to get involved.
(Clearly in the real world the American authorities have decided it's a criminal matter. I just find it odd that a "smart contract" dispute falls under criminal rather than commercial law.)
It's bonkers to me that the only rulesets people care to implement on such a platform are just reflections of money as we know it. How unimaginative. I wish we'd make something new rather than translating something old--bugs and all--into a new language.
That's the point for them. It's not the point for anybody else.
If you believe in cash, does that mean you can't run to the courts if someone steals your cash?
If your security proves insufficient to prevent a theft, that doesn't mean the theft was legal! It just means your security was insufficient.
That security can be enforced by mathematics instead of courts is definitely a benefit of cryptocurrency, but when it goes wrong courts still matter.
No, because the point of cash isn't to circumvent government control of the financial system. If you build a whole system just to decentralize financial control and avoid government influence but then appeal to the government as soon as you don't like what happens, you're doing something wrong.
Stealing someone’s private key and then using it to steal their assets is very different from exploiting edge cases of get rich quick schemes.
It's like opening a bank account, and the contract says "You can only access your own money in the vault. Everything you can access is yours to use as you see fit." On your first visit the manager brings you into a vault with hundreds of cash-laden tables. He shows you to an empty table, and says "Here's your table. Enjoy!".
Are you allowed to take money from the other tables? Clearly the contract says you can, but surely that can't be what they intended? Is it theft to "break their security" by walking over to another table, or is it just a hidden perk of the contract you signed?
> Are you allowed to take money from the other tables? Clearly the contract says you can, but surely that can't be what they intended?
If their entire business model is based on giving a service that allows you to store your money in safety without any government dependency, while in reality they allow everyone else to take your money, then they deserve whatever happens to them.
Like any technology, a money system can be designed so that it works well enough for a small set of intended purposes, and poorly for all other purposes. Moreover, its uses can be constrained by laws.
I think an open question is whether existing laws related to money or property apply to cryptocurrencies. For instance, "theft" and "fraud" cover a lot of things, without specifically listing all of them.
If it's ambiguous whether such laws apply to crypto, then sure, someone could use the legal system to settle the matter. In fact, using the legal system to remediate undesired transactions could be as good a use of crypto as any, if "anything goes."
I doubt that will hold up in court. The exact thing could be said about computer networks and hackers exploiting them.
Agreed, but there is already a very similar case where "code is law" was tested, and failed: https://www.justice.gov/archives/opa/pr/man-convicted-110m-c...
It turns out that once a financial system becomes big enough, the US will apply its finance laws to it. Finance laws are designed to prevent sudden unexpected transfers of wealth from one (wealthy) unwilling party to another based on unanticipated loopholes.
To funnel cash to regimes like North Korea
It didn't work there, and it won't work here either.
If you end up using the legal system to remediate undesired transactions, what's the point of cryptocurrencies in the first place?
That is a philosophical argument completely unrelated to whether or not something is illegal. Cryptocurrencies aren't a replacement for the law, nor do they stand outside of it.
Because it sure looks like they intended for “code is law” to be the case. Many of the oft cited use cases were to circumvent traditional systems.
Most comments saying that cryptocurrency holders should abide by "code is law", are not actually saying that we should abide by "code is law" and abandon the legal system.
It's a classic argument to show that the purported benefits of cryptocurrency are a farce.
To get 30mg oxy
Shouldn't, but can.
Anyway, you're assuming most of these crypto people are true believers in the technical attributes of crypto currencies, but I think most of them don't understand or care about that and are just trying to get rich.
I think you’re answering your own question here
In this case, to make money. These are not ideological purists, they're capitalists.
Not to be that guy but it seems like the point of cryptocurrencies is to scam vulnerable people...
Yes, indeed. And when people leave their home unlocked the thieves should get to keep their stuff. What kind of savagery is this?
> If you end up using the legal system to remediate undesired transactions, what's the point of cryptocurrencies in the first place?
Great question, we have been waiting for answers for nearly a decade now...
That's not what happened here. What happened is that the crypto company said, "Follow this contract," and their customer followed the contract and took their money, and then the crypto company was like, "But not like that!"
Ostensibly, the whole point of cryptocurrencies is to decentralize financial control and not depend on governments for that service. If you then depend on governments the second you don't like what happens, there's no point to cryptocurrencies.
As popular as this idea is online, it doesn’t work that way in the courts.
Intent matters in issues of the law. The “finders keepers” rules don’t apply in legal matters in the real world.
If someone logs into their bank and notices that changing the account number in the URL lets them withdraw from other people’s accounts, no court is going to shrug it off and say that it’s the bank’s fault for not being more secure. Likewise, finding a vulnerability in a smart contract doesn’t automatically give someone the right to any funds they collect from exploiting it.
We all know the “code is law” arguments about smart contracts are just marketing bluster. The lawyers do, too.
Everybody involved knows all of that, and claims it as a positive feature of the system. At least until they find out that it's actually hard to write bug-free code.
There may indeed not be a legal "meeting of minds" (although there very well also may)... but from an ethical point of view, everybody involved knowingly signed up for exactly that kind of risk. And honestly it would be good public policy if the law held them to it. Otherwise you get people trying to opt out of the regular legal system up until it's inconvenient.
There'd be more of a case if he'd exploited the underlying EVM implementation. But he didn't. He just relied on the "letter" of a contract, in an environment that everybody had sought out because of unambiguous to-the-letter enforcement.
Am I an idiot or is it unclear why this is the intention?
When you open a bank account, there is an actual contract and regulatory framework that governs how you use the account. A URL parameter is an implementation detail that no more alters the contract than a broken lock on a vault would alter the contract.
But when you interact with a smart contract, the smart contract is the contract. What you are allowed to do is defined by what the smart contract lets you do. You don't need to open an account, agree to T&Cs or sign any other sort of contract to interact with the smart contract.
If the smart contract is not the contract, how would you propose we can determine what the real contract is?
This is one viewpoint but certainly not the only viewpoint and definitely not the viewpoint of the authors of the contracts in question.
Smart contracts are a novel method of executing contracts, but like all contracts the parties involved and the contract itself is subject to legal oversight in the relevant jurisdictions.
With DeFi it's different; the code is public and decentralized. There was no unauthorized access to anything here. From my reading of what was done, it was essentially taking advantage of the poor trading strategy of Indexed Finance.
I'm not going to pretend to be a lawyer, but I don't see a lot of parallels between this and e.g. using SQL injection to obtain unauthorized access to a system.
To give an analogy, it's like writing code in a high level language and saying that it will prevent side channels such as spectre. But such side channels are a function of the hardware, not the high level language. The hardware in defi is ultimately the law, not the servers.
so all american youtube sagas about doing card counting in PRESENT time are fraud to dupe people into thinking that it is possible to card count. NOW TODAY.
Avi Einsenberg did the same with Mango Markets,
got away with 110M and is now looking at 20 year sentence
And Mango was being sued by the SEC too https://www.sec.gov/newsroom/press-releases/2024-154
> SEC Charges Entities Operating Crypto Asset Trading Platform Mango Markets for Unregistered Offers and Sales of the Platform’s “MNGO” Governance Tokens
> Pair of affiliated entities separately charged for acting as unregistered brokers
That’s not how the law works.
If someone breaks the law or doesn’t comply with regulations, that’s a separate issue. It doesn’t entitle a third party to steal their funds.
If you were to rob a drug dealer, you couldn’t argue that they weren’t complying with the law and therefore you were free to take it. You would both have broken laws.
If you write a contract and give it to a lawyer with the instruction, "Anyone who satisfies this contract gets this money." And someone satisfies the contract to the lawyer's -but not your- satisfaction, and the lawyer sends the money, did the third party steal from you?
If I run an unmanned lemonade stand out front and leave a pile of money on the table, and say take your change, if you take more than what you're owed that's theft regardless of how easy it was.
What matters is if Medjedovic engaged in activities that would be illegal in the process of acquiring the funds from Indexed Finance. A theft is theft whether it is physical or digital; victims aren't required to have perfect security and criminals are not allowed to exploit weaknesses to just take something that belongs to someone else.
Medjedovic is accused of exploiting "glitches." From a legal perspective, that would be no different from a thief exploiting a "low" wall or an unsecured window. Glitches aren't invitations any more than an open window. In other words...not a defense. (And in the U.S., specifically see the Avraham Eisenberg case, which is basically the same fact pattern. Eisenberg lost. His sentencing was postponed to last week but appears to have been postponed again.)
Then he skipped town after he was ordered by a court to put his tokens into escrow. If he truly believed that "code is law" and that the tokens were rightfully his, he wouldn't have skipped town. At that point...his own actions demonstrated that he didn't believe that what he did to acquire the tokens were legit. (The Fugitive notwithstanding, innocent people don't run.)
Then he "exploited glitches" for another DeFi. See above.
Then he attempted to launder the tokens...with some guy he found on the internet. Someone who legitimately believed that they legally owned the tokens would have hired lawyers, not money launderers, to gain access to their property. (Aside: any money launderer willing to launder money for a stranger is almost certainly undercover law enforcement...)
Then he moved to a country without an extradition treaty, and in the past few months has been spouting racist far-right nonsense in the hopes of getting pardoned.
Is he guilty? His own actions say that even he thinks he is.
I like the analogy of an unsecured window. It doesn't seem to apply to a hypothetical (idk specifics of this company) purely private company in some crypto-friendly country that doesn't have any ties to the rule of law.
> There must be in-groups whom the law protects but does not bind, alongside out-groups whom the law binds but does not protect.
They are outside of regulatory scrutiny but god-forbid someone uses the same excuses to take their funny money.
From that link:
"U.S. Attorney Damian Williams said: “Today, Shakeeb Ahmed was sentenced to prison in the first ever conviction for the hack of a smart contract and ordered to forfeit all of the stolen crypto. No matter how novel or sophisticated the hack, this Office and our law enforcement partners are committed to following the money and bringing hackers to justice. And as today’s sentence shows, time in prison — and forfeiture of all the stolen crypto — is the inevitable consequence of such destructive hacks.”
The undisputable matter of fact is this: there have already been several cases of people who thought they could invoke the "(smart contract) code is law" argument to outsmart judges and the legal system.
But that's fantasy. In practice these people, when caught, go to prison.
> Indexed Finance is an unlicensed investment firm. The promoters knew the risk ( decentralized finance) and now they want to blame someone who outsmarted them at their own game.
And DeFi exchanges are "unlicensed brokers". And yet I posted a case where the hacker who "outsmarted" them is now in prison: how smart one has to be to end up in prison right?
Post me a case where an "unlicensed investement firm" sued a thief who "outsmarted them" and where the judge decided to let the thief walk free.
For I posted a case from justice.gov to prove my point.
A masked man creeps through the shadows of a sleeping town.
He looks both ways, then uses a knife to unlatch a door from the outside. He slips into near pitch blackness. He moves confidently in the darkness - he's worked for this bank before, checking on their security from theft.
Out comes his lock picking tools - the bank president's office door opens with a quick rake. Cheap lock.
Inside, with no windows to betray him, he lights a candle. There in the corner stands the safe. He knows it inside and out, and has been practicing. Five minutes later, the lock is picked, and he loads up the gold, cash, and bonds inside.
He puts the candle out, slips back outside, and returns to his room at the lodging house, climbing in through the window.
The next morning, with the discovery of missing gold, the town looks like someone kicked over a fire ants nest. It only takes 30 minutes before people start wondering about "bank security expert" who had just been in the bank every day.
A crowd heads over the boarding house, growing in size as it goes.
"Did you steal our money?", they ask?
"ABSOLUTELY NOT," he replies, "I merely used my immense mental powers to out hink several flawed physical security measures, breaking no laws of physics, in such a way that the gold, cash, and bonds previously belong to you are now in my possession, and now belong to me. No theft has taken place, only the movement of certain levers, of which anyone who knew how could move, and the movement of afterwords of certain goods."
"So you stole our money!!", the town shouted.
"No, no, I just interacted with the universe according to its very own publicly available rules. No theft has occurred!"
An old cowhand, covering him with double barrel, spoke up, "Walll, guess he's right. We deserved to lose all that money. He did nothing wrong at all."
Everyone left, impressed with his genius.
"code is law" is a meme that primarily lives on hacker news. Only a tiny fraction of crypto people believe it or say it.
> A masked man creeps through the shadows of a sleeping town.
> He looks both ways, then
... walks into a casino, realizes there's a flaw in how they shuffle and deal cards, and then makes a shit ton of money exploiting this weakness.
After losing a shit ton of money because they didn't plan for someone to play the game in an unexpected way, the owners of the casino demanded the money back.
"Did you steal our money?", they ask?
"ABSOLUTELY NOT," he replies, "I didn't get any non-public information, I didn't manipulate the deck, and you have yet to point to a single hand that was not played entirely within the stated rules of the game. You're just mad because I noticed that you fucked up and bet accordingly."
"There's always another moron tries that one", they laughed as they walked away.
It seems like right now the crypto industry makes the decision to their convenience on a daily basis.
It'll be interesting how this gets resolved by Canadian courts.
And this is rich: “A bad actor not brought to justice and held to account for one act of fraud will surely commit another”
He's being prosecuted by the US DOJ, EDNY. Not Canada.
(Obligatory, I don't work in crypto or have any special connection to it, I just think people forget this third option even exists when it's really the most common way most private industries actually resolve disputes most of the time.)
its a broader group to convince, sure, but there is a clear 'or else' from which the court can get that legitimacy. 'return the money or else we will return it for you' is a meaningful or else
As devs, we might claim that 'code is the law' but my guess is that the law does not care. That is, one cannot overwrite property laws by a few lines of code.
Consider how disclaimers work--we are increasingly putting limitations on what rights you can contractually forfeit.
This will be interting to watch.
There’s a world where crypto could be sold the same way, but the sycophants drowned that out for long enough that we aren’t in the Trough Disillusionment now so much as the Trough of Open Mockery.
Clever fools are how you get Jurassic Park.
Interesting side-note : the people he took/stole from - they offered him 10% if he returned the rest. He said no in a tweet trolling them.
Contrary to the opinions in this thread, I think he was smart to run away. Remember that he did this from Canada, not the US. Countries don't have the same extradition treaties with Canada that they do with US.
If he had stayed, he would almost certainly be convicted. No court can possibly understand "code is law". Courts' job is only to interpret the law, not make the law. And the law was not written for crypto. You cannot fit a square in a circle without distortion.
What I think would have happened is the courts, rather than introducing novel precedent, would have preferred to just rely on existing case law and declare him a criminal.
Another interesting side-note : the judge presiding the case made a public comment asking the guy to come back to Canada promising him a fair trial. The guy didn't show up - maybe he didn't receive the message.
Overall, even with the benefit of hindsight, we still can't be sure if he was smart to exploit this or not. Forced to live in a few countries but with a lot of money.
* It's because (1) laws were designed when numbers were lower (no one had $16M to steal); (2) humans can't visualize big numbers (individually, $16M is just as big as $65M in my head)
Something happens
We need to use the system which we want to replace...
> Mr. Medjedovic left home after receiving death threats
So, crypto-dealers hiding their identiyty and issuing death threats now appeal to law.
Calling it a "hack" or an "attack" as this article does (while strawmanning the opposite case) is a deliberate attempt to muddy the waters, and is a failure of journalism.
But on a serious note, whenever you read about some people that have either managed to outright steal crypto, or find some vulnerability which hasn't been legality tested...and they just pack their bags, hoping to live life free, forever after. It just seems so naive, too naive with how smart these individuals otherwise tend to be.
I think it is fair to say that once you'll cross a threshold, could be a million. could be 10 million. could be 50 million. All depends on who you've taken it from, you'll realistically be hunted for life.
The people that do get away with these things, are state sponsored operators - but they don't walk away with tens of millions in loot, either.
EDIT: Reading the article, this guy sounds like a real piece of work.
If someone has more money than you, you're screwed. Period.
This is how it works in the fascists world order, which is increasingly dominating these days.
Andean Medjedovic's case shouldn't have even made it to court and he had no obligation to leave his crypto or cashed out legal tender with some "custodian" and spend the next several years of his life as a beta tester for establishing case law. This wasn't just "code is law," more accurately, "under the stipulations of the contract, code is law."
This guy won a game of poker against the house, and now the house is mad.
https://news.ycombinator.com/item?id=31478795 ("The math prodigy whose hack upended DeFi won’t return funds" (2022) — 399 comments)
A file labeled "Decisions and Mistakes," in which he wrote, "Going On the run / Yes / Chance of getting caught<Payoff for not getting caught / (NA) / Risk is typically underpriced in modern world.
Which included, among other things, "KEEP the configs Burn the evidence, including the histfile Book flight to: Pack Bags"
There was no break in or exploiting, it was a trade using flash loans, fair enough if you ask me. A platform trading hundreds of millions should invest in proper security audits
What's the lesson? Maybe tornado cash the gas tokens before doing stuff like this and definitely never post it on social media or acknowledge that you did anything. Be smart and have good opsec
If I was in his shoes I wouldn't trust them. They can just try to put me on jail anyways.
I wonder if this is any relation to Cicada 3301. https://en.wikipedia.org/wiki/Cicada_3301
Saying "The code let me do it, so it should be legal" is a bit like if I leave a "free to a good home" sign on a plant pot outside my home, and it leans on my car. It does not mean you are permitted to take my car, no matter how "obvious" it seems to you that it should.
“Code is not law. Law is law,” Mr. Gottlieb wrote in a lengthy thread to Mr. Medjedovic on X in late October, 2021. “And what you did was not a ‘clever trade.’ It was market manipulation. It’s illegal. And people go to prison for it.”
Tech exceptionalism is eternal. It takes the occasional Napster or PirateBay failure to disabuse a generation in the tech community of the triumphalist nonsense it talks itself into believing. But then the next generation comes along and doesn't know better.> Yes, my client did take a stack $100 bills and leave it on the sidewalk atop an elaborate contract proclaiming that those $100 bills should be given to the very next person going by the name of "John" who found this stack of $100 bills upon the sidewalk, including specific language stating that anyone, even an unforeseen party meeting such criteria, would be entitled to that money. And indeed, my client signed and dated that document in triplicate. Yes my client did go to great lengths to write such a detailed and specific contract, and he was quite sure that such a contracts terms would be sufficient to ensure that only my clients brother, John Williams, would be entitled to the money, that same John Williams who lives across town. The brother would never find that money though, because the villainous, criminal, thief of a man John Smith stole that money from off the sidewalk when walking out of Smiths front door! Smith would have you believe that he was merely fulfilling the terms of a fortuitous open ended contract foolishly entered into by an idiot who failed to think critically about the terms said idiot entered into. That, however, is not important! I am here today to say that the terms of such a contract are not what is relevant, what is relevant is how upset my client is that he no longer has his money. I can prove that Smith stole that money, no matter what the documents signed by my client say! Those contracts are not law, only the law is law. What Smith did was not a "clever deal", it was theft. Which is illegal, and people go to prison for it.
A bit over dramatic, but that's how the lawyers statement reads to me.
(I am against prosecution in this case, but I think he should have most of the money confiscated)
Your analogy is confusing, you’re comparing a free plant on the roadside to 63 million dollars on a crypto exploit?
What's actually confusing in the analogy? Are you actually confused or just pretending? The point is that just because a sign says something under a literal reading, it doesn't mean that it's what was intended, or what's binding. If there's a piece of paper on my car saying "free to a good home", I probably didn't intend that you can take my car (or my house, or whatever). It's not very different to the fact that a 0-day exploit on your bank's web server does not entitle the thief to your money.
Your example is in the real world where there are things like weather and other variables that can't be accounted for. It's necessary for law to be based on common sense in such an environment.
But why can't we imagine removing this element of ambiguity? In a computer system you can account for all variables and completely define the environment. This would make interpretation of the law much easier which is surely a good thing.
But this kind of thing needs formal verification to work properly, which we are not good at. Trying to do it without formal verification is silly. But the broader idea is by no means "childish".
But, if this really was agreed upon by most of the parties involved, shouldn't the smart contract have include giving the courts a master-key that allows them to override the blockchain when necessary? Undoing fraudulent transactions and such. Can we really argue that everyone expected disputes to be handled by the courts if this wasn't implemented?
There is no technical reason why it couldn't have been done, as far as I can tell. It would not be great for PR perhaps, since it sort of goes against what a lot of the original crypto enthusiasts believed in: decentralization and protection from future hypothetical tyrannical governments. But at least it wouldn't be half as hypocritical as what we have today.
Of course, if you designed your crypto like this, with a court controlled backdoor, you'd unfortunately have to stop calling the whole thing decentralized. But if that's the intent, and everyone agrees to it, what's the issue?
I'm trying not to pass any value judgement on the "Canadian math prodigy" in this scenario, on the whole I don't care much about the isolated incident, but rather on whoever wrote the smart contract trying to both have their cake and eat it too.
I find crypto really fascinating from a technical and philosophical standpoint, but I'm not too fond of how it's been adapted by society as mostly a sort of get-rich-quick scheme.
Ultimately the rules are written by people who look legitimate, and/or those who capture regulators.
https://rekt.news/indexed-finance-rekt https://rekt.news/mango-markets-rekt
The article is skimming over some of the darker sides of his side of the story - like how allegedly his code and conversations are generally peppered with racist rants (I haven't seen any examples of such). The boy seems like a horrible case of internet poisoning - like, a brilliant mathematician child completely mangled in the head by 4chan/gamer discourse.
One part of his first heist that isn't mentioned often is that Indexed Finance says he was actually working with them and contributing to their codebase before he pulled his exploit.
However, cryptocurrencies are unregulated so you can easily argue that the laws usually governing the markets don't apply. Unfortunately for him, I don't think the judge will want to set that precedent...
https://x.com/cryppinfluence/status/1889268223528538113
This in particular: https://x.com/cryppinfluence/status/1889268417108332733
This is the stuff of legend.
And they also want government to act if someone does something they don't like.
The https://indexed.finance page has a big fat "This project is in beta. Use it at your own risk." warning. I guess "use at your own risk" doesn't apply to themselves.
Unserious people.
That’s a reference I haven’t heard in a bit
Very interesting that he gives praise to trump after all this hassle from the US government. Why is the US even involved in this? It's a canadian dude and a canadian exchange.
Once again, crypto folks are all about decentralization until someone outsmarts them, then they go crying to daddy government to bail them out.
Code is not law, the law is the law.
Boy the crypto industry better pray that market manipulation isn't illegal in DeFi-world or they're all going to prison.
I mean, sure, we can use the language of theft and crime figuratively, just like when we talk about animals. For instance, "the wolf stole a chicken from the coop".