A friend asked me about this the other day, so I figured I’d put together a quick explainer.
In DeFi, deposits, loans, and exchanges are all handled automatically by smart contracts. There’s no manual review, and no customer service team that can recover money sent to the wrong address. When a contract is written correctly, it’s the most reliable rulebook; when it’s written incorrectly, its vulnerabilities are just as meticulously “executed.”
Related coin: $ETH Current price: 1751.29 (24h -1.4%).
■ Code is law—and so are its vulnerabilities
Once a smart contract is deployed on-chain, it executes automatically according to its code. This brings transparency and predictability: anyone can read the code, and the rules of an immutable contract won't change just because someone changes their mind.
Conversely, once someone discovers and exploits a vulnerability in the code, funds can be transferred out in just a few transactions and may be very difficult to recover. The DAO in 2016 is one example: its contract was attacked through a reentrancy vulnerability, and Ethereum subsequently addressed the issue with a hard fork. The original chain, which did not fork, continued as Ethereum Classic (ETC).
■ What exactly does an audit cover?
A security audit is an inspection of a particular version of code, conducted by a third-party security team at a specific point in time. An audit report generally lists the issues found, their severity, and whether the project team has fixed them.
Common areas of inspection include reentrancy, access control errors, calculation precision issues, and the possibility of oracle manipulation. Audits help identify and reduce these common vulnerabilities, but are limited by time, staffing, and scope.
■ Why can things still go wrong after an audit?
First, an audit only covers the specified scope of code. Contracts outside that scope and features added later are not included. If the code is changed after the audit, or the version actually deployed differs from the audited version, the audit findings cannot be applied directly.
Second, some risks do not lie in the code itself: an oracle or another protocol that the protocol relies on may fail; an administrator's key, which controls upgrade permissions, may be stolen; or a website's frontend may be tampered with to trick users into signing malicious transactions. Any of these could cause losses.
■ What can ordinary users do?
When reading an audit report, pay attention to its date and scope, as well as any issues that remain unfixed. Don't focus only on the words “audited.” You can also check whether the contract can be upgraded unilaterally, and whether upgrade permissions are controlled by a multisig and a timelock.
Protocols that have been running for a long time and withstood large amounts of funds are generally considered more reliable, but that doesn't mean they are free of vulnerabilities. So only put funds into DeFi that you can afford to lose, spread large amounts across different protocols, and remember to revoke approvals for protocols you no longer use.
■ In a nutshell
An audit is the starting point for security, not the finish line. Treating smart contract risk as a cost you must face when participating in DeFi is more realistic than trusting the words “audited.” Understanding the rules helps you make informed decisions; it is not a way to predict price movements.
Have you ever misunderstood this point before?