Managing Risks in DeFi

AMMs, liquidity pools, and yield farming on EVM chains, Solana, and Cosmos each come with a matching set of ways to lose money, and the incidents of the last few years sort into four groups: technical risks in contracts, programs, and frontends, economic risks like impermanent loss and liquidations, systemic risks in bridges and oracles, and operational risks in governance and regulation. This post covers how each risk works, the real incidents behind it, and how I assess a protocol before using or building on it.

Managing Risks in DeFi

Technical risks

Smart contract exploits

DeFi protocols run on immutable smart contracts and programs, and a reentrancy bug on EVM, a program logic error on Solana, or a module bug on Cosmos can lead to catastrophic losses. The 2016 DAO hack, Curve's $70M Vyper bug exploit in 2023, and the $117M Mango Markets exploit on Solana show that even audited code can fail, which is why audits, bug bounties, and conservative design all belong in the process.

Frontend attacks

Protocol frontends are a vulnerability on every chain, since DNS hijacking and malicious UI changes can redirect users' funds, as in the $120M BadgerDAO frontend attack. ENS integration, IPFS hosting, and strict security headers reduce that exposure.

Token standard vulnerabilities

Token standards like ERC-20 on EVM, SPL on Solana, and CW20 on Cosmos carry their own risks. Unlimited token approvals have enabled many exploits, NFT contracts have faced reentrancy bugs, and the OpenSea Wyvern exploit showed both. Limited approvals, security checks, and audits of how a contract implements the standard are the mitigations.

Transaction fee risks

Fees and their optimization differ by chain, with gas price volatility and MEV extraction on EVM and different fee models on Solana and Cosmos. During congestion, users see failed transactions or excessive fees, and EIP-1559 on EVM, priority fees on Solana, and accurate gas estimation in the backend help keep transactions landing.

Economic risks

Impermanent loss

AMMs like Uniswap on EVM, Raydium on Solana, and Osmosis on Cosmos rebalance token ratios, which exposes LPs to impermanent loss (IL) when asset prices diverge, and the loss becomes permanent at withdrawal. LPs often lose value in volatile markets unless fees offset it, and in Uniswap v3 about half of LPs lost money because IL exceeded their fees. Bancor's IL protection failing during the 2022 crash showed how hard this risk is to insure away.

Liquidation spirals

Over-leveraged positions in volatile markets can set off cascading liquidations on any chain. On MakerDAO's "Black Thursday" in 2020, $8M in ETH was sold for zero because liquidation auctions failed, and conservative collateral ratios and liquidation mechanisms that hold up under congestion are the defense.

Economic design flaws

Token emission schedules and incentive structures can make a protocol unsustainable, as Olympus DAO's high-APY model showed when it collapsed. Gradual emissions and incentives aligned with real usage are what keep tokenomics healthy over time.

Liquidity fragmentation

Many DEXs and pools across chains create price discrepancies and arbitrage opportunities, which leads to inefficient price discovery and more slippage. DEX aggregators and cross-pool liquidity reduce the problem, and users still need to watch for price differences between venues.

Systemic risks

Bridge vulnerabilities

Cross-chain bridges have lost over $2B to hacks, including Wormhole ($325M), Ronin Bridge ($625M), and Nomad ($190M), usually through validator compromise or smart contract bugs. Multiple independent validators, thorough audits, and rate-limited withdrawals are the baseline for a bridge I would trust.

Oracle manipulation

Protocols that read prices from onchain DEXs can be exploited with manipulated trades. In 2022, Mango Markets was drained of $117M by inflating the MNGO price and borrowing against it, which is why protocols need secure, time-weighted oracles such as Chainlink, Pyth, or Band Protocol.

Rehypothecation

DeFi allows recursive use of collateral such as stETH, stSOL, and stATOM, so one token can back several layers of borrowing or liquidity provision. That hidden leverage can destabilize the system under stress, as the Terra collapse and the stETH depeg showed.

Composability risk

Composability lets protocols build on each other and also lets failures cascade between them. Iron Finance and the collapse of Terra's UST in 2021–2022 showed how shared collateral and cross-protocol dependencies amplify a shock, so one failure can trigger a chain reaction across many dApps.

Operational risks

Governance attacks

Governance is vulnerable when attackers can borrow enough tokens to pass a malicious proposal, and Beanstalk lost $182M to a flash loan-enabled governance attack. Timelocks, quorum requirements, and snapshot-based voting are the mitigations, and they are decisions technical leaders should make before launch.

Centralization risks

Many protocols keep admin keys and upgradeable contracts, and the $130M Multichain bridge hack in 2023 showed what an admin key compromise costs. Centralized oracles and price feeds are single points of failure too, and timelocks, multisig governance, and decentralized oracle networks reduce both.

Regulatory risks

Regulation keeps changing across jurisdictions, and SEC actions against DeFi protocols show how hard compliance is in a decentralized system. Projects have to balance decentralization with regulatory requirements, often adding KYC/AML while keeping the protocol secure.

Sandwich attacks

MEV (Maximal Extractable Value) bots sandwich DEX trades by buying before the victim's transaction and selling after it, profiting from the price impact. The attack is most common on EVM chains and possible on Solana and Cosmos, it can cost users 0.5–2% per trade, and one 2021 Uniswap trade lost $1.2M to it. DEX aggregators, private transactions, and anti-MEV designs like CowSwap's batch auctions protect against it.

How I assess a protocol

Risk assessment frameworks

I evaluate a DeFi protocol across three areas:

  1. Technical security

    • Audit reports for contracts or programs, and their coverage
    • Program verification status (Solana)
    • Module security (Cosmos SDK)
    • Bug bounty scope and rewards
    • Code review process and frequency
    • Incident response plan
    • Chain-specific security features
  2. Economic security

    • Token distribution and vesting schedules
    • Liquidity depth and concentration
    • Revenue model sustainability
    • Emergency pause mechanisms
    • Chain-specific economic parameters
    • Cross-chain liquidity
  3. Operational security

    • Team transparency and track record
    • Governance structure and decentralization
    • Regulatory compliance status
    • Insurance coverage
    • Chain-specific operational requirements
    • Cross-chain interoperability risks

Risk evaluation checklist

Before interacting with a DeFi protocol, I verify:

  • Contracts or programs audited by reputable firms
  • No open critical or high-severity vulnerabilities
  • An active bug bounty program
  • A transparent team with a track record
  • Clear tokenomics and emission schedule
  • Sufficient liquidity depth
  • Decentralized governance
  • Emergency pause functionality
  • Available insurance coverage
  • Regular security updates
  • Clear documentation
  • An active community and ongoing development
  • Chain-specific security measures
  • Bridge security, if the protocol is cross-chain
  • Validator security
  • The program upgrade mechanism

Risk monitoring tools

These are the tools I use to keep up with each area:

  1. Security monitoring

  2. Economic monitoring

  3. Governance monitoring

  4. Alerts

When I build on DeFi, I design defensively against every category above, and when I use a protocol, I verify the checklist myself instead of trusting its reputation.

Related writing