Disclosure: The views and opinions expressed here belong solely to the author and do not represent the views and opinions of crypto.newsâ editorial.
DeFi is under attackâbut not from the threats the industry is used to defending against. While developers meticulously scan lines of code for vulnerabilities, attackers have shifted tactics, exploiting economic weaknesses that lie unnoticed beneath flawless programming.Â
For instance, the JELLY token exploit on Hyperledger, where attackers were able to siphon over $6 million from Hyperledgerâs insurance fund, is a prime example. That exploit wasnât caused by coding errors at all, but by gameable incentives and unpriced risks that no one had scrutinized.
DeFi cybersecurity has come a long way. Smart contract auditsâdesigned to catch bugs in a softwareâs codeâare the norm nowadays. But we urgently need to broaden its scope beyond mere lines of code. Smart contract audits are fundamentally inadequate unless they also analyze economic and game-theoretic risks. The industryâs over-reliance on code-only audits is outdated and dangerous, leaving projects vulnerable to an unending cycle of attacks.
In March 2025, Hyperliquidâs exchange, which had its contracts audited, was ambushed by a $6 million exploit involving its JELLY token. How? Attackers didnât find a bug in the code; they engineered a short squeeze by abusing Hyperliquidâs own liquidation logic, pumping JELLYâs price, and manipulating the platformâs risk parameters.
In other words, Hyperliquidâs designers hadnât priced in certain market behaviorsâan oversight that traditional audits didnât catch. Hyperliquidâs case shows that impeccable code canât save a project thatâs built on shaky economic assumptions.
Shortly before the JELLY incident, Polter Finance, a lending protocol on Fantom, was drained of $12â¯million through aflash loan attack, another common type of attack that relies on economics, not coding vulnerabilitiesâ. The attacker took out flash loans and manipulated the projectâs price oracle, tricking the system into treating worthless collateral as billions in value.Â
The code did exactly what it was supposed to, but the design was flawed, making it possible for an extreme price swing to bankrupt the platform. The exploit proved so devastating that Polter Finance, a promising project, was forced to cease operations.Â
These are not isolated attacks/events; theyâre part of a growing pattern in DeFi. In case after case, clever adversaries exploit protocols by manipulating market inputs, incentives, or governance mechanisms to trigger outcomes developers didnât anticipate. Weâve seen yield farms gutted by reward loopholes, stablecoin pegs attacked via coordinated market moves, and insurance funds drained by extreme volatility.Â
Traditional audits check whether âthe code does what itâs supposed to,â but who checks if âwhat itâs supposed to doâ makes sense under adversarial conditions? Unlike a closed program, DeFi protocols live in a dynamic, adversarial environment. Prices fluctuate, users adapt strategies, and protocols interconnect in complex ways.
While most web3 teams are staffed with engineers who can catch software bugs during development, few have in-house economic expertise, making it critical for audits to fill that gap and identify vulnerabilities in incentive design and economic logic.
Truly rigorous audits include game-theoretic and economic analysis, which involve scrutinizing things like fee mechanics, liquidation formulas, collateral parameters, and governance processes. They force auditors to consider: âGiven these rules, how could someone profit by bending them?â
For example, during an audit performed by Oak Security, we discovered that a perpetual swaps platformâs insurance fund could be completely drained by volatility because it hadnât accounted for âvega riskââthe protocolâs sensitivity to volatilityâin its pricing modelâ. This wasnât a code bug at allâit was a design flaw that would have caused collapse in turbulent markets. Only a game-theoretic and economic deep dive caught itâand luckily, we were able to flag the issue before launch.
These economic exploits are well-documented, and not terribly difficult to spotââbut they only surface when auditors are asking the right questions, and thinking beyond the code on the page.
Protocol founders should request that auditors examine all components of a trading system, including implicit logic and off-chain components, to ensure comprehensive security. In the best scenario, all mission-critical logic would be brought on chain.
If youâre a founder or investor, itâs critical to ask your auditors: What about oracle manipulation? What about liquidity crunch scenarios? Did you analyze the tokenomics for attack vectors? If the answer is silence or hand-waving, you need to dig deeper.Â
The cost of these blind spots is simply too highâincorporating economic and game-theoretic analysis isnât just a ânice-to-haveâ; itâs a matter of survival for DeFi projects. We need to cultivate a culture where code review and economic review go hand in hand for every major protocol.Â
Letâs raise the bar nowâbefore another multimillion-dollar lesson forces our hand.