NEW YORK - Sam Bankman-Fried's former lieutenant and business partner recounted the FTX cryptocurrency exchange's dramatic collapse on the witness stand on Friday, stating his former boss' tweets assuring customers the exchange was "fine" were false.

In testimony that could prove damning for Bankman-Fried's defense, Gary Wang said his boss was aware of an $8 billion shortfall in customer assets on Nov. 7, 2022, when he tweeted in the face of a surge of customer withdrawals, "FTX is fine. Assets are fine."

"FTX was not fine," Wang said toward the end of nearly four hours of questioning by prosecutors on Thursday and Friday in Manhattan federal court. "Assets were not fine, because FTX did not have enough assets for customer withdrawals."

Federal prosecutors say Bankman-Fried plundered billions of dollars in FTX customer funds to prop up the hedge fund he and Wang co-owned, Alameda Research, as well as to buy real estate and donate to U.S. political campaigns to garner influence in Washington, D.C.

Bankman-Fried has pleaded not guilty to two counts of fraud and five counts of conspiracy. His lawyer said during opening statements on Wednesday that Bankman-Fried "overlooked" key functions like risk management but never intended to defraud his customers.

Wang, FTX's former chief technology officer, testified on the third and fourth days of Bankman-Fried's trial, which comes nearly a year after the exchange's November 2022 bankruptcy shocked financial markets and left the 31-year-old former billionaire's reputation in tatters.

Former college roommates, Wang and Bankman-Fried were living together at the time along with eight other Alameda and FTX executives in a $35 million penthouse in the Bahamas, where FTX was based.

On Friday, Wang testified that on Nov. 6, 2022, FTX executive Nishad Singh knocked on his door and told him customers were trying to withdraw their money faster than FTX could process the transactions.

Days earlier, crypto news site CoinDesk had published a leaked Alameda balance sheet showing the fund's assets were composed primarily of crypto tokens FTX or its executives had created.

Wang said Bankman-Fried then instructed him to calculate how much additional money would need to be deposited on FTX so customers could withdraw their funds.

When he told Bankman-Fried that Alameda owed the exchange $8 billion, Bankman-Fried responded with what Wang described as a "neutral" demeanor, "That sounds about right."

WANG HOPES FOR NO PRISON TIME

Wang, 30, is one of three former members of Bankman-Fried's inner circle who have pleaded guilty to fraud charges and entered a cooperation agreement with the government. He said on Friday he "ideally" hoped to serve no prison time in exchange for his cooperation, though his sentence will ultimately be decided by U.S. District Judge Lewis Kaplan.

Earlier on Friday, he testified about several changes Bankman-Fried asked him to make to FTX's software code to allow Alameda to withdraw unlimited funds from the exchange. He said no other FTX users had those special privileges, which the exchange did not disclose to its investors or customers.

During cross-examining on Friday afternoon by Bankman-Fried's lawyer Christian Everdell, Wang agreed that the changes were necessary for Alameda to provide liquidity on the exchange.

Wang's cross-examination is expected to continue when the trial resumes on Tuesday. After that, prosecutor Nicolas Roos said the government plans to call Caroline Ellison, Alameda's former chief executive and Bankman-Fried's ex-girlfriend. She has also pleaded guilty.

Mark Cohen, another Bankman-Fried lawyer, said in his opening statement on Wednesday that jurors should question whether cooperating witnesses were "spinning" Bankman-Fried's actions that they had agreed with at the time as nefarious in hindsight.

After FTX declared bankruptcy on Nov. 11, 2022, Wang testified that at Bankman-Fried's direction, he turned over some remaining FTX customer assets to the Bahamas, where FTX was based. Wang said Bankman-Fried said liquidators and regulators there were more amenable to letting him stay in charge of FTX.

"The U.S. side was asking me to transfer the remaining assets to the US and Sam told me that we should try to stall them," Wang said, referring to FTX's U.S. bankruptcy lawyers.

Days later, on Nov. 16, Wang said returned to the United States. He said he had his first meeting with U.S. law enforcement the following day.

(Reporting by Jody Godoy and Luc Cohen in New York Editing by David Gregorio, Nick Zieminski and Matthew Lewis)