Cork Protocol suffered a loss of over 10 million USD due to a Hacker attack. Analysis of the reasons for the attack and the flow of funds.

robot
Abstract generation in progress

Analysis of the Cork Protocol Hacking Incident: Losses Exceed 10 Million USD

On May 28th, a security incident targeting the Cork Protocol garnered widespread attention. After the incident, the security team quickly intervened to analyze the situation, and the following is a detailed analysis of the attack methods and the fund transfer paths.

Background Overview

Cork Protocol is a tool that provides Depeg swap functionality for the DeFi ecosystem, used to hedge against the de-pegging risks of stablecoins, liquid staking tokens, and other assets. This protocol allows users to transfer price volatility risks to market participants through trading risk derivatives, thereby reducing risk and enhancing capital efficiency.

Losses Exceeding Ten Million USD, Analysis of the Cork Protocol Hacking Incident

Attack Cause Analysis

The fundamental reasons for this attack are primarily twofold:

  1. Cork allows users to create redemption assets with any asset through the CorkConfig contract (RA), enabling attackers to use DS as RA.

  2. Any user can call the beforeSwap function of the CorkHook contract without authorization and allow the input of custom hook data for CorkCall operations. This enables attackers to manipulate DS in legitimate markets, deposit it into another market for use as RA, and obtain the corresponding DS and CT tokens.

Loss of over 10 million dollars, analysis of the Cork Protocol hacking incident

Detailed Explanation of the Attack Process

  1. The attacker first uses wstETH to purchase weETH8CT-2 tokens on the legitimate market.

  2. Create a new market using a custom Exchange Rate provider, with weETH8DS-2 token as RA and wstETH as PA.

  3. Add liquidity to new markets so that the protocol can initialize the corresponding liquidity pool in Uniswap v4.

  4. Use the unlockCallback function of the Uniswap V4 Pool Manager when unlocking, call the beforeSwap function of CorkHook, and pass in custom market and hook data.

  5. By constructing hook data, transfer the weETH8DS-2 token from the legitimate market to the new market as RA, and obtain the corresponding CT and DS tokens from the new market.

  6. Redeem RA tokens (weETH8DS-2) in the new market using the obtained CT and DS tokens.

  7. Match the weETH8DS-2 token with the previously purchased weETH8CT-2 token, and redeem wstETH tokens in the original market.

Loss exceeds 10 million USD, analysis of the Cork Protocol hacking incident

Losses exceed ten million dollars, analysis of the Cork Protocol hacking incident

Loss exceeds 10 million USD, Analysis of the Cork Protocol hacking incident

Loss exceeds ten million dollars, analysis of the Cork Protocol hacking incident

Loss exceeds 10 million dollars, analysis of the Cork Protocol hacking incident

Loss exceeds 10 million dollars, analysis of the Cork Protocol hacking incident

Loss of over 10 million dollars, analysis of the Cork Protocol hacking incident

Loss exceeding 10 million dollars, analysis of the Cork Protocol hacking incident

Loss exceeding 10 million USD, analysis of the Cork Protocol hacking incident

Loss exceeds 10 million USD, analysis of the Cork Protocol hacking incident

Loss exceeds 10 million USD, analysis of the Cork Protocol hacking incident

Capital Flow Analysis

According to the analysis of on-chain anti-money laundering and tracking tools, the attacker profited 3,761.878 wstETH, worth over $12 million. Subsequently, the attacker exchanged wstETH for 4,527 ETH through 8 transactions. The attacker’s initial funds came from a transfer of 4.861 ETH from a certain trading platform.

As of the analysis, there are a total of 4,530.5955 ETH remaining in the attacker's address. Relevant authorities will continue to monitor the funds.

Loss over 10 million USD, Analysis of the Cork Protocol hacking incident

Losses Exceeding 10 Million USD, Analysis of the Cork Protocol Hacking Incident

Security Suggestions

This attack exposed vulnerabilities in the protocol regarding data validation and asset type restrictions. Developers should consider the following when designing smart contracts:

  1. Strictly verify that the data provided by the user meets expectations.
  2. Restrict the types of assets available in the market.
  3. Perform multiple verifications and authorization checks for key operations.
  4. Conduct regular security audits to promptly identify and fix potential vulnerabilities.

The complexity of DeFi projects requires development teams to remain highly vigilant during the design and implementation process, continuously improving security measures to prevent similar attacks. Users should also enhance their risk awareness, participate cautiously in emerging DeFi projects, and always pay attention to the security announcements released by the project team.

View Original
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
  • Reward
  • 5
  • Repost
  • Share
Comment
0/400
ForkPrincevip
· 07-27 05:44
Someone has become rich again.
View OriginalReply0
ConsensusBotvip
· 07-24 06:14
Another sucker play people for suckers.
View OriginalReply0
MEVHunterXvip
· 07-24 06:12
The vulnerability is so big that it makes me feel sour just looking at it.
View OriginalReply0
ProofOfNothingvip
· 07-24 06:01
Another contract vulnerability. Wake up!
View OriginalReply0
UncleWhalevip
· 07-24 05:44
Another vulnerability in smart contracts
View OriginalReply0
Trade Crypto Anywhere Anytime
qrCode
Scan to download Gate app
Community
English
  • 简体中文
  • English
  • Tiếng Việt
  • 繁體中文
  • Español
  • Русский
  • Français (Afrique)
  • Português (Portugal)
  • Bahasa Indonesia
  • 日本語
  • بالعربية
  • Українська
  • Português (Brasil)