The term "smart contract" sounds quite sophisticated in itself. We might even be led to believe that it’s something so "smart" that it cannot make mistakes, unlike humans. Yet, ultimately, it’s nothing more, and nothing less, than a very human invention. Smart contracts can make dumb mistakes—and they have, time and time again.
Let’s remember that a smart contract is a computer program stored on a crypto network that automatically carries out rules when certain conditions are met. Someone made it. That someone is often a human developer, who can make mistakes, especially if the programming language is particularly difficult.
So,
When “Smart” Code Gets Things Wrong
We can explain this by imagining a physical vending machine. You want a snack, you pay, press a button, and voilá. Now, there’s an engineer behind that vending machine, so in another world, that engineer was sleep-deprived and messed up a small calculation while building one of the parts. That little error now causes your snack to get stuck before coming out. There’s no easy way to fix that, if any. It’s the same with smart contracts.
They’re complex (and immutable) pieces of code. Complex pieces of code are prone to include bugs and execute those bugs with impressive consistency. A common problem is
Access control can be another issue. In this case, a smart contract gives unauthorized access to sensitive functions. In 2017, for instance, an unauthorized developer was able to access and own a shared library in the
Another type of potential vulnerability is reentrancy, where a contract is ‘called’ again before it finishes updating its state (and its actual balance). The infamous
A third risk comes from
What Can Users Do to Avoid Faulty Smart Contracts?
You don’t need to be an expert developer to avoid these ‘dumb’ mistakes or to use a simple Dapp from your wallet, but there are some things you’ll need to check first. It’s important to Do Your Own Research (
Start with the official website and social media accounts of the project or network you want to interact with, and go from there. Check their team, their documentation (there should be a whitepaper, even if you don't understand it), and their reputation.
Security audits of their smart contracts should be available. In these audits, external teams of experts check the smart contract code carefully and give their approval, so you don't need to read all that code. They prepare a report with their findings and recommendations. However, they're still human. This doesn't guarantee that the smart contract is 100% safe, but hey, is a great indicator.
Furthermore, more recently, the latest AI tool models—
Well, nothing is perfect, but smart contracts try. A large number of them are constantly audited and reviewed by their own open-source developer communities, so ‘dumb’ errors will increasingly diminish over time.