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

Why Didn't Oil Prices Stabilize Above $100 as Traffic Through the Strait of Hormuz Plunged Again?

Despite a significant drop in daily oil tanker traffic through the critical Strait of Hormuz in August, Brent crude oil prices have failed to stabilize above $100 per barrel, instead hovering around $90. This contrasts with traditional market logic, where a threat to a chokepoint handling roughly 20 million barrels per day (27% of global seaborne oil) should trigger a sustained supply risk premium. The article explains that the market is pricing in increased transit costs rather than an imminent, complete supply cutoff. Investors currently believe multiple buffers can absorb the shock: strategic and commercial inventories, the potential for coordinated stock releases, available OPEC+ spare capacity, and alternative export routes from the Gulf. Furthermore, workarounds like ship-to-ship transfers outside the Strait and route adjustments by buyers and shippers add resilience, though at a higher cost for insurance, financing, and longer voyages. The underlying U.S.-Iran tensions frame this reassessment as a problem of cost allocation across the supply chain. The price action suggests traders are awaiting clearer signals—such as a military escalation, sustained Iranian attacks, or stricter enforcement of secondary sanctions on buyers—before pricing in a worst-case, long-term disruption scenario. In the longer term, the episode is accelerating investments to reduce dependency on the Strait, such as expanded storage and pipeline infrastructure, which will embed higher costs into the energy system. While Brent may remain range-bound for now, the real-time impact of the Hormuz risk is likely appearing first in freight rates, insurance premiums, and regional product spreads like diesel crack margins. The stability of current prices depends on how much longer these existing buffers can effectively absorb the mounting transit costs and logistical friction.

marsbit4m ago

Why Didn't Oil Prices Stabilize Above $100 as Traffic Through the Strait of Hormuz Plunged Again?

marsbit4m ago

BONK Crypto Treasury Company Has Only $2.14 Million Cash Left, 70% of Revenue Comes from Founder's Own Platform

BONK Inc. (BNKK), the NASDAQ-listed company associated with the Solana meme coin BONK, reported stark financials for the first half of the year. While revenue skyrocketed 6,218% year-over-year to $5.5 million, the company posted a net loss of $7.88 million and its cash reserves plummeted to just $214,000. Its auditors issued a "going concern" warning, citing cumulative losses of $191.4 million, negative operating cash flow, and critically low liquidity. A critical detail is that $3.92 million, or 71%, of its revenue came from an "affiliate revenue share" with LetsBonk.fun, a meme coin launchpad. This platform is linked to founder Mitchell Rudy, whose entity, Lucky Dog Holdings, beneficially owns approximately 40.2% of common stock and all C Series preferred shares. These preferred shares grant the holder the right to elect half of the company's board. The company's financial structure is further intertwined with Rudy; it sold $50 million worth of stock to his entities, accepting payment in BONK tokens. Fluctuations in the value of these and other held digital assets led to an $8.17 million unrealized loss, the primary driver of the net loss. With operating cash outflows of $4.17 million for the half-year, the remaining cash covers roughly nine days of operations at the current burn rate, highlighting severe financial strain despite top-line growth.

marsbit37m ago

BONK Crypto Treasury Company Has Only $2.14 Million Cash Left, 70% of Revenue Comes from Founder's Own Platform

marsbit37m ago

CryptoQuant Noted a Signal of a Bitcoin Reversal

CryptoQuant has highlighted a potential reversal signal for Bitcoin, suggesting the bearish phase might be nearing its end as on-chain metrics show initial signs of spot demand recovery. Their analysis indicates that the 30-day spot demand metric has recovered from -206,000 BTC in late July to approximately -5,000, close to turning positive for the first time since February 2026. Historically, such a reversal has been followed by a median 60-day price gain of 18.1%, with a win rate of 78% (increasing to 87% when valuations are depressed). However, they caution that this is a favorable sign, not a guarantee. Analysts from Bitfinex Alpha note that two of three conditions for a sustainable Bitcoin recovery are already met: improved Federal Reserve rate expectations and relatively accommodative financial conditions, thanks to easing inflation and reduced odds of a near-term rate hike. The missing third catalyst is a capital rotation from traditional markets (like stocks and AI infrastructure) into cryptocurrencies. If this occurs, Bitcoin could reclaim $70,000. Conversely, continued negative flows might see support tested around $57,000. Current headwinds include significant weekly outflows from US spot Bitcoin ETFs (roughly $385 million) and reduced stablecoin supply. Wintermute offers a more cautious outlook, pointing to the same large ETF outflows and ongoing miner selling pressure. They note that Bitcoin has failed to rally despite the improved Fed outlook, which is typically bullish for risk assets. As an example, they cite miner Riot Platforms, which sold a substantial portion of its Bitcoin reserves in Q2 as its mining cost (~$91,000 per BTC) remains far above the current market price, forcing sales for liquidity. This combination of ETF outflows and miner selling is suppressing new demand.

cryptonews.ru38m ago

CryptoQuant Noted a Signal of a Bitcoin Reversal

cryptonews.ru38m ago

Is a Strong Ruble Good? Not for the Budget: Treasury Already Short 1.5 Trillion

The Russian budget has lost about 1.5 trillion rubles in revenue since the start of 2026 due to the ruble being stronger than the government's planned exchange rate. The budget was based on an average annual rate of 92.2 rubles per US dollar, but the actual average for the first seven and a half months was just 76.9 rubles. This discrepancy creates a significant shortfall, as every ruble of appreciation against the dollar reduces annual budget revenues by 140–160 billion rubles. When accounting for oil and gas revenues, the sensitivity is even higher, with potential annual losses reaching up to 2.5 trillion rubles. So far this year, the budget has already missed out on roughly 1.7 trillion rubles. The ruble's exchange rate has shown considerable volatility in 2026, ranging from a low near 71 rubles per dollar in May to over 85 rubles by mid-August. Despite this recent weakening, the year's average remains well below the budget target, creating a structural deficit in oil and gas revenues. Forecasts suggest the final average rate for 2026 will be around 80–82 rubles, which would result in a budget shortfall of about 1.6 trillion rubles. A strong ruble reduces import costs and inflation but also cuts the ruble earnings of exporters and threatens the funding of social obligations. The gap between the planned and actual rate is attributed not only to oil price dynamics but also to the fiscal rule mechanism, which can influence the currency's direction. The Ministry of Finance recently halted foreign currency sales under this rule, removing dollar supply from the market and contributing to pressure on the exchange rate. The budget policy is now forced to adapt to a stronger ruble than originally planned.

cryptonews.ru39m ago

Is a Strong Ruble Good? Not for the Budget: Treasury Already Short 1.5 Trillion

cryptonews.ru39m 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.

活动图片