Cointime

Download App
iOS & Android

CertiK Report: Revisiting the Mango Market Incident Anaylsis

Validated Project

TL;DR

On October 11, 2022 at 6:19 PM EST, Mango Market was attacked, causing a loss of $116M. The attacker was able to manipulate the price of MNGO token and borrowed more assets on the platform than was permitted.

Introduction

Mango Market is built on the Solana blockchain and utilizes Serum DEX for spot margin trading while perpetual futures are traded on Mango Market’s own order book. Mango Market is governed by $MNGO token holders via the Mango DAO.

On October 11, 2022 at 10:19 PM UTC, Mango Markets was hacked by a group of attackers, including Avraham Eisenberg who claimed to be part of the group on Twitter. A loss of $116M occurred after manipulating the value of a posted collateral to higher prices, and then taking out significant loans against the inflated collateral, which ended up draining Mango’s treasury. The attacker began by funding the first account (CQvKSNnY…) with 5M USDC and then offered 483mm units of MNGO perps on the order book. Then the attacker funded the second account (4ND8FVPjU…) which was used to buy the 483mm units of MNFO perps at a price of $0.0382 per unit. As a result, the attacker was able to move the price of MNGO which they increased to $0.91. With this price set for MNGO/USD, the second account was able to borrow other tokens on Mango Market. The attacker subsequently took all available liquidity on Mango, leaving account A with approximately $11,537,729.05 borrowed tokens and account B with 500M uncollectible debt. The price of $MNGO has dropped 47% as a result of the incident.

On October 15, 2022 Eisenberg posted on Twitter that this was a “highly profitable trading strategy” and that it was “legal open market actions, using the protocol as designed.” In his tweet, he claims that the development team failed to anticipate the consequences of the protocol’s parameters.

Funds Returned

The attacker submitted a proposal to send the token back. The wallet receiving funds drained from the protocol offered via a DAO community vote to return a portion of the proceeds less a substantial bounty, if the community promised not to pursue legal action.

On October 15, 2022 Mango’s developers tweeted that they were in the process of getting back $67 million in various cryptoassets and that the team started working on an algorithm to decide on a refund split. Overall, after a proposal in the Mango’s governance forum was approved, Eisenberg was allowed to keep $47 million as a “bug bounty” while $67 million was sent back to the treasury.

Eisenberg was initially linked to the wallet address that carried out the attack via an ENS domain name ponzishorter.eth. An anonymous Discord chat log also showed Eisenberg discussing the precise mechanism of the exploit in advance.

Attack Flow

  1. The attacker funded the first account (Account A) CQvKSNnYtPTZfQRQ5jkHq8q2swJyRsdQLcFcj3EmKFfX with 5M USDC in this transaction.
  1. The attacker then offered out 483M units of MNGO perps (short) on the order book
  1. The attacker funded the second account (Account B) 4ND8FVPjUGGjx9VuGFuJefDWpg3THb58c277hbVRnjNa
  1. Then the second account was used to buy 483M units of MNGO perps (long), at a price of $0.0382 per unit.
  2. The attacker started to move the spot price of MNGO, and increased it to $0.91
  1. With MNGO/USD price of $0.91 per unit, account B was able to borrow other tokens on Mango Market. The attacker also used the funds in account B (the original deposit + the funds for selling borrowed MNGO) to borrow other tokens on Mango Market.
  2. The above borrow behaviors leave account A with a total value of $11,306,771.61 uncollectible debt and account B with -$115,182,674.43 bad debt.

Addresses

Two accounts were used to conduct the attack.

Account “A” received 5M USDC collateral which offered out 483mm units of MNGO perps: CQvKSNnYtPTZfQRQ5jkHq8q2swJyRsdQLcFcj3EmKFfX

Account “B,” the trader, used another 5 million USDC to buy the same amount of MNGO, using 10 million USDC in total to effectively hedge his position: 4ND8FVPjUGGjx9VuGFuJefDWpg3THb58c277hbVRnjNa

Profit and Assets Tracing

Solana.FM🔮🔎 SolanaFM SolanaFM

Account A: 

Account B: 

Conclusion

Overall, the attackers executed a self-funded economic attack by manipulating the oracle price of MNGO. Since the attack, a debate has been sparked on Twitter as to whether those responsible could be subject to civil or even criminal liability. So far, there are few precedents for prosecuting this type of DeFi market manipulation. This case has some similarities to the Indexed Finance exploit that took place in December 2021. The founders of the protocol identified the attacker, and a lawsuit is still pending in Canadian courts. Following these events, Mango Markets has announced a new version dubbed 'v4' which will use the Serum Community Fork. Despite serious setback, the project appears hopeful in securing a place in the future of web3.

Comments

All Comments

Recommended for you

  • State Council Issues Guidelines for Building a National Blockchain Network

    On October 9, according to Xinhua News Agency, the Central Committee of the Communist Party of China and the State Council issued the "Opinions on Developing New Quality Productive Forces," which consists of seven sections and nineteen articles. The guidelines propose leading with technological innovation and focusing on significantly enhancing total factor productivity as a core indicator. They emphasize innovation-driven development, reform as a key priority, adapting to local conditions, and establishing foundations before breaking new ground. In terms of industry, the guidelines call for cultivating and expanding emerging industries, strategically planning for future sectors such as quantum technology, biomanufacturing, hydrogen energy, nuclear fusion energy, brain-computer interfaces, embodied intelligence, and sixth-generation mobile communications. They also advocate for the comprehensive implementation of the "AI+" initiative to accelerate the application of new-generation intelligent terminal scenarios like humanoid robots. Regarding incentives and financial support, the guidelines propose establishing a corporate R&D reserve fund system, increasing the proportion of deductible R&D expenses for enterprises, and improving support policies for long-term capital investment in early-stage, small-scale, long-term, and hard technology projects. They aim to strengthen patient capital, enrich the system of technology innovation bond products, support quality tech enterprises in going public for financing, and optimize systems for mergers, acquisitions, and equity incentives for tech companies. The guidelines also stress the importance of avoiding superficiality, seeking grandiosity, and creating bubbles. They strictly prohibit the abuse of policies under the guise of developing new quality productive forces and will hold serious accountability for significant losses caused by blind investments and herd behavior.

  • Grayscale Ethereum Trust ETF Acquires $103.3 Million in ETH Over 20 Days, ETHE Sees $71.6 Million Outflow

    On October 10, monitoring by Arkham revealed that the Grayscale Ethereum Trust ETF has accumulated approximately $103.3 million in ETH over the past 20 days. During the same period, the ETHE fund experienced an outflow of about $71.6 million, while Grayscale clients net purchased approximately $31.7 million in ETH.

  • US Initiates 337 Investigation on AI Server Power Products, 20 Companies Listed

    On October 10, according to Tonghuashun news, on October 9 Eastern Time, the U.S. International Trade Commission (USITC) announced the initiation of a 337 investigation into 'certain vertical power transmission systems, their components, and computing systems containing such systems,' targeting the power supply segment for AI servers. A total of 20 companies are named, including Luxshare Precision, Foxconn Industrial Internet, Hon Hai, Hongbai Technology, Delta Electronics, Quanta Computer, Cloud Computing, Infineon, ChipSource Systems, Flex, and Tianhong Technology, spanning mainland China, Taiwan, the United States, Germany, Singapore, and Canada. The investigation stems from a complaint filed by Massachusetts-based power module manufacturer Vicor on September 9, alleging that the products in question infringe its patents and requesting the issuance of a limited exclusion order and a cease-and-desist order. This marks Vicor's third similar complaint in three years. According to USITC procedures, a target date for conclusion will be set within 45 days of the case being filed, and it will take a considerable amount of time to reach a formal conclusion.

  • Robinhood Crypto Explores Launching Stock Tokens with T. Rowe Price Digital Assets

    On October 10, Robinhood Crypto is exploring the launch of stock tokens linked to actively managed ETFs on the Robinhood Chain in collaboration with T. Rowe Price Digital Assets, which manages assets worth $1.9 trillion. The partnership is in the exploratory phase, and the potential product launch requires legal due diligence, approval from the issuer's board, final terms announcement, and regulatory approval from relevant jurisdictions. There is currently no guarantee that the collaboration will proceed or that the product will be launched, and specific details regarding the format, timing, and applicable regions have yet to be determined.

  • NVIDIA Reportedly Halts Production of RTX 5090 High-End Gaming GPU in Favor of Expensive Professional Cards

    On October 10, NVIDIA may have ceased production of the most powerful consumer graphics card, the RTX 5090, reallocating its core chips to higher-priced professional graphics cards. Hardware leaker MEGAsizeGPU claims that all future production of the GB202 chip will be supplied exclusively to the RTX PRO series, with no further use for the RTX 5090. Another leaker, hongxing2020, shared what appears to be a factory notice indicating that the China-exclusive version is also included in the production halt. Both utilize the same series of GB202 chips, but there is a significant price difference: the RTX 5090, equipped with 32GB of memory, was initially priced at $1,999, while the RTX PRO 6000, aimed at AI development and design, features 96GB of memory and is listed at $16,000 on the official website, eight times the price of the former. The RTX 5090 has already been out of stock in the U.S. market, with third-party sellers previously listing it for $9,600. If the production halt is confirmed, consumers will only be able to rely on remaining inventory. Additionally, there are reports that NVIDIA is preparing to launch a 24GB version of the RTX 5080 to replace the RTX 5090 as the highest-end gaming graphics card, while the current RTX 5080 has only about half the CUDA cores of the RTX 5090, resulting in approximately 30% lower performance in 4K gaming.

  • Putin States Negotiations with Ukraine Currently Impossible

    On October 10, Russian presidential aide Ushakov provided details about the phone call between the leaders of Russia and the United States. Ushakov stated that during the call, Putin elaborated on the measures Russia has taken in response to the terrorist attacks carried out by the Ukrainian armed forces. Putin indicated that Ukraine is attempting to undermine the Russian State Duma elections and is attacking civilians, which has compromised the possibility of immediately resuming negotiations. He also noted that Ukraine's attempts to hinder the advance of Russian troops have no prospects for success, as the Russian military currently holds complete initiative on the battlefield and is continuing to advance. Putin emphasized that due to Ukraine's stance, particularly its efforts to disrupt the Russian Duma elections, it is currently impossible to resume negotiations with Ukraine. Trump has instructed that the message conveyed by Putin during the call be communicated to the Ukrainian delegation. Ushakov mentioned that there has been no specific discussion yet regarding a potential bilateral meeting between Putin and Trump.

  • Telegram Renames Gram Wallet to Money and Launches for All Users

    On October 9, Telegram officially renamed its previously limited-access wallet service 'Gram wallet' to 'Money' and launched it to over one billion users across the platform. 'Money' is an integrated wallet for the Gram token, supporting storage, transfers, and purchases of platform gifts and collectible usernames. Additionally, the accompanying trading platform 'Walt' offers services for over 300 assets, including tokenized stocks, precious metals, perpetual contracts, and wealth management projects. Users can make instant transfers from 'Walt' to the 'Money' wallet without incurring network fees. The official statement also cautions that investing in crypto assets carries associated risks.

  • Blockchain.com Seeks Approval for Prediction Markets and Cryptocurrency Derivatives Trading

    On October 9, the crypto asset platform Blockchain.com submitted an application to the U.S. Commodity Futures Trading Commission (CFTC) seeking to obtain licenses for a designated contract market (DCM) and a futures commission merchant (FCM) to offer event contracts (prediction markets) and cryptocurrency derivatives trading services to U.S. users.

  • US May Seize Approximately $1 Billion in Cryptocurrency Related to Iran This Week

    U.S. Treasury Secretary Bencet stated at the NPolicy Summit held by Newsmax in Washington on Thursday that we may seize $1 billion in cryptocurrency this week, adding, "We know where it is, and we are isolating them." Bencet noted that the Trump administration's approach to Iran has shifted from 'maximum pressure' to 'absolute isolation,' with measures including maritime blockades, restrictions on air travel, and the cutting off of land routes. The UAE and Oman are cooperating with the U.S., which is also working with Pakistan and Turkey to cut off all land routes in and out of Iran.

  • Zcash Development Team Plans to Introduce Quantum-Resistant Signatures in January

    The development team of the privacy cryptocurrency Zcash (ZEC) plans to introduce post-quantum signature opcodes to the network in January next year, supporting hash-based signature technology to defend against potential quantum computing attacks. This solution primarily targets the transparent (public) payment pool, where approximately 70% of ZEC is currently stored. Although the developers have set January as the target deadline, the specific network activation time has not yet been finalized. This upgrade aims to prevent attackers from using existing public keys to reverse-engineer private keys and forge payment authorizations. Additionally, the Zcash node validator Zakura has launched a wallet tool based on Private Information Retrieval (PIR), allowing users to query balances across multiple addresses without revealing the correlation between those addresses to the server. Previously, Ethereum researcher Justin Drake warned that artificial intelligence could accelerate the cracking of traditional encryption algorithms and urged cryptocurrency holders to prepare for potential security threats.