March 1, 2026
|
Exploit Postmortem

The Truebit Exploit: How Olympix Could Have Prevented the $26.6M Loss

On January 8, 2026, Truebit Protocol was exploited for approximately 8,535 ETH, valued at roughly $26.6 million at the time of the attack. The root cause was a classic integer overflow vulnerability in a smart contract compiled with Solidity 0.6.10 and deployed in 2021, a contract that had never undergone a public third-party security audit. A second opportunistic attacker followed up and extracted an additional ~$224,000. The TRU token price collapsed by approximately 99.9% in the aftermath, dropping from around $0.16 to near zero.

This was the first major DeFi exploit of 2026. It was not sophisticated. It did not require a flash loan, oracle manipulation, or complex MEV construction. It required a five-year-old unprotected arithmetic operation and an attacker who knew where to look.

Background

Truebit is a decentralized protocol designed to extend Ethereum's computational capacity. Its token economics relied on a bonding curve mechanism: the Purchase smart contract algorithmically priced TRU tokens based on total supply, with users able to mint tokens by sending ETH and burn them to reclaim ETH from the reserve.

The vulnerable contract was deployed in 2021 using Solidity 0.6.10. It was closed-source on Etherscan and had been largely dormant for years, with no active maintenance, no bug bounty program, and no evidence of third-party security review. Despite this, the contract held tens of millions of dollars in ETH reserves.

The Vulnerability

The exploit centered on getPurchasePrice(uint256 amount), a function responsible for calculating how much ETH a user must send to mint a given quantity of TRU tokens. Internally, this function called a secondary pricing function (bytecode reference 0x1446) that computed the price using the following intermediate values:

v9  = 200 × total_supply × amount × _reserve
v12 = 100 × amount × amount × _reserve
result = (v9 + v12) / (25 × total_supply²)

The contract was compiled with Solidity 0.6.10, which does not include built-in integer overflow protection. In Solidity versions prior to 0.8.0, arithmetic on unsigned integers wraps silently when the result exceeds 2²⁵⁶. No error is thrown. No revert occurs. The value wraps to a small number near zero.

The attacker identified an input value of 240,442,509,453,545,333,947,284,131 TRU that caused v9 + v12 to exceed 2²⁵⁶. The concrete values at the time of exploitation:

total_supply = 161,753,242,367,424,992,669,183,203
_reserve     = 8,539,408,935,947,150,350,830 (cumulative ETH in wei)
amount       = 240,442,509,453,545,333,947,284,131

v9  = 66,423,545,631,423,422,609,669,496,562,964,283,492,426,512,017,211,670,495,718,637,486,587,674,438,000
v12 = 49,368,543,605,892,772,813,901,488,614,323,841,993,278,026,865,420,453,219,869,145,259,082,923,363,000

v9 + v12 > 2²⁵⁶  →  overflows to a small positive number
Final result / v6 = 0.000257757  →  rounded down to 0 wei

The purchase price returned was zero. The attacker could mint an unlimited supply of TRU tokens for free.

Attack Flow

The exploit was executed atomically in a single transaction on January 8, 2026 at 16:02:35 UTC.

Relevant addresses:

Exploiter 1 Wallet:        0x6C8EC8f14bE7C01672d31CFa5f2CEfeAB2562b50
Exploiter 1 Contract:      0x1De399967B206e446B4E9AeEb3Cb0A0991bF11b8
Exploiter 2 Wallet:        0xc0454E545a7A715c6D3627f77bEd376a05182FBc
Truebit Purchase Contract: 0x764C64b2A09b09Acb100B80d8c505Aa6a0302EF2

Step by step:

  1. Price query. Called getPurchasePrice() with the overflow-triggering amount. The function returned 0 wei.
  2. Free mint. Called buyTRU(), minting 240 million TRU tokens for 0 ETH.
  3. Sell into reserve. Called sellTRU(), exchanging the free TRU for real ETH held in the bonding curve reserve. Gained 8.33 ETH in the first iteration.
  4. Repeat. Executed the mint-and-burn cycle with progressively larger amounts, each iteration extracting additional ETH. Total extracted: 8,535.36 ETH (~$26.6M).
  5. Second attacker. A second actor observed the exploit and executed a follow-up attack, extracting an additional ~$224,000.

By 9am UTC on January 9, the primary attacker's funds had been split across two wallets:

0xD12f6E0fa7FBF4e3A1c7996E3F0Dd26AB9031a60  →  4,267.09 ETH (~$13.2M)
0x273589ca3713e7becf42069f9fb3f0c164ce850a  →  4,001.00 ETH (~$12.4M)

The second attacker routed 71.03 ETH (~$220K) directly to Tornado Cash. Recovery of any stolen funds is considered highly unlikely.

Root Cause Analysis

Three compounding failures made this exploit possible.

No overflow protection. Solidity 0.6.10 does not include native arithmetic overflow checks. SafeMath, the standard mitigation at the time, was apparently not applied to getPurchasePrice() despite being used elsewhere in the codebase. A single unprotected addition in the pricing logic was sufficient to allow this exploit.

No public security audit. There is no public record of Truebit's Purchase contract having undergone a third-party security review. Integer overflow is not an obscure vulnerability. It is one of the most well-documented vulnerability classes in smart contract security. A basic static analysis pass with tools like Slither would have flagged unprotected arithmetic as a high-severity finding.

Abandoned maintenance. The contract had been deployed and effectively forgotten. No active security monitoring, no alerting on anomalous transaction patterns, no upgrade path. A contract holding real value with no active team reviewing it against evolving security standards is an exploit waiting to be found.

How Olympix Could Have Prevented This

The Truebit exploit was entirely preventable. The vulnerability is not exotic. It is a textbook integer overflow that automated tooling has been able to detect for years. What failed here was process: the absence of proactive security integrated into the development and maintenance lifecycle.

This is the gap Olympix was built to close.

BugPOCer: Catching the Overflow Before Deployment

Olympix's BugPOCer Internal Auditor performs deep static analysis and automated exploit path generation. It does not simply flag that a function uses unchecked arithmetic. It generates a concrete proof-of-concept demonstrating how an attacker could exploit the issue, giving developers something actionable rather than a vague warning.

Applied to the Truebit Purchase contract, BugPOCer would have:

  • Identified the unprotected addition in getPurchasePrice() as a critical arithmetic overflow risk.
  • Automatically generated a proof-of-concept demonstrating that a crafted input amount causes the function to return 0 wei, the exact mechanism used in the exploit.
  • Surfaced the absence of SafeMath coverage in that specific function, even where SafeMath was used elsewhere in the codebase.
  • Flagged the unbounded uint256 input with no supply cap or sanity check as a compounding risk factor.
  • Produced actionable remediation guidance: upgrade to Solidity 0.8+, or apply SafeMath to all arithmetic operations in the pricing function.

These findings would have been delivered during development, before a single wei of value was ever held in the contract.

Shifting Security Left

The traditional approach to smart contract security is to write code, deploy it, and then bring in an auditor. This model treats security as a final checkpoint rather than a continuous property of the codebase.

The Truebit contract sat on mainnet for nearly five years before this exploit. Shifting security left means vulnerabilities like this one are caught before they ever reach production, let alone accumulate $26 million in value behind them.

Olympix integrates directly into the development environment. Developers get continuous security feedback as they write code: static analysis, mutation testing, automated unit testing, and fuzzing, all surfacing issues at the moment they are introduced rather than months or years later. Security is not a gate at the end of the pipeline. It is part of writing the code.

The industry talks constantly about the importance of audits. Truebit did not have one, and that matters. But this exploit also illustrates a deeper problem: even protocols that get audited at deployment have no systematic mechanism to detect whether those contracts remain secure as the ecosystem evolves. Continuous, developer-integrated security tooling addresses both problems.

Broader Implications: The Legacy Contract Problem

The Truebit exploit is not an isolated incident. It reflects a systemic risk that runs across DeFi. There are still hundreds of protocols with meaningful TVL running contracts compiled with pre-0.8 Solidity, many deployed by teams that have since moved on. Some have been audited. Many have not.

Attackers are aware of this. Targeting legacy contracts is rational: the vulnerability classes are well-known, the tooling required to find them is widely available, and the potential payoff is enormous. The Truebit attacker did not deploy sophisticated infrastructure. They read the bytecode, identified an unprotected addition, calculated the overflow-triggering input, and ran the exploit.

The pattern will repeat. The only variable is which protocol is next and whether it has done the work to make exploitation harder.

Recommendations

Migrate off pre-0.8 Solidity. Solidity 0.8.0 introduced native overflow and underflow protection as a default. Any contract handling user funds compiled with an earlier version should be treated as a high-priority upgrade target.

Apply SafeMath comprehensively. If upgrading the compiler version is not immediately feasible, ensure SafeMath is applied to all arithmetic operations, not selectively. Partial coverage provides a false sense of security.

Audit before deployment. There is no defensible reason to deploy a contract holding significant value without a third-party security review.

Integrate continuous security tooling. Automated static analysis, fuzz testing, and mutation testing should be embedded in the development workflow from the start. Olympix's toolchain, including BugPOCer, makes this practical for teams of any size.

Monitor deployed contracts. Anomalous transaction patterns, such as a user minting an astronomically large token amount for zero ETH, should trigger alerts. On-chain monitoring is not optional for contracts holding material value.

Establish upgrade and migration paths. Immutable contracts that accumulate value without any upgrade mechanism are a liability. Where immutability is intentional, the security standards applied before deployment must be correspondingly higher.

Closing

Eight thousand five hundred ETH did not have to leave the Truebit protocol. The vulnerability that enabled this exploit was not novel. It was not buried in complex protocol logic. It was an unprotected addition in a pricing function, in a contract deployed without an audit, left without maintenance, and never subjected to the kind of automated security tooling that would have caught it before the first transaction was ever signed.

The cost of proactive security is a fraction of the cost of an exploit. The Truebit exploit is a clear data point, and the industry has seen enough of them to know what to do.

What’s a Rich Text element?

The rich text element allows you to create and format headings, paragraphs, blockquotes, images, and video all in one place instead of having to add and format them individually. Just double-click and easily create content.

A rich text element can be used with static or dynamic content. For static content, just drop it into any page and begin editing. For dynamic content, add a rich text field to any collection and then connect a rich text element to that field in the settings panel. Voila!

Headings, paragraphs, blockquotes, figures, images, and figure captions can all be styled after a class is added to the rich text element using the "When inside of" nested selector system.

  1. Follow-up: Conduct a follow-up review to ensure that the remediation steps were effective and that the smart contract is now secure.
  2. Follow-up: Conduct a follow-up review to ensure that the remediation steps were effective and that the smart contract is now secure.

In Brief

  • Remitano suffered a $2.7M loss due to a private key compromise.
  • GAMBL’s recommendation system was exploited.
  • DAppSocial lost $530K due to a logic vulnerability.
  • Rocketswap’s private keys were inadvertently deployed on the server.

Hacks

Hacks Analysis

Huobi  |  Amount Lost: $8M

On September 24th, the Huobi Global exploit on the Ethereum Mainnet resulted in a $8 million loss due to the compromise of private keys. The attacker executed the attack in a single transaction by sending 4,999 ETH to a malicious contract. The attacker then created a second malicious contract and transferred 1,001 ETH to this new contract. Huobi has since confirmed that they have identified the attacker and has extended an offer of a 5% white hat bounty reward if the funds are returned to the exchange.

Exploit Contract: 0x2abc22eb9a09ebbe7b41737ccde147f586efeb6a

More from Olympix:

No items found.

Ready to Shift Security Assurance In-House? Talk to Our Security Experts Today.