1. Smart contract hacks

When you deposit tokens into a DeFi protocol, your funds are held by a smart contract -- a program running on a blockchain. If that code has a vulnerability, an attacker can exploit it to drain funds. This is not theoretical. It happens multiple times every year.

Major exploits

ExploitDateAmount lostWhat happened
Ronin BridgeMarch 2022$625 millionAttackers compromised validator keys for the Ronin sidechain (Axie Infinity). Funds were drained over multiple transactions before anyone noticed.
WormholeFebruary 2022$325 millionA bug in the Wormhole bridge allowed an attacker to mint wrapped ETH on Solana without depositing actual ETH.
Nomad BridgeAugust 2022$190 millionA configuration error made it possible for anyone to withdraw funds. Hundreds of wallets joined in once the vulnerability became public.
Euler FinanceMarch 2023$197 millionA flash loan attack exploited a vulnerability in the lending protocol. Funds were later returned by the attacker.
Mango MarketsOctober 2022$114 millionAn attacker manipulated the price oracle to inflate collateral value and borrow against it.

These are just the largest examples. Smaller exploits happen regularly -- sometimes weekly -- across the DeFi ecosystem. Even protocols with multiple audits have been exploited. Audits reduce risk but do not eliminate it.

2. Impermanent loss

If you provide liquidity to a decentralized exchange (like a liquidity pool), you are exposed to impermanent loss. This happens when the relative price of the two tokens in your pool changes. The larger the price change, the more value you lose compared to simply holding the tokens.

The word "impermanent" is misleading. The loss becomes permanent when you withdraw your liquidity. And in many cases, the trading fees you earn do not fully compensate for the loss, especially in volatile pairs.

3. Liquidation

DeFi lending protocols let you borrow against your crypto as collateral. If the value of your collateral drops below a certain threshold (the liquidation ratio), the protocol automatically sells your collateral to repay the loan. You lose your collateral and may receive little or nothing back.

Liquidation can happen fast. In a sudden market crash, prices can drop so quickly that your position is liquidated before you have time to add more collateral. During the May 2022 crash, hundreds of millions of dollars in DeFi positions were liquidated in a single day.

Example: You deposit $10,000 of ETH as collateral and borrow $6,000 of USDC. ETH drops 40%. Your collateral is now worth $6,000 -- at or below the liquidation threshold. The protocol sells your ETH to repay the loan. You end up with neither your ETH nor the full borrowed amount after fees. What started as a $10,000 position might leave you with very little.

4. Rug pulls

A rug pull occurs when the creators of a DeFi project deliberately drain the funds. The typical pattern:

  • Developer creates a new token and adds initial liquidity to a decentralized exchange.
  • The project is marketed aggressively on social media, promising high returns or innovative features.
  • People buy the token, increasing its price and the liquidity pool size.
  • The developer removes all liquidity, sells their tokens, and disappears.
  • Remaining token holders cannot sell because there is no liquidity. Their tokens are worthless.

Rug pulls are most common with brand-new, unaudited projects. They are especially prevalent among memecoins and tokens launched on permissionless platforms where anyone can create a token in minutes.

5. Token price collapse

Many DeFi protocols pay yields in their own governance or reward token. If you are farming a pool that pays 200% APY in "XYZ token," your actual return depends entirely on the price of XYZ. If XYZ drops 95% (which is common for farm tokens with high emission rates), your 200% APY in token terms becomes a significant loss in dollar terms.

This is one of the most misunderstood risks in DeFi. A high APY number means very little if the reward token is losing value faster than you accumulate it.

6. Stablecoin depeg events

If your DeFi position involves stablecoins, you face the risk that the stablecoin loses its peg. The most catastrophic example was Terra's UST in May 2022, which went from $1 to near zero. Anyone holding UST in DeFi protocols -- lending it, providing liquidity with it, or using it as collateral -- lost everything.

Even less catastrophic depegs can cause significant damage. When USDC briefly dropped to $0.87 during the Silicon Valley Bank crisis, liquidity pools containing USDC experienced sudden losses, and leveraged positions using USDC as collateral faced unexpected liquidation pressure.

7. Oracle manipulation

DeFi protocols rely on price feeds called oracles to know what tokens are worth. If an attacker can manipulate the oracle -- by temporarily distorting prices on a low-liquidity exchange that the oracle references -- they can trick the protocol into mispricing assets. This allows them to borrow more than they should, trigger unfair liquidations, or extract value in other ways.

8. Approval exploits

When you interact with a DeFi protocol, you typically approve it to spend your tokens. These approvals often grant unlimited spending permission and persist indefinitely. If the protocol is later compromised -- or if you accidentally approved a malicious contract -- the attacker can drain any tokens you approved, even months or years later.

This is why regularly reviewing and revoking unused approvals is one of the most important DeFi safety habits. Many people have dozens of active approvals to contracts they no longer use and may not even remember.

9. Bridge hacks

Moving tokens between different blockchains requires bridges -- protocols that lock tokens on one chain and mint equivalent tokens on another. Bridges have been the target of the largest hacks in crypto history (Ronin, Wormhole, Nomad). If a bridge is exploited after you have bridged tokens, your bridged tokens may become unbacked and worthless on the destination chain.

10. Gas costs eating profits

On networks with high transaction costs (particularly Ethereum mainnet), the gas fees for DeFi transactions can be substantial. Depositing, claiming rewards, compounding, and withdrawing each cost gas. If you are interacting with small amounts, these costs can exceed your returns.

For example, if gas costs $20 per transaction and you need four transactions to complete a farming cycle (approve, deposit, claim, withdraw), that is $80 in fees. If your position is only generating $50 in yield, you have lost money after gas costs even if the underlying protocol worked perfectly.

The total picture

The combined losses from DeFi exploits, hacks, and scams exceed $5 billion in reported incidents. This figure does not include:

  • Individual losses from impermanent loss (impossible to aggregate)
  • Liquidation losses (billions more)
  • Token price collapses on farm and governance tokens
  • Gas costs eroding small positions
  • Unreported rug pulls and scams

The real total is likely many times the reported figure.

How to reduce (not eliminate) DeFi risk

You cannot make DeFi risk-free. But you can significantly reduce your exposure:

  • Use battle-tested protocols. Protocols like Aave and Uniswap have held billions of dollars for years and survived multiple market crashes. That track record matters. It does not guarantee safety, but it is far better than trusting a protocol that launched last week.
  • Diversify across protocols. Do not deposit everything into a single contract. If one protocol is exploited, you lose only the portion deposited there.
  • Understand what you are depositing into. If you cannot explain how a protocol generates its yield, you do not understand the risk you are taking. "It just pays 80% APY" is not understanding.
  • Start small. Test with a small amount before committing larger sums. Make sure you understand the mechanics, the fees, and the withdrawal process.
  • Revoke unused approvals. Regularly review and revoke token approvals for contracts you no longer use.
  • Be skeptical of extreme yields. Sustainable DeFi yields on established protocols typically range from 1-10% APY. Anything dramatically higher almost certainly involves proportionally higher risk.
  • Monitor your positions. DeFi positions can change status quickly. Collateral ratios, pool compositions, and reward rates can shift in hours.

The risk/reward tradeoff

DeFi offers capabilities that do not exist in traditional finance: permissionless lending, automated market making, programmable yield strategies, and more. These capabilities come with risks that also do not exist in traditional finance.

The fundamental principle is simple: higher yield almost always means higher risk. There are no free lunches. When a protocol offers dramatically higher returns than its competitors, the difference is risk -- whether that is smart contract risk, impermanent loss, token inflation, or something else entirely.

How CleanSky helps: CleanSky provides multi-dimensional risk analysis for your DeFi positions, evaluating smart contract risk, volatility, liquidity, and more. It also scans your token approvals to flag potentially dangerous permissions. Rather than guessing at your exposure, you can see exactly where your risks are concentrated and make informed decisions.

Continue learning: Understanding Risk in Crypto | What Is Impermanent Loss? | Staying Safe in Crypto | Liquidity Pools Explained | DeFi Explained

Scan your DeFi positions for smart contract risk, approval exposure, and concentration — before something goes wrong.

Try CleanSky Free →