Z123 Smart Contract Vulnerability

From Quadriga Initiative Cryptocurrency Hacks, Scams, and Frauds Repository
Revision as of 10:48, 14 May 2024 by Azoundria (talk | contribs) (COMPLETE 30 minutes. Added many additional sources from Twitter. Inquiring to get more information from security researchers. Attempted to better integrate technical analysis from Nick.)
(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 the original repository. The original content was in a different format, and may not have relevant information for all sections. Please help restructure the content by moving information from the 'About' section to other sections, and add any missing information or sources 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!

Generic Image

Z123 was a popular token with over 3,000 holders. Unfortunately the smart contract was vulnerable to price manipulation, which allowed an attacker to take $136k from the liquidity pools.

This is a global/international case not involving a specific country.[1][2][3][4][5][6][7][8][9][10][11][12][13][14][15][16][17]

About Z123

"Token holders count: 3,331"

"In April 2024, a seemingly new hacker emerged, targeting Wall Street Memes and Z123 projects in quick succession with flash loan attacks, resulting in losses of $18,000 and $144,000 respectively."

"Z123 on BSC was attacked by a hacker due to a contract vulnerability, resulting in a loss of approximately $136k. The .update() function of Z123 was repeatedly called which burned extra tokens and inflated the price."

"Today, attacker activate itself again and deployed a new contract which was picked by ML service again (2024-04-22 07:55:32): 0x61Dd07Ce0cEcF0d7BaCf5EB208C57D16bBdEE168

Very soon (2024-04-22 10:02 AM), malicious transaction was detected (Mixer Malicious Contract): 0xc0c4e99a76da80a4cf43d3110364840151226c0a197c1728bb60dc3f1b3a6a27

Victim losses: $140K"

"Malicious actor using Flash loan to manipulate the price of the token in pool."

"By doing 81 iterations of token swaps and calling the ‘Update’ function of the pool, the price was manipulated."

This is a global/international case not involving a specific country.

The background of the exchange platform, service, or individuals involved, as it would have been seen or understood at the time of the events.

Include:

  • Known history of when and how the service was started.
  • What problems does the company or service claim to solve?
  • What marketing materials were used by the firm or business?
  • Audits performed, and excerpts that may have been included.
  • Business registration documents shown (fake or legitimate).
  • How were people recruited to participate?
  • Public warnings and announcements prior to the event.

Don't Include:

  • Any wording which directly states or implies that the business is/was illegitimate, or that a vulnerability existed.
  • Anything that wasn't reasonably knowable at the time of the event.

There could be more than one section here. If the same platform is involved with multiple incidents, then it can be linked to a main article page.

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 - Z123 Smart Contract Vulnerability
Date Event Description
April 4th, 2024 10:25:24 AM MDT Wall Street Memes Attack The same attacker attacks the Wall Street Memes token.
April 22nd, 2024 2:02:00 AM MDT Z123 Smart Contract Attack The Z123 smart contract is attacked[9].
April 22nd, 2024 2:22:00 AM MDT SlowMist Tweet SlowMist publishes a tweet reporting on the vulnerability being exploited[2].
April 22nd, 2024 2:40:00 AM MDT Nick L Franklin Analysis Nick L Franklin performs a technical analysis of the smart contract exploit. He reports that the smart contract appears to be a uniswap router, and burns tokens each time. This mechanism formed the core of the exploit, according to his analysis[18].
April 23rd, 2024 7:40:06 AM MDT CUBE3 Technical Analysis CUBE3 publishes a technical analysis of the exploit on Medium[10].
April 29th, 2024 9:17:00 PM MDT Weekly Security Report Included in SlowMist weekly security report[4].

Technical Details

This section includes specific detailed technical analysis of any security breaches which happened. What specific software vulnerabilities contributed to the problem and how were they exploited?

Analysis By [18]

Every time swap function of 0x6125c... is called, Z123 tokens in the QiaoLP are burned. I decompiled 0x6125c... contract, it was a uniswap router like contract, but it calls "update" function of Z123 token, which burns tokens of pair.

Total Amount Lost

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

How much was lost and how was it calculated? If there are conflicting reports, which are accurate and where does the discrepancy lie?

Immediate Reactions

How did the various parties involved (firm, platform, management, and/or affected individual(s)) deal with the events? Were services shut down? Were announcements made? Were groups formed?

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

  1. SlowMist Hacked - SlowMist Zone (May 13, 2024)
  2. 2.0 2.1 @SlowMist_Team Twitter (May 13, 2024)
  3. SesameCloudToken | Address 0xb000f121a173d7dd638bb080fee669a2f3af9760 | BscScan (May 13, 2024)
  4. 4.0 4.1 @SlowMist_Team Twitter (May 13, 2024)
  5. CUBE3.AI Detects Multiple Price Manipulations by Same Address | by CUBE3.AI | Apr, 2024 | Medium (May 13, 2024)
  6. @CertiKAlert Twitter (May 13, 2024)
  7. 67m Rug Pulls New Serial Crypto Hacker And The Zkasino Debacle April 2024 Crypto Crime Report (May 13, 2024)
  8. Z123 (Z123) Token Tracker | BscScan (May 13, 2024)
  9. 9.0 9.1 BNB Smart Chain Transaction Hash (Txhash) Details | BscScan (May 13, 2024)
  10. 10.0 10.1 CUBE3.AI Detects Multiple Price Manipulations by Same Address - CUBE3.AI (May 13, 2024)
  11. GitHub - SunWeb3Sec/DeFiHackLabs: Reproduce DeFi hacked incidents using Foundry. (May 13, 2024)
  12. https://twitter.com/PeckShieldAlert/status/1782322484911784385
  13. https://twitter.com/BLOCKCHAINALETS/status/1782326194790146451
  14. https://twitter.com/MetaTrustAlert/status/1782335252410818926
  15. https://twitter.com/CyversAlerts/status/1782332201805206000
  16. https://twitter.com/web3_watchdog/status/1782324228231987249
  17. https://twitter.com/ChainAegis/status/1790221555999617207
  18. 18.0 18.1 0xNickLFranklin - "Every time swap function of 0x6125c... is called, Z123 tokens in the QiaoLP are burned. I decompiled 0x6125c... contract, it was a uniswap router like contract, but it calls "update" function of Z123 token, which burns tokens of pair." - Twitter (Accessed May 14, 2024)