DCF Transfer Logic Implementation Error Flash Loan Exploit

From Quadriga Initiative Cryptocurrency Hacks, Scams, and Frauds Repository
Revision as of 18:55, 15 January 2025 by Azoundria (talk | contribs) (Created page with "{{Imported Case Study With About|source=https://www.quadrigainitiative.com/casestudy/dcftransferlogicimplementationerrorflashloanexploit.php}} {{Unattributed Sources}} thumb|DCF Token Logo/HomepageThe Decentralized Finance (DCF) community offers a wide range of services on their website, and allows investors to purchase their DCF token. Unfortunately, their smart contract had a vulnerability which allowed the price to be rapidly inflated through a...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Notice: This page is a freshly imported case study from an original repository. While the original content had a similar format, some sections may not have been fully completed. Please help fill in any empty sections or any missing information you can find. If you are new here, please read General Tutorial on Wikis or Anatomy of a Case Study for help getting started.

Notice: This page contains sources which are not attributed to any text. The unattributed sources follow the initial description. Please assist by visiting each source, reviewing the content, and placing that reference next to any text it can be used to support. Feel free to add any information that you come across which isn't present already. Sources which don't contain any relevant information can be removed. Broken links can be replaced with versions from the Internet Archive. See General Tutorial on Wikis, Anatomy of a Case Study, and/or Citing Your Sources Guide for additional information. Thanks for your help!

DCF Token Logo/Homepage

The Decentralized Finance (DCF) community offers a wide range of services on their website, and allows investors to purchase their DCF token. Unfortunately, their smart contract had a vulnerability which allowed the price to be rapidly inflated through a burn mechanism. This was exploited to withdraw significant liquidity worth $442k from the smart contract. The project team does not appear to have acknowledged the exploit. They are continuing to run the project with various strategies being posted on Twitter.[1][2][3][4][5][6][7][8][9][10][11]

About DCF Token

The Decentralized Finance (DCF) platform offers a decentralized ecosystem with various features, including DCF Play, GameFi, a Commercial Payment Ecosystem, an Online Social Network, Messaging & Livestream services, and a DAO Community for collaborative governance. Users can increase profits through decentralized income sources and interact within a secure and decentralized environment. The platform also outlines its tokenomics, with mining rewards making up 45% and other funds allocated for games, ecosystem growth, reserves, marketing, presale, and development. The roadmap spans from Q4 2024 to Q4 2025, detailing milestones such as token creation, presale, game releases, community expansion, decentralized social network launch, and DAO establishment. Key partners include SafePal, MetaMask, PancakeSwap, and more.

The Reality

This sections is included if a case involved deception or information that was unknown at the time. Examples include:

  • When the service was actually started (if different than the "official story").
  • Who actually ran a service and their own personal history.
  • How the service was structured behind the scenes. (For example, there was no "trading bot".)
  • Details of what audits reported and how vulnerabilities were missed during auditing.

What Happened

The specific events of the loss and how it came about. What actually happened to cause the loss and some of the events leading up to it.

Key Event Timeline - DCF Transfer Logic Implementation Error Flash Loan Exploit
Date Event Description
November 24th, 2024 6:07:56 AM MST Exploit Transaction The DCF smart contract vulnerabilities are exploited by the adversary.
November 24th, 2024 6:40:00 AM MST TenArmorAlert Tweeting TenArmorAlert posts about the exploit with futher information.
November 24th, 2024 8:14:00 AM MST officer_cia Tweet Posted officer_cia posts a tweet about the incident.
November 27th, 2024 8:15:09 PM MST Lunaray Analysis Published Lunaray publishes an analysis of the exploit on their website.
December 3rd, 2024 10:15:18 PM MST Shashank Blog Post Made Shashank posts a blog post with an analysis of the exploit.

Technical Details

"The cause of this vulnerability is that the project wrote incorrect logic when implementing the DCF transfer function. As a result, the attacker destroyed the DCF in the pair after transferring it to the swap pair, which made it easy to manipulate the price of DCF. Finally, arbitrage was completed."

"This attack exploited two critical vulnerabilities in the DCF token contract, leveraging a $110M USDT flashloan to execute the exploit.

First Vulnerability: The transfer function allowed anyone to burn tokens from the USDT/DCF pair. The attacker exploited this flaw using 83 DCF tokens purchased from a USDT/DCF v3 pool deployed only six hours prior to the attack. This approach bypassed the buying restriction in the v2 pair.

Second Vulnerability: The addLiquidity process in the transfer function lacked slippage protection, enabling the attacker to recover their USDT costs via a sandwich attack."

"As you can see, when to is the address of PancakeSwap Pair, the code in the red box is executed, and the vulnerability appears here. Since deadcfg is 2, the code will destroy about half of the DCF of the transfer amount from PancakeSwap Pair, and then sync. This operation will cause the number of DCFs in PancakeSwap Pair BUSD-DCF to decrease significantly, and the price of DCF to rise sharply. Through this operation, the price of DCF has risen from 171 BUSD to 1,708,540,682,977,674 BUSD, an increase of 9,991,465,982,325 times. Since the code liquidHepler.addLiquidity in the transfer function of DCF consumes part of the DCT in PancakeSwap Pair BUSDDCT, it also raises the price of DCT."

Total Amount Lost

$440k - $442k

The total amount lost has been estimated at $442,000 USD.

Immediate Reactions

"On November 25, DCF on the BNB Chain was attacked, resulting in a loss of approximately $440,000. The root cause of the vulnerability was an error in the logic implemented by the project team in the transfer function of DCF."

"Our system has detected a suspicious attack involving #DCF on #BSC, resulting in an approximately loss of $442K.

This is not the first time DCF has fallen victim to an attack!"

Ultimate Outcome

What was the end result? Was any investigation done? Were any individuals prosecuted? Was there a lawsuit? Was any tracing done?

Total Amount Recovered

There do not appear to have been any funds recovered in this case.

What funds were recovered? What funds were reimbursed for those affected users?

Ongoing Developments

What parts of this case are still remaining to be concluded?

Individual Prevention Policies

No specific policies for individual prevention have yet been identified in this case.

For the full list of how to protect your funds as an individual, check our Prevention Policies for Individuals guide.

Platform Prevention Policies

Policies for platforms to take to prevent this situation have not yet been selected in this case.

For the full list of how to protect your funds as a financial service, check our Prevention Policies for Platforms guide.

Regulatory Prevention Policies

No specific regulatory policies have yet been identified in this case.

For the full list of regulatory policies that can prevent loss, check our Prevention Policies for Regulators guide.

References