DeFi Risk Mitigation Guide 01: Identifying Types of Risks DeFi Users Face

This part aims to enhance DeFi Users safety awareness through real-life cases, helping users protect their private keys and wallet assets.

DeFi Risk Mitigation Guide 01: Identifying Types of Risks DeFi Users Face

This series of articles, excerpted from the "Security Special Edition 05" co-curated by OKX Web3 and BlockSec, addresses the security concerns faced by DeFi users and DeFi project teams.

Q1:Share several real-life DeFi risk cases encountered by users.

BlockSec Security Team : DeFi's allure lies in its stable, high asset returns, drawing in significant players and prompting projects to boost liquidity by courting large holders. We frequently witness major investors making substantial DeFi deposits, as reported in the news. However, these 'whales', while enjoying steady returns, navigate inherent risks. Stay tuned as we delve into publicly documented DeFi risk scenarios.

  • Case One

In the 2022 PolyNetwork security incident, over 600 million U.S. dollars worth of assets were attacked. It was rumored that "Discus Fish" (Co-founder and CEO of Cobo) also had 100 million U.S. dollars involved. Although the attacker eventually returned the funds and the incident was resolved satisfactorily, and "Discus Fish" announced plans to establish a monument on the blockchain to commemorate this, the process must have been quite tormenting. While a small number of security incidents have good outcomes, most are not so fortunate.

  • Case Two

The well-known decentralized exchange (DEX) SushiSwap was attacked in 2023, resulting in the significant loss for a major holder known as 0x Sifu, who lost over 3.3 million U.S. dollars. His individual loss accounted for approximately 90% of the total amount lost.

  • Case Three

In the Prisma security incident in March of this year, the total loss amounted to 14 million U.S. dollars. These losses originated from 17 wallet addresses, with an average loss of 820,000 U.S. dollars per wallet. However, the losses incurred by four users accounted for 80% of the total. Most of the stolen assets have not yet been recovered.

Ultimately, DeFi, especially on the mainnet, has non-negligible gas fees, making profitability contingent on substantial asset investments, excluding airdrop incentives. Therefore, the main Total Value Locked (TVL) in DeFi projects is generally contributed by 'whales', and in some projects, 2% of the whales contribute to 80% of the TVL. When security incidents occur, these whales inevitably bear the brunt of the losses. 'One cannot only see the whales feasting; they too have their moments of being hit.'

OKX Web3 Wallet Security Team: With the prosperity of the on-chain world, the DeFi risk cases encountered by users are also increasing, and on-chain security is always the most basic and important need of users.

  • Case One

PlayDapp Private Key Breach: Between February 9th and 12th, 2024, the Ethereum-based gaming platform PlayDapp suffered a breach, with the attacker exploiting leaked private keys. The attacker unauthorizedly minted and stole 1.79 billion PLA tokens, resulting in a loss of approximately 32.35 million U.S. dollars. The attacker added a new minting operator in the PLA tokens, minted a large amount of PLA, and dispersed it across multiple on-chain addresses and exchanges.

  • Case Two

Hedgey Finance Attack Incident. On April 19th, 2024, Hedgey Finance suffered a significant security vulnerability on Ethereum and Arbitrum, resulting in losses of approximately 44.7 million U.S. dollars. The attacker exploited a flaw in the contract that lacked user input verification, gaining authorization to the vulnerable contract and thereby stealing assets from it.

Q2: Is it possible to summarize the main types of risks present in the current DeFi ?

OKX Web3 Wallet Security Team: Drawing from actual incidents, we've identified the four common types of risks in the current DeFi field.

The first type: Phishing Attacks. Phishing attacks are a common type of cyber attack, which deceive victims into providing sensitive information, such as private keys, passwords, or other personal data, by disguising themselves as legitimate entities or individuals. In the DeFi field, phishing attacks are usually carried out in the following ways:

  1. Fake Websites: Attackers create phishing websites similar to real DeFi projects, tricking users into signing authorizations or transferring transactions.
  2. Social Engineering Attacks: On Twitter, attackers use high-imitation accounts or hijack project parties' Twitter or Discord accounts to post false promotional activities or airdrop information (which are actually phishing links), to carry out phishing attacks on users.
  3. Malicious Smart Contracts: Attackers release seemingly attractive smart contracts or DeFi projects, tricking users into authorizing access rights, thereby stealing funds.

The second type: Rugpull. Rugpull is a unique scam in the DeFi field, referring to the situation where project developers suddenly withdraw funds and disappear after attracting a large amount of investment, causing investors' funds to be completely rolled away. Rugpull usually occurs in decentralized exchanges (DEX) and liquidity mining projects. The main manifestations include:

  1. Liquidity Withdrawal: Developers provide a large amount of liquidity in the liquidity pool to attract user investment, and then suddenly withdraw all liquidity, causing the token price to plummet and investors to suffer heavy losses.
  2. Fake Projects: Developers create a DeFi project that appears to be legal, deceiving users to invest with false promises and high returns, but in fact, there are no actual products or services.
  3. Contract Permission Manipulation: Developers use backdoors or permissions in smart contracts to change the rules of the contract or withdraw funds at any time.

The third type: Smart Contract Vulnerabilities. Smart contracts are self-executing codes that run on the blockchain and are immutable once deployed. If there are vulnerabilities in smart contracts, they can lead to serious security issues. Common smart contract vulnerabilities include:

  1. Reentrancy Vulnerabilities: Attackers repeatedly call the vulnerable contract before the previous call is completed, causing issues with the contract's internal state.
  2. Logical Errors: Logical mistakes in the design or implementation of the contract, leading to unexpected behavior or vulnerabilities.
  3. Integer Overflows: Contracts do not correctly handle integer operations, leading to overflows or underflows.
  4. Price Manipulation: Attackers manipulate the prices from oracles to carry out attacks.
  5. Precision Loss: Calculation errors due to issues with the precision of floating-point or integer numbers.
  6. Input Validation Oversight: Insufficient verification of user input, leading to potential security issues.

The fourth type: Governance Risks. Governance risks relate to the core decision-making and control mechanisms of a project. If maliciously exploited, they could cause the project to deviate from its intended goals, and even lead to severe economic losses and trust crises. Common types of risks include:

  1. Private Key Leakage Some

DeFi project's privileged accounts are controlled by EOA (Externally Owned Accounts) or multi-signature wallets. If these private keys are leaked or stolen, attackers can manipulate contracts or funds at will.

  1. Governance Attacks

Although some DeFi projects adopt decentralized governance schemes, they still face the following risks:

  • Borrowing Governance Tokens: Attackers manipulate voting results by borrowing a large number of governance tokens over a short period.

  • Concentration of Voting Power: If governance tokens are highly concentrated in the hands of a few, these individuals can control the entire project's decision-making by concentrating voting power.

Sign up for the latest updates