How A Secret Software Change Allowed FTX To Use Client Money
In mid-2020, FTX's chief engineer made a secret change to the cryptocurrency exchange’s software.
He tweaked the code to exempt Alameda Research, a hedge fund owned by FTX founder Sam Bankman-Fried, from a feature on the trading platform that would have automatically sold off Alameda's assets if it was losing too much borrowed money.
In a note explaining the change, the engineer, Nishad Singh, emphasized that FTX should never sell Alameda's positions. "Be extra careful not to liquidate,” Singh wrote in the comment in the platform's code, which it showed he helped author. Reuters reviewed the code base, which has not been previously reported.
The exemption allowed Alameda to keep borrowing funds from FTX irrespective of the value of the collateral securing those loans. That tweak in the code got the attention of the U.S. Securities and Exchange Commission, which charged Bankman-Fried with fraud on Tuesday. The SEC said the tweak meant Alameda had a “virtually unlimited line of credit.” Furthermore, the billions of dollars that FTX secretly lent to Alameda over the next two years didn't come from its own reserves, but rather were other FTX customers' deposits, the SEC said.
The SEC and a spokesperson for Bankman-Fried declined to comment for this story. Singh did not respond to several requests for comment.
The regulator, which called the exchange “a house of cards,” alleged Bankman-Fried concealed that FTX diverted customer funds to Alameda in order to make undisclosed venture investments, luxury real estate purchases, and political donations. U.S. prosecutors and the Commodity Futures Trading Commission also filed separate criminal and civil charges, respectively.
The complaints – along with previously unreported FTX documents seen by Reuters and three people familiar with the crypto exchange – provide new insights into how Bankman-Fried dipped into customer funds and spent billions more than FTX was making without the knowledge of investors, its customers and most employees.
Police in the Bahamas, where FTX was based, arrested Bankman-Fried on Monday evening, capping a stunning fall from grace for the 30-year-old former billionaire. His company collapsed in November after users rushed to withdraw deposits and investors shunned his requests for more financing. FTX declared bankruptcy on Nov. 11 and Bankman-Fried resigned as chief executive.
Bankman-Fried has apologized to customers, but said he didn't personally think he had any criminal liability.
The auto-liquidation exemption written into FTX code allowed Alameda to continually increase its line of credit until it “grew to tens of billions of dollars and effectively became limitless,” the SEC complaint said. It was one of two ways that Bankman-Fried diverted customer funds to Alameda.
The other was a mechanism whereby FTX customers deposited over $8 billion in traditional currency into bank accounts secretly controlled by Alameda. These deposits were reflected in an internal account on FTX that was not tied to Alameda, which concealed its liability, the complaint said.
“SAFE, TESTED AND CONSERVATIVE”
As Bankman-Fried grew FTX into one of the world’s largest crypto exchanges, consumer protection was a central tenet of his pitch for crypto regulation in the United States. Bankman-Fried stressed this theme in countless statements to customers, investors, regulators and lawmakers. FTX’s auto-liquidation software would protect everyone, he explained.
In congressional testimony on May 12, he called FTX’s software “safe, tested and conservative.”
“By quickly unwinding the riskiest, most undercollateralized positions, the risk engine prevents build-up of credit risk that could otherwise cascade beyond the platform, resulting in contagion,” Bankman-Fried testified.
He did not tell lawmakers about the software change to exempt Alameda. Indeed, he told investors that Alameda received no preferential treatment from FTX, the SEC complaint said.
Bankman-Fried had directed subordinates to update the software in mid-2020 to enable Alameda to maintain a negative balance on its account, the SEC complaint said. No other customer account at Alameda was allowed to do so, the complaint added. This would allow Alameda to keep borrowing more FTX funds without the need to provide more collateral.
In software tweaks made in August 2020, Alameda was designated as the “Primary Market Maker” or “PMM,” according to a Reuters review of its codebase. Market makers are dealers who enable trading in an asset by standing ready to buy and sell it.
To explain the change, Singh, the chief engineer, inserted a comment into the code: “Alameda would be liquidating, prevented.” He included a warning “not to liquidate the PMM."
Only Singh, Bankman-Fried and a few other top FTX and Alameda executives knew about the exemption in the code, according to three former executives briefed on the matter. A digital dashboard used by staff to track FTX customer assets and liabilities was programmed so it would not take into account that Alameda had withdrawn the client funds, according to two of the people and a screenshot of the portal that Reuters has previously reported.
Bankman-Fried's house of cards "began to crumble" in May 2022, the SEC complaint said.
As the value of crypto tokens plummeted that month, several of Alameda's lenders demanded repayment. Since Alameda didn't have the funds to meet these requests, Bankman-Fried directed Alameda to tap its "line of credit" with FTX to obtain billions of dollars in financing, the complaint said.
Ultimately, when FTX customers dashed to withdraw their money this November, spooked by media reports about the company's financial health, many discovered that their funds were no longer there.
Latest News
Bilal Firfiray | May 4, 2026Skoda Epiq Interior Teased In Design Sketches; Premiere On May 19After a couple of years in a concept stage, Epiq will make a global premiere on May 19th, and here’s a teaser of its new cabin theme.1 min read
car&bike Team | May 4, 2026BSA Scrambler 650 Vs Royal Enfield Bear 650: Specifications ComparisonThe new BSA Scrambler 650 goes head-to-head against the Royal Enfield Bear 650, at least on specifications and positioning.1 min read
Jafar Rizvi | May 4, 2026Tata Curvv EV 55 kWh Prices Slashed With Launch Of SeriesX; Curvv EV 45 kWh DiscontinuedThe 55 kWh battery pack now offered at a lower price point in Accomplished and Empowered trim levels, while the rest of the variants have been shelved.2 mins read
Seshan Vijayraghvan | May 4, 2026Nissan Launches Twin-Cylinder CNG Retrofitment Kit For Gravite At Rs. 82,999Priced at Rs. 82,999, the CNG kit will be available as a dealership-level offering rather than a factory fitment. However, Nissan says customers will get a 3-year / 1,00,000 km third-party warranty on kit components.2 mins read
car&bike Team | May 4, 2026BMW M440i xDrive Convertible Launched In India At Rs 1.09 CroreBuilt at BMW's Dingolfing plant in Germany, this potent, open-top version of the 4 Series is shipped into India as a full import.1 min read
car&bike Team | May 4, 2026BMW X6 Coupe-SUV Showcased In India; Launch Expected In Coming MonthsThe X6 looks set to return a little over 3 years after it was pulled from the Indian market and will mark BMW’s re-entry into the coupe-SUV segment.1 min read
Jafar Rizvi | May 3, 2026River Indie Gen 3 Long Term Report: 1 Month, 400 km AfterAfter a month and 400 km, the River Indie impresses with its utility-first approach, smooth ride and standout design, despite a few everyday usability compromises.8 mins read
Bilal Firfiray | May 2, 2026Volkswagen Taigun Facelift Review: Still The Driver’s SUV, But Improved!The updated Volkswagen Taigun gets a new 8-speed automatic, a refreshed design, and added features. But does it still deliver the best driving experience in the C-SUV segment?5 mins read
Shams Raza Naqvi | Apr 29, 2026Toyota Innova Hycross Vs Mahindra XEV 9S: Choosing The Right Three Row Family MoverIn a battle of three-row cars the electric Mahindra XEV 9S takes on the Toyota Innova Hycross. Which one ticks more boxes?1 min read
Janak Sorap | Apr 26, 2026BMW F 450 GS First Ride Review: Almost A Proper GS With Big Bike DNANew 420cc twin, premium build, feature-loaded and Easy Ride Clutch — but does it deliver where it truly matters?8 mins read
Seshan Vijayraghvan | Apr 25, 20262026 MG Majestor Review: Bold, Feature-Packed And Off-Road ReadyWe spent time with the MG Majestor to see how much of an improvement it is over the Gloster, and whether it can take on the segment leader – Toyota Fortuner.9 mins read



















































































































