Federal regulators have charged FTX’s former director of engineering Nishad Singh with fraud.

In a set of complaints filed on Tuesday, both the U.S. Securities and Exchange Commission (SEC) and the Commodity Futures Trading Commission (CFTC) alleged that Singh conspired to defraud FTX’s investors and users.

The CFTC alleged that Singh created features in the exchange’s code that allowed Alameda Research unfair advantages on FTX, including an unlimited line of credit and an exemption from the exchange’s auto liquidation function.

Singh also reallocated Alameda’s $8 billion in liabilities to a customer account on FTX’s systems that former FTX CEO Sam Bankman-Fried referred to as “the weird Korean account.” This effectively made Alameda’s negative balance on FTX indistinguishable, although it was hiding in plain sight. 

The SEC’s complaint adds on to these charges, finding that Singh falsely characterized $50 million that was transferred from another entity as revenue, upon Bankman-Fried’s instructions, to make it appear as if FTX had hit its goal of one billion dollars in annual revenue in 2021. Singh then allegedly backdated fraudulent transfers and falsified documents to support these lies.

Despite being aware of the commingling of funds between Alameda and FTX, and the “dire financial condition” of these two entities, Singh withdrew millions of dollars from FTX for personal use in the summer of 2022, said the SEC.

The two regulators’ charges follow Singh entering a guilty plea in a federal court on Tuesday, Reuters reported. He pleaded guilty to one count of wire fraud, three counts of conspiracy to commit fraud, one count of money laundering and one count of conspiracy to defraud the U.S. by violating campaign finance laws. 

Singh said he was “unbelievably sorry” for his role and would forfeit all proceeds from the scheme. He has agreed to cooperate with prosecutors in their investigation into Bankman-Fried, joining former Alameda CEO Caroline Ellison and FTX co-founder Gary Wang.

Bankman-Fried has pleaded not guilty to the twelve counts he has been charged with and is set to face trial in October.