Cryptobottle Disabled Swap Balance Check Vulnerability

From Quadriga Initiative Cryptocurrency Hacks, Scams, and Frauds Repository
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!

Cryptobottle Logo/Homepage

CryptoBottle is a unique concept where an NFT representation of virtual vine is minted, which contains a diverse mix of cryptocurrency assets. The NFT can be "opened" in the future to unlock the underlying assets, and this is permanent and irreversible, decreasing the remaining bottles in the collection. Throughout October, it was found that there were multiple vulnerabilities in the smart contract, with the final breach for $490k due to a disabled swap balance check vulnerability. The project has continued to announce some revelations about the hacker, but it's unclear if any compensation will be made for the locked assets which were lost.[1][2][3][4][5][6][7][8][9][10][11][12]

About Cryptobottle

"Create, buy or sell first bottles virtual wine. Collect, invest or become an artist by creating your own NFT cryptobottle. Anyone can launch their own vintages (collections) with the possibility of adding benefits that will be used in real life!"

"Cryptobottle is an innovative project designed to empower various entities—such as businesses, associations, event companies, and retailers—to create unique NFT collections. These NFTs, known as "cryptobottles," combine art, utilities, and cryptocurrencies, encapsulating significant financial value. Cryptobottles serve as a versatile tool for promotion, customer loyalty, and sales enhancement."

"Our platform offers an incredibly simple solution for acquiring cryptocurrencies and unique artworks without needing any specialized knowledge. Users can configure these super NFTs according to their specific needs, highlighting their products or services in the most effective way possible."

"These vintages of bottles are actually collections of digital objects which do not contain wine, but cryptocurrencies."

"Each bottle owned gives you access to customer benefits.

The estates offer you these advantages to enhance their wines.

They can take the form of promotional codes, vouchers, loyalty programs, etc cultural advantages.. and are proposed by the domain that creates the vintage.

Other "affiliation" partnerships can also be offered by any company.

The possibilities are endless. Choose your Cryptobottles well!"

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 attacker exploited a critical vulnerability to disable the balance check in the swap() method after a callback. This allowed them to make arbitrary swaps to acquire a large amount of NAS tokens, which they then sold, resulting in a loss of around $490,000 for the project."

Key Event Timeline - Cryptobottle Disabled Swap Balance Check Vulnerability
Date Event Description
May 29th, 2024 12:41:00 AM MDT Launch Tweet Posted Online CryptoBottle posts an online announcement explaining their CryptoBottle concept.
October 24th, 2024 4:47:59 AM MDT Polygon Blockchain Transaction A blockchain transaction on Polygon when the attack occurs.
October 24th, 2024 11:30:00 AM MDT Tweet Thanking The Hacker The CryptoBottle team thanks the hacker for hacking their smart contract and ensuring that their first batch of CryptoBottle NFTs are truly a collector's item. Apparently they have sold out.
October 31st, 2024 5:00:00 PM MDT CertiK CryptoBottle Analysis Posted CertiK publishes an analysis of the CryptoBottle exploit which
November 11th, 2024 6:06:00 AM MST CertiK Analysis Prepared More CertiK prepares an analysis of all exploits, mainly focusing on the largest $490k hack which happened near the end of October.

Technical Details

"Flash swaps are an integral feature of Uniswap V2, during which, pair contracts send output tokens to the recipient before enforcing a balance check to ensure that enough input tokens have been received for the swap. If this balance check is bypassed, anyone can make any deal and drain the pair which is the case for this incident."

"The vulnerable Navigator’s Adventage contract let users acquire NAS tokens either by minting at a fixed price or by swapping, like on a typical automated market maker (AMM). This option is supposed to be controlled by the 'fixedPriceEnabled’ variable. However, anyone can set this variable to True or False as it is controlled by public functions."

"When 'fixedPriceEnabled' is set to true, the mint() method is enabled and 'fixedPrice' is set to 10 20. Critically, the balance check in the swap() function is disabled after callback. This means anyone can effectively make any deal they wanted through swap(). The attacker used this to swap X amount of NAS tokens for 1 USDT."

"Before conducting any swaps, the attacker first called function 0xeebe2e12() which set 'fixedPriceEnabled' at storage 0xe to True."

"The attacker then called the “Invest()“ function on the attack contract to make several arbitrary swaps with just 1 USDT to acquire large amounts of NAS tokens. a. 1 USDT → 1,000 NAS b. 1 USDT → 10,000 NAS c. 1 USDT → 40 million NAS (three times)"

"The attacker set 'fixedPriceEnabled’ at storage 0xe back to False via function 0xf9ae(). They then called “Claim“ on the attack contract and conducted several normal swaps to dump the acquired NAS tokens and drain the USDT held in the Navigator’s Adventage contract."

Total Amount Lost

The total amount lost has been estimated at $490,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

"The attack on October 24 was the largest of the three, where the attacker exploited a critical vulnerability to disable the balance check in the swap() method after a callback. This allowed them to make arbitrary swaps to acquire a large amount of NAS tokens, which they then sold, resulting in a loss of around $490,000 for the project."

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. Polygon PoS Chain Transaction Hash (Txhash) Details | PolygonScan (Accessed Nov 15, 2024)
  2. @NFTCryptoBottle Twitter (Accessed Nov 15, 2024)
  3. https://www.certik.com/resources/blog/5sFtciEJ5fBV56zSeXWcW-cryptobottle-incident-analysis (Accessed Nov 15, 2024)
  4. @NFTCryptoBottle Twitter (Accessed Nov 15, 2024)
  5. @NFTCryptoBottle Twitter (Accessed Nov 15, 2024)
  6. @NFTCryptoBottle Twitter (Accessed Nov 15, 2024)
  7. @NFTCryptoBottle Twitter (Accessed Nov 15, 2024)
  8. @NFTCryptoBottle Twitter (Accessed Nov 15, 2024)
  9. @NFTCryptoBottle Twitter (Accessed Nov 15, 2024)
  10. @NFTCryptoBottle Twitter (Accessed Nov 15, 2024)
  11. @NFTCryptoBottle Twitter (Accessed Nov 15, 2024)
  12. Cryptobottle (Accessed Nov 15, 2024)