Isn’t the bigger issue that the fund itself was fake? If they made the decision to set aside some amount of money to be untouchable based on a random number, that is, uh, unconventional to say the least, but they very purposefully chose not to have an insurance fund despite advertising that they did which makes this all the more sinister.
Yes. This should be an instrumental price of evidence in proving that FTX leadership was not “tragically incompetent” but rather willfully and knowingly defrauded its customers.
i think when you are trying to prove a company is lying about having a zillion dollars of insurance, it helps if you can kind of pull the curtain down and show everyone the number 'zillion' was made up by someone throwing a pair of dice, not by someone counting a pile of zillions of dollar bills.
Well, yes, the issue is it was fake. But they compounded their fraud by publicly asserting a value of the fund, and the fact they implemented it as a random number shows malicious intent. Sometimes you can wave around incompetence etc as a mitigating factor, but this is clearly intentional deception and this proves it clearly and beyond a doubt.
I guess the dude who wrote that function thought, maybe I shouldn't add a docstring or any comments to that function. What is he/she even supposed to write "function to commit corporate insurance fraud."?
Protip. If you are committing fraud in the future - use a compiled language, do not use offsite version control and UPLOAD ONLY THE BINARY.
np.random itself with that configuration can go negative with a probability of 0.62% as can be derived with scipy.stats.norm(loc = 7500, scale = 3000).cdf(0) or by looping a million times and counting the negative numbers.
Maybe the f2d function filters negative values but it sounds like a simple float-to-double conversion.
I'm not sure whether it was intentional, but, contrary to the headline, this random value was used to update the fund size daily as shown in the rest of the code. So, a single day for which the fund actually decreases wouldn't matter much. It might even be beneficial to make it look more real.
The function doesn't calculate the insurance fund amount directly, it only applies a change to the insurance fund (line 28), based on last day's trading volume. Presumably this function gets run every day, so the size of the insurance fund would be the sum of this process repeated multiple times. The chances of that going to negative would be astronomically low.
Since it's a normal distribution with a mean of 7500, and a standard deviation of 3000 multiplied by daily volume—it would only cause a negative change less than 1% of the time. This "PublicInsuranceFund" truly embodies their culture of "number go up".
This is obviously just speculation, but there probably wasn't a whole lot of thought put into it by the coder. The goal was "produce a fluctuating number based on daily trading volume so that it looks like we have a real insurance fund". The randomness is simply there to help make the fraudulent representation less obvious. The fact that the number can (very rarely) go negative is just another example of the fly-by-the-seat-of-your-pants thinking pervasive at FTX.
Notice that now prosecutors not only understand code, but feel comfortable showing to judges and juries. Not that long ago, everyone's eyes glazed over at the mention of it.
No they don't. The defense attorneys likely know it better actually (I know one). But if the guy who wrote it actually walks a prosecutor through it, it isn't that complicated
Not defending FTX here, but I think everyone is jumping to a conclusion that this function is used for display purposes only and not to persist the amount that another process then uses to to transfer the insurance amount.
Using some randomization on the daily trading volume makes some sense for what to actually move each day during an end of day process.
When you tell your customers that a particular number corresponds to something real (e.g. the amount of money in the insurance fund that protects their assets) but you know the number was actually chosen randomly with no connection to that allegedly real thing, that's called "lying", or in the business world "fraud", and you can go to jail for it.
Strictly speaking the problem isn’t that it’s random, the problem is that it’s a lie. The fact it’s random proves that the number isn’t real.
The RNG is used to give some variance to the number without accidentally making a pattern (which humans making up numbers tend to do). Literally using a RNG in code that’s meant to produce a value based on real world data is blatant and hard to defend if true.
If you claim it's a fund to mitigate risk you probably should actually put money into said fund and not just pull some number out of your code.
So technically it's not the randomness that's the issue, and a constant or manually updated fake amount would be as bad, but to me as a layman but it seems like they use a random number to imply a sophisticated risk management system.
The problem is that the reason it is random is to mislead. If it were a static number then it would be obvious it was faked. The value is designed to look like it is pulled from a fund whose balance is determined by market conditions. But viewing the code, there is no fund to get the balance from, only a call out to random().
It’s like putting pillows under your blanket so someone thinks you’re in bed. Once they find the pillows you aren’t going to get away with “oh I thought I was allowed to be out all night.”
When a software engineer writes code because the code makes sense or solves the problem, without interrogating the problem or how it applies to the real world, there can be real and significant consequences. We trust far too much of our lives to tech to ignore these issues when we're on the side of writing the code.
Agreed — isn’t the problem that nothing was actually being set aside for the insurance fund, not that the amount being set aside was based on a random number?
I was ready to reply with an “um actually it is an arbitrary number” but… no… it is literally a random number. How did someone commit that and sleep at night?
It’s amazing that some people still defend SBF. Among his sycophants is Michael Lewis, author of Moneyball, The Big Short, and now “Going Infinite” which somehow manages to gloss over the rampant fraud happening at FTX since inception.
[+] [-] samtho|2 years ago|reply
[+] [-] opportune|2 years ago|reply
[+] [-] doubloon|2 years ago|reply
[+] [-] unknown|2 years ago|reply
[deleted]
[+] [-] fnordpiglet|2 years ago|reply
[+] [-] unknown|2 years ago|reply
[deleted]
[+] [-] gamache|2 years ago|reply
[+] [-] 90-00-09|2 years ago|reply
[+] [-] ngoldbaum|2 years ago|reply
[+] [-] sanderjd|2 years ago|reply
[+] [-] wolverine876|2 years ago|reply
[+] [-] wqtz|2 years ago|reply
Protip. If you are committing fraud in the future - use a compiled language, do not use offsite version control and UPLOAD ONLY THE BINARY.
[+] [-] EMIRELADERO|2 years ago|reply
Until you get prosecuted and legally required to turn over the source code, as it happened here.
[+] [-] tedivm|2 years ago|reply
[+] [-] ksd482|2 years ago|reply
[+] [-] mananaysiempre|2 years ago|reply
[1] https://devblogs.microsoft.com/oldnewthing/20171114-00/?p=97...
[+] [-] twic|2 years ago|reply
[+] [-] jncfhnb|2 years ago|reply
[+] [-] rich_sasha|2 years ago|reply
[+] [-] birdyrooster|2 years ago|reply
[+] [-] goosedragons|2 years ago|reply
[+] [-] mxmlnkn|2 years ago|reply
Maybe the f2d function filters negative values but it sounds like a simple float-to-double conversion.
I'm not sure whether it was intentional, but, contrary to the headline, this random value was used to update the fund size daily as shown in the rest of the code. So, a single day for which the fund actually decreases wouldn't matter much. It might even be beneficial to make it look more real.
[+] [-] gruez|2 years ago|reply
[+] [-] whbrown|2 years ago|reply
[+] [-] timmytokyo|2 years ago|reply
[+] [-] ilyt|2 years ago|reply
[+] [-] wolverine876|2 years ago|reply
[+] [-] CraigRo|2 years ago|reply
[+] [-] dabeeeenster|2 years ago|reply
[+] [-] pfdietz|2 years ago|reply
[+] [-] joneholland|2 years ago|reply
Using some randomization on the daily trading volume makes some sense for what to actually move each day during an end of day process.
[+] [-] mstudio|2 years ago|reply
[+] [-] fishywang|2 years ago|reply
[+] [-] wmf|2 years ago|reply
[+] [-] c0balt|2 years ago|reply
[+] [-] tester756|2 years ago|reply
For me it looks like this value is used only when there was no data?
Basically else part of monad
[+] [-] skilled|2 years ago|reply
[+] [-] Thorrez|2 years ago|reply
[+] [-] playingalong|2 years ago|reply
[+] [-] teraflop|2 years ago|reply
[+] [-] kgermino|2 years ago|reply
The RNG is used to give some variance to the number without accidentally making a pattern (which humans making up numbers tend to do). Literally using a RNG in code that’s meant to produce a value based on real world data is blatant and hard to defend if true.
[+] [-] Vespasian|2 years ago|reply
So technically it's not the randomness that's the issue, and a constant or manually updated fake amount would be as bad, but to me as a layman but it seems like they use a random number to imply a sophisticated risk management system.
[+] [-] svnt|2 years ago|reply
It’s like putting pillows under your blanket so someone thinks you’re in bed. Once they find the pillows you aren’t going to get away with “oh I thought I was allowed to be out all night.”
[+] [-] danpalmer|2 years ago|reply
When a software engineer writes code because the code makes sense or solves the problem, without interrogating the problem or how it applies to the real world, there can be real and significant consequences. We trust far too much of our lives to tech to ignore these issues when we're on the side of writing the code.
[+] [-] planetpluta|2 years ago|reply
[+] [-] joeman1000|2 years ago|reply
[+] [-] fhk|2 years ago|reply
No “import numpy as np” !?
[+] [-] tqi|2 years ago|reply
[+] [-] who-shot-jr|2 years ago|reply
[+] [-] bigyikes|2 years ago|reply
It’s amazing that some people still defend SBF. Among his sycophants is Michael Lewis, author of Moneyball, The Big Short, and now “Going Infinite” which somehow manages to gloss over the rampant fraud happening at FTX since inception.