We manage your security to weather the AI storm →

← Resource Hub

The Truebit Exploit Explained: Legacy Code, $26M

By Owen Thurm Published 4 min read

The Truebit Exploit Explained: Legacy Code, $26M

Quick answer. On January 8, 2026, an integer overflow in Truebit's 2021 purchase contract let an attacker mint TRU for free and sell it for 8,535 ETH. Fuzzing the pricing math with huge inputs can catch this kind of bug.

Watch: The Truebit Exploit Explained: Legacy Code, $26M 1:41
Video transcript

On January 8, 2026, one unchecked addition in a 2021 Truebit contract let an attacker mint tokens for free and drain it.

The take was 8,535 ETH, about 26 million dollars, and Truebit's token fell 99.9 percent, The Block reported.

The attacker asked the price of about 240 million TRU and got zero. They minted for free, sold back for ETH, and repeated, all in one transaction.

The contract used Solidity zero point five point three, with no built-in overflow checks. SafeMath covered multiplication and division, but one addition was left unprotected, per Rekt.

With a huge purchase, that sum passed the 256-bit limit and wrapped to a small number. Divided by the squared supply, it rounded down to zero.

Old code keeps old risks. Funds make it a target. Closed source is not cover. And a one-transaction attack leaves no window to pause.

For legacy contracts, list everything that holds funds or can mint, flag compilers below zero point eight, fuzz pricing with extreme inputs, and assert a buy and sell round trip never profits.

Guardian's Managed Security runs its AI auditor, Helix, continuously across your stack, and only human-verified findings reach you, with fix PRs. Guardian audits add a fuzzed invariant suite.

Read the full breakdown below, or talk to Guardian about testing the code you already shipped.

The Truebit exploit hit a contract deployed about five years earlier. It still held thousands of ETH.

The loss was about $26 million, and TRU, Truebit's token, fell 99.9%, The Block reported.

The cause was one unchecked addition. Solidity versions below 0.8.0 lack built-in overflow checks, CertiK notes, and a deployed contract keeps the compiler it shipped with.

What Happened

Truebit's purchase contract sold TRU on a bonding curve. Users paid ETH to mint TRU and could sell TRU back to the contract for ETH.

At 16:02 UTC on January 8, one transaction asked the contract the price of about 240 million TRU. The answer was zero, CertiK found.

The attacker minted the tokens for nothing, sold them back for ETH, and repeated with larger amounts. The total came to 8,535.36 ETH, per CertiK.

Rekt counted five mint-and-burn cycles in that one transaction. Etherscan shows the full 8,535.36 ETH reaching the attacker's address inside it.

A second attacker followed with a smaller take, about $250,000, researcher Weilin Li told The Block.

The Bug: One Unchecked Addition

The flaw sat in getPurchasePrice, which calculates the ETH cost to mint TRU. The contract was compiled with Solidity 0.5.3, Rekt reported.

In those versions, a sum that passes the 256-bit maximum does not revert. It wraps around to a small number.

Truebit's code used SafeMath for the multiplication and division in the formula. One addition was left unprotected, according to Rekt.

CertiK's analysis shows the inputs. With a large enough purchase, two terms in the price formula each stayed below 2^256, but their sum did not.

  • The sum wrapped around to a small number.
  • It was divided by 25 times the squared token supply.
  • The result, about 0.00026, rounded down to zero.

So 240 million TRU cost 0 wei. Selling those tokens back to the contract paid out real ETH.

The source code was never verified on Etherscan, and Rekt found no published audits. Halborn notes that closed source did not stop the attacker from probing the contract.

Timeline and Loss

  • 2021: the purchase contract is deployed, per Rekt.
  • Jan 8, 16:02 UTC: the exploit transaction lands in Ethereum block 24,191,019, per Etherscan.
  • About two hours later: Truebit says it "became aware of a security incident involving one or more malicious actors," per Rekt and The Block.
  • Jan 9: Truebit says it has "engaged additional resources to strengthen tracing and recovery," per Rekt.

Each source prices the same 8,535 ETH slightly differently:

SourceETHDollar loss
The Block, citing LookonchainAbout 8,535$26.6 million
CertiK8,535.36About $26.6 million
Rekt8,535$26.2 million

TRU fell from about $0.16 to $0.00007721, per CoinGecko data cited by The Block.

Truebit said it was "in contact with law enforcement," The Block reported. As of Rekt's January 12 report, it had announced no recovery plan or compensation timeline.

Truebit has published no post-mortem. Its statements came in posts quoted by The Block and Rekt, and its website showed no incident notice on November 6, 2026.

What It Shows

Old code keeps old risks. A contract compiled before Solidity 0.8.0 needs every addition, subtraction and multiplication checked by hand or by a library.

Funds make old code a target. Halborn notes the contract was never updated or replaced, though it held significant ETH.

Closed source is not cover. Only bytecode was public, and the attacker still found the flaw.

And one transaction can be the whole attack. When the drain fits in a single transaction, there is no window to pause, so the bug has to be found first.

A short checklist for legacy contracts:

  • List every deployed contract that holds funds or can mint, including retired ones.
  • Record each one's compiler version, and flag anything below 0.8.0.
  • Fuzz pricing and minting functions with extreme inputs near type limits.
  • Assert that a buy and sell round trip never returns more than it took.
  • Cap, drain or retire contracts nobody maintains.

For more cases like this, read our guide to legacy smart contract risk and our breakdown of infinite mint exploits.

How Managed Security Tests Old Code

Guardian's Managed Security cites Truebit under continuous vulnerability testing: "Our AI agents spend billions of tokens continuously auditing your entire stack."

Here is how the site describes that work.

  • Helix: Guardian's AI auditor runs continuously across your contracts, backend, infrastructure and web app.
  • Repositories: Helix audits every repository you choose to share.
  • Findings: only human-verified findings reach you, each with a fix PR.
  • Patches: Guardian engineers who know your stack prepare the patches with you.

Guardian's smart contract audit includes an invariant suite. Core safety properties, such as rounding and math formulas, become executable invariants fuzzed across every reachable state.

The suite stays with you for every later change.

Frequently Asked Questions

What caused the Truebit exploit?

An integer overflow in getPurchasePrice, which priced TRU mints in a 2021 contract compiled with Solidity 0.5.3. One addition lacked SafeMath, so a huge purchase made the price round to zero, per Rekt and CertiK.

How much was stolen in the Truebit exploit?

8,535 ETH, worth about $26.2 million per Rekt and $26.6 million per The Block and CertiK. A second attacker took a smaller amount, put at about $250,000 by researcher Weilin Li.

Was the Truebit contract audited?

Rekt reported no published audits, and the source code was never verified on Etherscan. Only bytecode was public, which did not stop the attacker from finding the flaw.

Did Truebit recover the funds?

As of Rekt's January 12 report, Truebit had announced no recovery plan or compensation timeline. Truebit has published no post-mortem, and its website showed no incident notice on November 6, 2026.

Sources

Keep testing the code you already shipped

Guardian Managed Security runs Helix continuously across your contracts and the systems around them, with every finding confirmed by an engineer.