(Bloomberg) -- FTX co-founder Gary Wang is on the stand Friday in the trial of Sam Bankman-Fried, the cryptocurrency exchange’s other co-founder. Wang, Bankman-Fried’s MIT roommate, is the first of three star witnesses testifying for the government.

Wang spent less than an hour on the witness stand Thursday but quickly testified that he and Bankman-Fried committed a multibillion-dollar fraud at the cryptocurrency exchange. Wang, 30, pleaded guilty to fraud and criminal conspiracy last December, a month after FTX’s collapse, in a cooperation deal with federal prosecutors

Prosecutors kicked off the trial this week by portraying SBF as a calculated criminal who knowingly committed fraud by embezzling FTX customer money and confiding to his inner circle about it. 

Bankman-Fried’s lawyers hinted at his defense strategy, arguing he was a math nerd who built two successful companies that were hit by market downturns in 2022. Risk management at FTX and sister hedge fund Alameda Research was flawed, they argued, but he never intended to steal customer funds.

Here’s the latest from court (all times are NY): 

Trial Ends for the Day, Ellison Up Next (1:59 p.m.): 

The judge concluded the trial for the day. Questioning of Wang by defense attorneys will continue next week, and the government announced that Caroline Ellison will be the next witness on the stand. The trial will resume on Tuesday. 

Defense Focuses on Alameda as Market Maker (1:38 p.m.)

Back in cross-examination, Wang tells Everdell that he understands that his sentencing is not dependent on the outcome of this trial and that “telling the truth” is what matters the most.

Everdell begins to drill Wang on the reasons Alameda received special privileges, in an attempt to build the argument that the privileges were necessary for Alameda — and FTX by extension — to operate properly.

He asks Wang whether Alameda was permitted to carry a negative account balance so that it could conduct market-making activities. Wang replied that the ability to go into the negative was necessary to allow Alameda to do stablecoin conversions for customers.

Wang also answered “yes” when asked whether increasing Alameda’s line of credit — ultimately up to $65 billion — was to ensure trading activities weren’t affected. With the questions, the defense is attempting to lay the groundwork for the argument that these special privileges were necessary for Alameda, and FTX by extension, to operate properly.

Wang Details Final Days of FTX (1:30 p.m.)

Before cross-examination started, Wang went through a timeline on the moments leading up to FTX filing for bankruptcy on Nov. 11, 2022. He told jurors he first learned of an uptick in customer withdrawals on Nov. 6 from Singh.

FTX’s problems were spurred by a Nov. 2 article from the news site CoinDesk that showed much of Alameda Research’s balance sheet was made up of FTX’s native token, FTT. On Nov. 6, one of Bankman-Fried’s rivals, Changpeng Zhao, or “CZ,” announced his firm Binance Holdings Ltd. was selling roughly $530 million of FTT holdings on its books. FTT’s price fell, causing a panic among traders who rushed to withdraw funds from FTX.

Wang said FTX couldn’t meet withdrawals because it no longer had the funds, having sent billions of dollars of customer money to Alameda. He said a Nov. 7 tweet from the company that withdrawals were slow because banks were closed didn’t accurately convey what was happening. Wang said statements from Bankman-Fried suggesting everything was fine weren’t accurate. 

“FTX was not fine and assets were not fine,” he told the jurors.

Cross-Examination of Wang Begins (1:11 p.m.)

Bankman-Fried’s defense lawyer Christian Everdell is starting his cross examination of Wang on the witness stand.

Wang Cooperation Agreement (1:05 p.m.)

Wang told jurors he flew to the US from the Bahamas shortly after FTX filed for bankruptcy protection, meeting with investigators and agreeing to cooperate. He said pleaded guilty to criminal fraud charges in December, a month later.

Wang said he faces a maximum of 50 years in prison when he’s sentenced, but is hoping for “ideally no prison time.” He told jurors he signed a six-page cooperation agreement that requires him to meet with prosecutors, answer their questions truthfully and turn over evidence. 

If he complies, prosecutors will provide details of his cooperation to the sentencing judge in a document called a “5K letter.” White-collar defendants who get 5K letters are usually sentenced leniently and often avoid spending time behind bars. Wang said he’s met with the government at least a dozen times.

Emergency Meeting on FTX, Alameda (1:02 p.m.)

Wang discussed an emergency meeting he had with Bankman-Fried, Ellison and Singh in the Bahamas about a Bloomberg News story published in September about the relationship between FTX and Alameda. The article discussed the close relationship between the two firms, including their shared corporate campus in the Bahamas and the fact Bankman-Fried was living in an apartment with Ellison and other employees.

In interviews with Bloomberg, both Bankman-Fried and Ellison emphasized that FTX and Alameda were completely separate companies with strict barriers in place between them to prevent sharing of information. Ellison said that Alameda had no special privileges from FTX.

“It’s very important for FTX to be perceived as a fair, neutral marketplace where everyone gets an equal shot,” she said.

SBF Considered Closing Alameda (12:30 p.m.)

FTX co-founder Sam Bankman-Fried proposed closing Alameda Research, an affiliated hedge fund in September 2022, a few months before both companies filed for bankruptcy, following concerns about conflicts of interest between the two.

Alameda was running up as much as $14 billion in debts to FTX at the time, according a number tallied by Alameda CEO Caroline Ellison, and Bankman-Fried ultimately decided that he couldn’t shut down the hedge fund because it would never be able to repay the losses, Wang said.

Alameda Absorbed Some Losses (11:30 a.m.)

Wang testified about problems with FTX’s backstop insurance fund, which was intended to cover losses when a customer’s position needed to be liquidated. He testified that a page on the FTX web page that claimed to show the value of the backstop insurance was a fake number.

He told jurors about the “MobileCoin exploit” of 2021, in which a customer took advantage of a “loophole” in FTX’s margin system, depositing a small amount of collateral while putting on a large position over a couple of months. When MOB dropped and the position needed to be liquidated, at the loss of several hundred million dollars, Bankman-Fried instructed that the customer’s position and collateral be transferred to Alameda to absorb the loss.

The court then took a 15 minute break. 

‘The Money Belonged to Customers’ (10:40 a.m.)

Alameda was the only account allowed to have a negative balance, without limit, Wang said Friday. The company policy stated that other customers would have positions liquidated and accounts closed if the positions were losing too much value and the balances nearing zero.

One Alameda trader asked Bankman-Fried if Alameda could keep borrowing funds from the FTX exchange despite the negative balance, Wang said. Bankman-Fried replied as long as the amount Alameda withdraws from FTX is less than what FTX’s total trading volume at the time, then it’s fine to allow Alameda to keep withdrawing.

“The money belonged to customers and the customers did not give us permission to use it for other things,” Wang said.

Wang also told the jury that Alameda accessed FTX funds through a line of credit with the exchange, which Bankman-Fried eventually authorized to be $65 billion. He explained that no other customers had line of credit beyond $1 billion, and that only “a few thousand customers” had single to double digit of millions in line of credit.

Wang Discusses Key Moment with Nishad Singh (10:08 a.m.)

Wang, who was known to be a gifted, but extremely quiet coder in the FTX office, seemed nervous and spoke very quickly during his testimony. He walked the jury through the special advantages Alameda had as a customer on FTX, which included the ability to make trades quickly and without collateral, a $65 billion line of credit and the ability to avoid having its account liquidated and closed when its crypto bets went sour.

He discussed a key moment involving another former FTX executive, Nishad Singh. He said the former engineering head made a change to software code in July 2019 that allowed Alameda to have a negative balance without having its account closed. Singh is also on the list of potential witnesses and made a cooperation deal, pleading guilty to six criminal counts, including wire fraud, conspiracy to commit securities fraud and a campaign finance law violation in February.

But ultimately, Wang pointed to Bankman-Fried, whom he had known since they attended a high school math camp together. The two attended MIT together, pledging the same fraternity. 

Alameda Had “Special Advantages” (9:40 a.m.)

Wang entered the courtroom without making eye-contact with Bankman-Fried, speedily walking down the aisle to take the stand. Wang began by explaining technical issues for the jury, including the difference between front-end code, which controlled client-facing elements on the FTX site, and back-end code, which was used to track and value trades and keep track of accounts.

Wang, FTX’s former chief technology officer, testified that Alameda Research was given “special advantages” in FTX’s code, including an “allow negative” feature to borrow “money belonging to other customers of FTX.” When FTX melted down in November, Alameda had a negative balance of $8 billion.

--With assistance from Ava Benny-Morrison.

(Updates headline. A previous version of the story corrected misspelling of SBF in the headline.)

©2023 Bloomberg L.P.