A Calculation Vulnerability Led to the Theft of 8,535 ETH from Truebit

marsbitPublished on 2026-01-13Last updated on 2026-01-13

Abstract

On January 8, 2026, the Truebit Protocol was exploited, resulting in a loss of 8,535.36 ETH (approximately $26.44 million). The attack involved a critical integer overflow vulnerability in the token purchase price calculation function. The attacker executed four rounds of transactions by calling functions getPurchasePrice, 0xa0296215, and 0xc471b10b. In the first round, the attacker called getPurchasePrice with a large input value (240442509453545333947284131), which returned 0 due to an arithmetic flaw. Then, they invoked function 0xa0296215 with msg.value = 0, successfully minting a massive amount of TRU tokens. Finally, by calling function 0xc471b10b, they burned the minted tokens and received 5,105.06 ETH. The root cause was an unchecked addition operation (v12 + v9) in the price calculation logic (function 0x1446), which overflowed to a small value, making (v12 + v9) / v6 = 0. The contract used Solidity ^0.6.10 without overflow checks, enabling the exploit. This incident highlights the risks of older DeFi protocols with unpatched vulnerabilities, possibly identified through AI-assisted scanning. Projects are advised to conduct security audits, upgrade contracts, and monitor链上 activity to mitigate such threats.

On January 8, 2026, the Truebit Protocol was hacked, resulting in a loss of 8,535.36 ETH (approximately $26.44 million). The Truebit Protocol officially confirmed the incident in the early hours of the following day. The ExVul security team conducted a detailed analysis of the vulnerability, with the results as follows:

Attack Process

Attacker's address:

0x6c8ec8f14be7c01672d31cfa5f2cefeab2562b50

Attack transaction hash:

0xcd4755645595094a8ab984d0db7e3b4aabde72a5c87c4f176a030629c47fb014

The attacker completed the attack by cyclically calling getPurchasePrice→0xa0296215→0xc471b10b for four rounds. The first cycle is analyzed as an example.

1. The attacker first called the getPurchasePrice(240442509453545333947284131) function, which returned 0.

2. The attacker called the 0xa0296215(c6e3ae8e2cbab1298abaa3) function with msg.value as 0. Finally, 240442509453545333947284131 TRU were successfully minted.

3. The attacker called the 0xc471b10b(c6e3ae8e2cbab1298abaa3) function. Finally, 240442509453545333947284131 TRU were burned, and 5105.06 ETH were obtained.

Attack Logic Analysis

By understanding the above attack process, it is clear that there is an issue with the logic of the getPurchasePrice function and the 0xa0296215 function. The following is an in-depth analysis (since the contract is not open source, the code below is decompiled).

By comparing the common points of the two functions, we can see that the 0x1446 function is used to calculate how much ETH is needed to purchase a specified amount of TRU. Clearly, the logic of the 0x1446 function is flawed, leading to an incorrect ETH calculation. The logic within the 0x1446 function is analyzed in detail below.

Observing the logic in the 0x1446 function, since the final calculation result v13 == 0, the calculation logic mentioned above must be problematic. It is important to note that the 0x18ef function is the same as _SafeMul, so the issue lies in the native addition v12 + v9 (the contract version is ^0.6.10, so there is no overflow check).

v12 and v9 represent:

Based on the above analysis, the attacker's strategy was to input a huge _amountIn to cause v12 + v9 to overflow into a very small value, ultimately resulting in (v12 + v9) / v6 == 0.

Summary

The root cause of the Truebit Protocol attack is a severe integer overflow vulnerability in its token purchase price calculation logic. Since the contract uses Solidity ^0.6.10 and lacks safety checks for critical arithmetic operations, it ultimately led to a significant loss of 8,535.36 ETH. The latest versions of Solidity have already mitigated overflow vulnerabilities. This attack was likely discovered by hackers using AI to automatically scan older DeFi protocols that are already live (including recent attacks on Balancer and yETH). We believe such attacks exploiting AI to target older DeFi protocols will become increasingly common in the near future. Therefore, we recommend that project teams conduct new security audits of their contract code. If vulnerabilities are found, they should upgrade the contract or transfer assets as soon as possible, and implement on-chain monitoring to detect anomalies promptly and minimize losses.

Trending Cryptos

Related Questions

QWhat was the main vulnerability exploited in the Truebit Protocol attack?

AThe main vulnerability was an integer overflow issue in the token purchase price calculation logic, specifically in the `getPurchasePrice` function, which allowed the attacker to manipulate calculations and mint a large number of TRU tokens without paying the required ETH.

QHow much ETH was stolen in the Truebit Protocol attack?

A8,535.36 ETH, which was approximately equivalent to $26.44 million at the time of the attack.

QWhat was the attacker's address involved in the Truebit exploit?

AThe attacker's address was 0x6c8ec8f14be7c01672d31cfa5f2cefeab2562b50.

QWhich Solidity version was the Truebit Protocol contract using, and why was it significant?

AThe contract was using Solidity ^0.6.10, which did not have built-in overflow checks for arithmetic operations. This lack of safety checks allowed the integer overflow vulnerability to be exploited.

QWhat was the key step the attacker took to trigger the integer overflow vulnerability?

AThe attacker input a very large value for `_amountIn` in the `getPurchasePrice` function, causing the calculation `v12 + v9` to overflow and result in a very small value, ultimately making `(v12 + v9) / v6` equal to zero, which allowed minting tokens without cost.

Related Reads

After Three Consecutive Quarters of Decline, Can the Crypto Market Find a Window for Stabilization in Q3?

The cryptocurrency market has just concluded its worst-performing quarter since 2022, with total capitalization dropping 12.6% to $2.1 trillion. All core metrics indicate capital is leaving the sector, not just rotating within it. Bitcoin fell 14.2% and Ethereum dropped 25.4% in Q2, breaking their previous correlation with US tech stocks. A key driver is the reversal in US spot Bitcoin ETF flows, which saw a net outflow of approximately $4.67 billion in Q2, including a record monthly outflow near $4.5 billion in June. While recent data suggests long-term holders are accumulating again, sustained ETF outflows mean continued selling pressure. Market focus is now singularly on the Federal Reserve. The upcoming July FOMC meeting is seen as the most critical event for Q3. A dovish signal could support Bitcoin reclaiming a $68,000-$84,000 range, while a hawkish stance might establish a new trading band around $50,000-$56,000. Additionally, regulatory uncertainty persists, with the progress of the crucial *CLARITY Act* stalling in the Senate, reducing its perceived 2026 passage probability to 40-45%. Despite the broad downturn, a few sectors showed growth. Prediction markets saw nominal volume surge 48.7% year-over-year to $113.8 billion, and tokenized collectibles transaction volume rose 143% quarterly to $1.4 billion. The Real-World Asset (RWA) tokenization sector also continued steady growth, now representing ~$28.1 billion in on-chain value. The market's foundation for an extreme crash appears limited, with Bitcoin price hovering near its 200-week moving average. However, the trading paradigm has shifted from narrative-driven speculation to decisions based on price action, policy developments, and interest rate expectations, making a broad sentiment-driven rally unlikely in the near term.

marsbit3h ago

After Three Consecutive Quarters of Decline, Can the Crypto Market Find a Window for Stabilization in Q3?

marsbit3h ago

BIT Trading Moment: BTC Still Suppressed by Weekly 200 EMA, Rejection May Restart Decline; Storage and Semiconductors that Surged Last Night Begin Falling in Evening Trading

**Crypto & Stock Market Wrap: Bitcoin Tests Resistance, Stocks Retreat After AI Surge** Bitcoin consolidates around $66,000, facing key resistance near $68,000—an area seen as a major psychological and technical hurdle where previous rallies have failed. Analysts note the cryptocurrency is caught between its 200-week moving average (~$63,333) and 200-week EMA (~$68,328). A clear break above $68k is needed to signal a stronger bullish trend, while a rejection could lead to a retest of $63k support. Market sentiment remains cautious, with low futures open interest pointing to a low-liquidity rebound rather than a full bull market. Bitcoin spot ETFs saw another $203 million inflow. US stock futures pointed lower after a strong Tuesday session led by a massive rebound in semiconductors and memory stocks. The rally was fueled by renewed optimism about AI-driven hardware demand, with Micron, SanDisk, and SK Hynix surging. However, those gains reversed in pre-market trading. Super Micro Computer (SMCI) soared over 20% after hours on strong guidance and a record backlog. Other standouts included Rocket Lab and nuclear energy plays Oklo and X-Energy. Rising oil prices (Brent above $91) and climbing Treasury yields (10-year near 4.64%), however, are reigniting inflation concerns and acting as a headwind for equities. In Asia, markets were mixed. South Korea's KOSPI pared early gains to close slightly higher as semiconductor stocks like SK Hynix gave back initial surges. Japan's Nikkei edged lower as the yen hit a fresh 38-year low against the dollar, raising fears of potential market intervention. Key events to watch include the Samsung Galaxy launch, AMD's AI event, and a slew of major tech earnings from Alphabet, Tesla, and IBM after the close on Wednesday, followed by the ECB meeting and Intel's earnings on Thursday.

marsbit4h ago

BIT Trading Moment: BTC Still Suppressed by Weekly 200 EMA, Rejection May Restart Decline; Storage and Semiconductors that Surged Last Night Begin Falling in Evening Trading

marsbit4h ago

Former CFTC Chairman, Circle President Tarbert: Preaching Long-Termism While Cashing Out $30 Million Himself

Former CFTC Chairman and Circle President Heath Tarbert has consistently advocated for a long-term vision in public, urging patience from investors as Circle’s stock price has fallen significantly from its peak. However, it has been revealed that since Circle’s IPO, Tarbert has continuously sold his CRCL shares through pre-arranged trading plans, cashing out approximately $30 million, without making any public market purchases. This contrast between his public messaging and personal actions has drawn criticism. Tarbert joined Circle in July 2023 as Chief Legal Officer, leveraging his regulatory experience to help guide the company through its IPO and expansion. Despite promoting stablecoins as long-term infrastructure, he established a 10b5-1 trading plan just before Circle went public, leading to substantial stock sales over the following year. In March 2026, he initiated another plan to sell more shares. His career trajectory highlights a pattern of moving between high-level regulatory roles and influential positions in the financial sector. After resigning as CFTC Chairman in early 2021, he joined Citadel Securities as Chief Legal Officer just 27 days later, during a period of intense regulatory scrutiny for the firm. He later joined Circle, aiding its efforts to navigate regulatory challenges for its public listing. While Tarbert's expertise in policy and compliance is valuable to companies like Circle, his actions—advocating long-term confidence while personally divesting—raise questions about the alignment between his public statements and his private financial decisions, leaving investors who followed his advice to bear the market risks.

marsbit4h ago

Former CFTC Chairman, Circle President Tarbert: Preaching Long-Termism While Cashing Out $30 Million Himself

marsbit4h ago

Gate Research Institute: The 'Wall Street-ization' Wave of Crypto Financial Products – Competition or Integration?

The article titled "Gate Research Institute: Are Crypto Financial Products Sparking a 'Wall Street' Wave—Competition or Convergence?" explores the evolving relationship between the crypto ecosystem and traditional finance (TradFi). The piece begins by reflecting on Bitcoin's original 2009 vision of decentralization, disintermediation, and moving away from banks. It then contrasts this with the 2024 landscape, where key crypto assets like Bitcoin are increasingly held through Wall Street products like ETFs issued by giants like BlackRock. The article questions whether this signifies that TradFi is systematically taking over the rights to issue, price, custody, and distribute crypto financial assets. The core argument is that this is not a zero-sum takeover but rather a bidirectional convergence where each side addresses the other's weaknesses. Crypto offers 24/7 global markets, programmable settlement, and open access but lacks compliant channels, institutional-grade custody, deep fiat liquidity, and mainstream distribution. TradFi possesses these but is constrained by legacy systems, limited operating hours, and slow settlement. Two primary convergence paths are highlighted: * **Path A (CEX to TradFi):** Exemplified by Gate, which has progressed from offering tokenized stocks and CFDs to providing direct, real stock trading (US, Hong Kong, South Korea) within its platform, using USDT. * **Path B (TradFi to Crypto):** Exemplified by Robinhood, which has integrated crypto trading, acquired exchanges like Bitstamp, and is moving traditional assets like stocks onto the blockchain via tokenization and its own Layer 2. Both paths are ultimately competing to become the next-generation, unified financial account—a "super account" where users can seamlessly trade cryptocurrencies, stocks, ETFs, RWA (Real World Assets), and tokenized treasury products in one interface. The growth of RWA and tokenized treasuries (e.g., BlackRock's BUIDL) is presented as the asset-layer fusion, providing stable, yield-bearing assets on-chain and acting as a bridge between the two worlds. In conclusion, the "Wall Street-ization" of crypto is framed as a mutual transformation. Decentralized ideals persist in the protocol layer, while at the application layer, a more efficient, global, and accessible unified capital market is emerging from this convergence. The future competition lies not between crypto exchanges and stockbrokers, but between platforms vying to offer the most comprehensive asset coverage, liquidity, and user experience within a single account.

marsbit4h ago

Gate Research Institute: The 'Wall Street-ization' Wave of Crypto Financial Products – Competition or Integration?

marsbit4h ago

Trading

Spot

Hot Articles

Discussions

Welcome to the HTX Community. Here, you can stay informed about the latest platform developments and gain access to professional market insights. Users' opinions on the price of ETH (ETH) are presented below.

活动图片