
The Rise and Fall of Gary Wang, the Chinese Prodigy Programmer Who Forged the Knife Used Against FTX
TechFlow Selected TechFlow Selected

The Rise and Fall of Gary Wang, the Chinese Prodigy Programmer Who Forged the Knife Used Against FTX
Gary Wang, once a prodigy programmer celebrated in his time, was like a sharp and bloodthirsty blade wielded in the wrong direction, ultimately ending in a messy and inglorious conclusion.
Author: Meta Era Guest Author "Giovanni Chen"
On October 3, the bankruptcy case of FTX—the once second-largest cryptocurrency exchange in the world—officially went to trial in New York. In court, the judge, SBF, and multiple witnesses engaged in intense exchanges, revealing explosive details. Witness testimonies and statements reconstructed how SBF operated FTX, unveiling the internal mechanisms of this former No. 2 ranked exchange with a peak market value of $32 billion.

On the day of the trial, key insiders closest to SBF—Gary Wang, Caroline Ellison, and Trabucco—appeared on the witness stand. One Chinese face drew immediate attention from all media and the public: the bespectacled, introverted, and mild-mannered man was Gary Wang, co-founder and CTO of FTX.

Gary Wang immediately dropped bombshells, personally exposing the backdoor relationship between FTX and Alameda:
-
SBF allowed Alameda to withdraw unlimited funds from FTX. In 2019, Gary, as CTO, personally coded a function into the FTX system that enabled Alameda to siphon customer funds. Moreover, Alameda could trade using more funds than actually existed in its account—effectively granting it the privilege to misuse user assets and engage in unlimited trading.
-
At the time of FTX’s collapse, Alameda’s credit limit had ballooned to an absurd $65 billion, and it directly withdrew $8 billion from the FTX platform. These $8 billion exactly matched the funding shortfall in FTX’s corporate accounts—and came from FTX customers.
-
Additionally, the publicly disclosed balance of FTX’s insurance fund (a safeguard fund designed to cover counterparty liquidation risks) was falsified. The amount was generated by a random number generator and did not match actual database records—the real figure was significantly lower. This exposed deceptive practices in FTX’s financial reporting and audits.
Watching his once most trusted “comrade” testify and reveal shocking data and information, SBF trembled uncontrollably. He rubbed his eyes vigorously, trying to regain composure, his gaze filled with despair.
Who is Gary Wang?
According to Gary’s own testimony, as a co-founder of FTX, he earned a $200,000 annual salary and held 17% equity in FTX and 10% in Alameda, making him the second-most powerful figure after SBF. While SBF handled company strategy, PR, and communications, Gary focused primarily on coding.
Based on the equity valuations of FTX and Alameda, in April 2022, 28-year-old Gary ranked among the Forbes billionaire list as the wealthiest person under 30, with a net worth of $5.9 billion.

As one of the most mysterious billionaire executives, Gary maintained a reclusive personality, rarely appearing in public. There are only a handful of photos of him online, and even colleagues often went long periods without seeing him. His LinkedIn profile photo shows only his back.

Gary and SBF: From Acquaintance to Alliance
According to public records, Gary was born in China and immigrated to New Jersey, USA, with his parents at age eight. He excelled academically from a young age, showing exceptional talent and interest in mathematics and programming.
In 2010, he met SBF and Trabucco (another FTX executive) during a high school math competition. The three participated together in a summer math program hosted by MIT and later enrolled in MIT’s mathematics program. Trabucco and Gary pursued bachelor's degrees in mathematics and computer science, while SBF studied physics.

During college, SBF and Gary built deep trust. They were roommates for three years. Outside of academics, they often played games and solved puzzles together. In their free time, they both joined the Epsilon Theta fraternity. Gary was quiet and reserved—many found him difficult to communicate with or approach—but SBF, through years of observation, deeply understood Gary’s character and abilities, especially his extraordinary talent in programming and mathematics (Gary once won MIT’s programming competition).
“Many people think Gary is hard to get along with, so they keep their distance. But I don’t. I believe Gary doesn’t intentionally isolate himself from the world. He’s incredibly intelligent and can dedicate time to solving very difficult problems,” SBF recalled.
Their shared academic journey forged a strong bond. After graduation, SBF joined Jane Street, a Wall Street trading firm, while Gary went to Google to develop Google Flights, an engine for integrating flight prices.
In November 2017, SBF founded Alameda Research, a quantitative trading firm focused on crypto markets, in San Francisco. Immediately, he thought of Gary working at Google. He flew to Boston and persuaded Gary to join: “Your talent will thrive in trading. The cryptocurrency market is full of endless opportunities. Let’s build something together!” SBF vividly described his grand ambitions to Gary.
Gary felt his work at Google lacked challenge, so he accepted SBF’s invitation and moved to San Francisco.
They often fought side by side—Gary coded around the clock, while SBF frequently slept at the office. Both averaged only 4–5 hours of sleep per day.

Gary Wang’s Quantitative Program
Initially, SBF used personal capital to operate Alameda, trading major and minor cryptocurrencies, but performance was poor—losses sometimes reached $500,000 per day.

After Gary joined Alameda, the team eventually settled on an arbitrage strategy exploiting Bitcoin price differences between Japan, the U.S., and South Korea. Crucially, Gary developed the entire quantitative program that enabled rapid arbitrage across different markets. The system automatically detected price discrepancies and executed trades instantly, allowing risk-free arbitrage. With this capability, SBF secured $170 million in funding from investors. At its peak, Alameda processed over $10 billion in daily trading volume and earned staggering daily profits of up to $25 million.

Gary Wang’s Liquidation Engine
But this was just the beginning. As early as 2018, SBF asked Gary to write software for a Bitcoin exchange. Gary completed a prototype called CryptonBTC within a month. Although it never became a product, SBF knew that if tasked with building a derivatives exchange, Gary could do it in a month—and better than any other exchange on the market. Gary was an undisputed programming genius.
However, a common problem in derivative exchanges at the time was that when a client’s position incurred losses and required margin top-ups, the exchange would first request additional collateral. If market movements were too fast, the exchange itself would end up absorbing the loss.
Later, in FTX’s codebase, Gary invented a new liquidation engine capable of monitoring client positions on a per-second basis. When a client’s margin fell below threshold, the system would trigger immediate liquidation, thus protecting the exchange’s funds. Although traders found this feature annoying, it solved a critical issue that had long plagued exchanges. After Gary implemented this mechanism at FTX, Binance, Kraken, and others followed suit.

Gary’s Cross-Margin Functionality
Moreover, in standard derivatives trading, users must post collateral in specific assets, limiting financial flexibility. To address this, Gary developed a “cross-margin” feature for FTX, allowing users to collateralize trades using multiple digital assets. This functionality was later adopted by other derivatives exchanges.
SBF’s Bloodthirsty Blade
In reality, as SBF’s right-hand man in building his empire, Gary was not merely an outstanding programmer—he was also a top-tier product manager. Gary could independently develop products ahead of competitors based solely on market demand. Nishad Singh, FTX’s engineering lead, mainly coordinated engineers, while the most critical products were often built entirely by Gary alone.
Meanwhile, Gary handled SBF’s special programming requests—functions accessible and visible only to Gary and SBF. Even FTX’s engineering team remained unaware of all the programs Gary wrote. This included the “negative balance allowance” feature enabling Alameda to transfer assets from FTX, a program that allowed Alameda unrestricted access to FTX customer funds.

The Fall of FTX’s Core Team
Under SBF and Gary’s leadership, FTX rose to become the world’s second-largest exchange by trading volume, with a market cap peaking at $32 billion. Yet in November 2022, FTX collapsed within a week, leaving over 1 million creditors with more than $10 billion in debt—an event dubbed the “Lehman Moment” of the cryptocurrency world.
The core FTX team lived together in a penthouse apartment in the Bahamas. When the scandal broke, police raided the residence and detained all key FTX personnel, including Gary.


Once arrogant and ambitious, SBF had said: “I have a 5% chance of becoming President of the United States.” Today, he is widely condemned as a “fraudster.”
At the same time, the brilliant programmer Gary suffered inner turmoil. In December 2022, he pleaded guilty to charges including wire fraud, commodities fraud, and securities fraud, facing up to 50 years in prison. Currently, Gary is cooperating with prosecutors in hopes of receiving a reduced sentence.

Once renowned, the prodigious programmer Gary Wang was a sharp and deadly blade—but ultimately wielded in the wrong cause, leading to a tragic and inglorious end.
Meanwhile, the FTX trial continues. What will be the final verdicts for SBF and Gary? We wait and see.
Join TechFlow official community to stay tuned
Telegram:https://t.me/TechFlowDaily
X (Twitter):https://x.com/TechFlowPost
X (Twitter) EN:https://x.com/BlockFlow_News














