Protect Your Project Today
Strengthen your project with the largest web3 security provider.
A CertiK security expert will review your request and follow up shortly.

How Formal Verification Could Have Prevented the Loss of 2 Billion EduCoin

Reports ·Incident Analysis ·
How Formal Verification Could Have Prevented the Loss of 2 Billion EduCoin

On May 23rd, 2018, a new bug was found in an EduCoin smart contract, causing more than 2 billion EDU tokens to go missing from several exchanges. EduCoin reached a market capitalization of $0.00 in the last 24 hours.

What was the vulnerability in the EduCoin smart contract?

Let’s focus on the transferFrom function, which, as its name suggests, transfers a fixed value (line 1, _value) from a given address (line 1, _from) to another address (line 1, _to):

However, this function does not check if this transfer is allowed or not:

allowed[_from][msg.sender] -= _value; // bug!

Without validating whether the amount of tokens specified is within a transferable limit (allowed[_from][msg.sender]), an integer overflow may occur, allowing a negative value for the function allowed[_from][msg.sender]. This gives hackers the ability to transfer EDU tokens from any address to their own address, and as a result, more than 2 billion EDU tokens have been stolen. Hypothetically, hackers could ransack all EDU holders by exploiting this existing bug.

How can CertiK's audit process detect this bug automatically?

This type of bugs are usually simple and straightforward, but that's an assessment that's done in hindsight—after code has been implemented and, in some unfortunate situations, exploited. Imagine trying to spot such a small, bothersome piece of code within hundreds (and sometimes even thousands) of lines!

But what if there was a way for bugs like these to be easily tracked down automatically? CertiK has developed special Formal Verification technology that can catch bugs and errors that humans may miss.

Below is a screenshot of a sample report that generated by CertiK’s formal verification engine in only 24.9ms:

The entire verification process takes seconds to complete and outputs a full report with the bug detected as well as providing a counterexample that breaks the specification, proving the existence of the overflow bug.

Had EduCoin had their smart contracts verified by CertiK, the bug would have been detected and fixed before its release.

About CertiK

CertiK leads blockchain security by pioneering the use of cutting-edge Formal Verification technology on smart contracts and blockchains. Unlike traditional security audits, Formal Verification mathematically proves program correctness and hacker-resistance. CertiK was founded by Computer Science professors of Yale University and Columbia University, securing billions in assets, including many of the world’s top projects.

The research efforts of CertiK have received grants from IBM and the Ethereum Foundation, and notable investors include Binance Labs, Bitmain, Lightspeed Venture Partners, Matrix Partners, and NEO Global Capital, among others.

To request an audit or verification of your smart contracts, please email us at mailto:[email protected] or visit certik.io

Follow us on social

Twitter: https://twitter.com/CertiKCommunity

Reddit: https://www.reddit.com/r/CertiKOrg/

Telegram: https://t.me/certikorg

LinkedIn: https://www.linkedin.com/company/certik

Related Blogs

CertiK Completes Proof of Reserves  Verification for Gate Dubai
New · News ·Announcements

CertiK Completes Proof of Reserves Verification for Gate Dubai

CertiK has completed an independent Proof of Reserves (PoR) audit for Gate Technology FZE, the Dubai-based entity of the Gate Group. Gate Dubai exchange is licensed by the Virtual Assets Regulatory Authority (VARA). The audit verified that the platform's on-chain reserves fully back its user liabilities across all in-scope assets as of December 31, 2025.

CertiK Sponsors the First Theorem Proving Competition, Supported by OpenMath

CertiK Sponsors the First Theorem Proving Competition, Supported by OpenMath

The first Theorem Proving Competition, hosted by the China Computer Federation (CCF) officially launched. The competition is supported by OpenMath, the world’s first decentralized mathematical platform, with backing from Shentu Chain and CertiK.

The Importance of KYC Verification: A Key to Secure Financial Transactions

The Importance of KYC Verification: A Key to Secure Financial Transactions

Explore the importance of KYC verification in securing financial transactions. Learn how it helps prevent fraud, ensure compliance, and protect both businesses and users.