Exclusive – How Secret Software Changes Allowed FTX to Use Client Money

By Angus Berwick, John Shiffman and Koh Gui Qing

(Reuters) – In mid-2020, FTX’s chief engineer made a secret change to the cryptocurrency exchange’s software.

He modified 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 Alameda’s assets if it lost too much borrowed money.

In a note explaining the change, the engineer, Nishad Singh, stressed that FTX should never sell Alameda’s holdings. “Take extra care not to liquidate,” Singh wrote in the commentary in the platform’s code, which revealed he helped write it. Reuters reviewed the code base, which has not been reported before.

The exemption allowed Alameda to continue borrowing from FTX regardless of the value of the collateral backing those loans. That code tweak got the attention of the U.S. Securities and Exchange Commission, which charged Bankman-Fried with fraud on Tuesday. The SEC said the adjustment meant Alameda had a “virtually unlimited line of credit.” In addition, the billions of dollars that FTX secretly lent to Alameda over the next two years did not come from its own reserves, but rather were deposits from other FTX clients, the SEC said.

The SEC and a Bankman-Fried spokesperson declined to comment on this story. Singh did not respond to several requests for comment.

The regulator, calling the exchange “a house of cards,” alleged that Bankman-Fried concealed that FTX had diverted customer funds to Alameda to make secret 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 — offer new insights into how Bankman-Fried dipped client funds and spent billions more than FTX earned without knowledge of investors, its customers and most employees.

Police in the Bahamas, where FTX was based, arrested Bankman-Fried Monday night, 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 funding. FTX went bankrupt on November 11 and Bankman-Fried resigned as CEO.

Bankman-Fried has apologized to customers, but said he personally did not believe he was criminally liable.

The automatic liquidation exemption written into the FTX code allowed Alameda to continually increase its line of credit until it “grew into the tens of billions of dollars and became essentially unlimited,” according to the SEC filing. It was one of two ways Bankman-Fried diverted customer money to Alameda.

The other was a mechanism whereby FTX clients deposit more than $8 billion in traditional currencies into bank accounts secretly controlled by Alameda. These deposits were reflected in an internal account on FTX not linked to Alameda, which concealed its liability, the complaint said.

“SAFE, TESTED AND CONSERVATIVE”

As Bankman-Fried FTX grew into one of the world’s largest crypto exchanges, consumer protection was at the center of its pitch for crypto regulation in the United States. Bankman-Fried emphasized this theme in numerous statements to clients, investors, regulators and legislators. FTX’s automatic liquidation software would protect everyone, he explained.

In congressional testimony on May 12, he called FTX’s software “secure, tested, and conservative.”

“By quickly closing out the riskiest positions with the most collateral, the risk engine prevents the build-up of credit risk that could otherwise fall outside the platform, resulting in contagion,” Bankman-Fried testified.

He didn’t tell lawmakers about the software change to exempt Alameda. Indeed, he told investors that Alameda was not getting preferential treatment from FTX, according to the SEC complaint.

Bankman-Fried had instructed subordinates to update the software in mid-2020 to allow Alameda to maintain a negative balance in its account, the SEC filing said. No other customer account at Alameda was allowed to do this, the complaint added. This would allow Alameda to continue borrowing more FTX funds without having to provide more collateral.

Software tweaks made in August 2020 designated Alameda as the “Primary Market Maker,” or “PMM,” according to a Reuters review of its codebase. Market makers are dealers who facilitate the trading of an asset by being ready to buy and sell it.

To explain the change, Singh, the chief engineer, put a comment in the code: “Alameda would be liquidated, prevent.” He added a warning “not to liquidate the PMM”.

Only Singh, Bankman-Fried and a few other top FTX and Alameda officials knew about the code’s exemption, according to three former executives briefed on the matter. A digital dashboard used by staff to track the assets and liabilities of FTX customers was programmed to ignore the fact that Alameda had withdrawn the customer’s money, according to two of the people and a screenshot of the portal Reuters previously reported.

The Bankman-Fried house of cards “began to collapse” in May 2022, the SEC filing said.

As the value of cryptocurrencies plummeted that month, several lenders demanded repayment from Alameda. Since Alameda lacked the resources to meet these requests, Bankman-Fried directed Alameda to tap into its “line of credit” with FTX to obtain billions of dollars in funding, the complaint said.

When FTX customers rushed to withdraw their money in November, shaken by media reports about the company’s financial health, many eventually discovered that their money was gone.

(Reporting by Angus Berwick in London, John Shiffman in Washington and Koh Gui Qing in New York; editing by Paritosh Bansal and Chris Sanders)

Leave a Reply

Your email address will not be published. Required fields are marked *