Fantasm Finance Contract Vulnerabilities

From Quadriga Initiative Cryptocurrency Hacks, Scams, and Frauds Repository
Revision as of 10:54, 28 January 2023 by Azoundria (talk | contribs) (Created page with "{{Imported Case Study|source=https://www.quadrigainitiative.com/casestudy/fantasmfinancecontractvulnerabilities.php}} thumb|Fantasm FinanceFantasm Finance is a protocol creating a synthetic token which is 1:1 pegged against the Fantom token. Due to a missing condition check for the minimum amount of fantom, the smart contract hot wallet was vulnerable. A malicious user exploited this and made off with over 1,007 ETH from the hot wallet. Some...")
(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.

Fantasm Finance

Fantasm Finance is a protocol creating a synthetic token which is 1:1 pegged against the Fantom token. Due to a missing condition check for the minimum amount of fantom, the smart contract hot wallet was vulnerable. A malicious user exploited this and made off with over 1,007 ETH from the hot wallet. Some remaining funds were whitehacked by the protocol team, and dietributed to users. While the hacker has been made an offer, and there is some suspicion of who they are, no offer to return the funds appears to be on the table, nor has the Fantasm team come forward, so it appears that affected users bear the full impact of the breach.

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

About Fantasm Finance

"Dear Fantomians, we’re excited to announce the launch of Fantasm Finance!" "Welcome to Fantasm. Fractional-Algorithmic Synthetic Token pegged to the value of 1 FTM on Fantom Opera."

"Fantasm Finance is a DeFi project aimed at developing and popularizing synthetic tokens for the Fantom Ecosystem. Imagine having exposure to the price of FTM token without actually owning it. That’s not fantasy: it’s #Fantasm."

"With Fantasm Finance we introduce a decentralized solution to scale up volume of the FTM token by using our partial collateralized design where synthetic token supply of xFTM will be partially backed by FTM and partially by the FSM token. xFTM is a Fractional-Algorithmic Synthetic Token pegged to the value of 1 FTM on Fantom Opera."

"xFTM is a synthetic token pegged to the price of the FTM cryptocurrency on the Fantom Network. It is a fractional-algorithmic synthetic token pegged 1:1 to the dollar value of 1 FTM. In other words, the price of 1 xFTM equals 1 FTM."

"On March 09, starting at approximately 02:00 p.m. UTC, suspicious transactions related to the Fantasm protocol which resulted in a loss of $2.62M."

"The Exploiter [got] funds from BNB Chain via Tornado Cash", swapped "BNB to USDC via Pancakeswap", and "USDC to Fantom via Celer Bridge". "The Exploiter receive[d] USDC from Celer Bridge" and "FTM from a faucet". They then "Swap[ped] USDC for more FTM" and "deploy[ed] a contract [to] trigger the exploit".

"That contract exploited the error in Fantasm’s Pool contract where the developer missed the condition checking for the minimum amount of input FTM when minting XFTM." "This contract deployed by Exploiter repeatedly [minting] XFTM by input only FSM token without entering any FTM, collect[ing] XFTM token, [selling] XFTM token to FTM, buy[ing] more FSM and repeat the first step to get a larger amount of FTM."

"After exploiting the vulnerability, the hacker exchanged all the profits for ETH, and used Tornado.cash to mix coins across the chain to the Ethereum main network. According to statistics, the hacker made a profit of 1,007 ETH (about 2.73 million US dollars)." "Eventually, the exploiter sold all his FTM for ETH and bridged these ETH to Ethereum, again via Celer Bridge. The total amount exploited is 1008.498875252390151 ETH (approximately $2,622,097)"

"Fantom’s on-chain synthetic asset protocol, Fantasm Finance, posted on social media that its FTM collateral reserves had been exploited, and called on users to exchange their XFTM immediately."

"URGENT ANNOUNCEMENT : Redeem your XFTM. Our FTM collateral reserve has been exploited, there is still 1,820,012 FTM pool balance remaining currently for redemption." "Please also exit from liquidity pools."

"Update: Some of the FTM collateral reserve has been whitehacked."

"[W]e apologize for the exploit event which just happened. A Post Mortem with compensation options will be published by tomorrow. We are analyzing the exploit right now. Most sincere apologies once again."

Fantasm Finance "performed a forensics analysis to provide more insight into transactions and actions taken by the exploiter."

"We have patched the vulnerability and shared the newly committed code with our auditor."

"[W]e have 935,415 FTM from white hacking the protocol ourselves once we became aware of the exploit. We will return this to users via a snapshot compensation at block height 32970600. This part will be returned to XFTM holders." "935k whitehacked FTM will be evenly distributed on Friday 18th to all XFTM holders during the snapshot. Under the Compensation Tab you can see your XFTM & FSM holdings at snapshot. There were around 4.9m XFTM at that time."

"We once again deeply apologize for the inconveniences caused by this. We encourage the attacker to reach out to the Fantasm team and begin a dialogue for the return of our users’ funds. They are impacting everyday users of DeFi and we would like them to do the right thing. We will honor a bug bounty of 10% upon returning of funds."

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 - Fantasm Finance Contract Vulnerabilities
Date Event Description
March 9th, 2022 8:20:36 AM Main Event Expand this into a brief description of what happened and the impact. If multiple lines are necessary, add them here.

Total Amount Lost

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

Prevention Policies

Which policies could have prevented this event from happening?

References

SlowMist Hacked - SlowMist Zone (Jun 25)

https://coinmarketcap.com/currencies/ethereum/historical-data/ (Dec 20)

Fantasm Finance - Fractional-Algorithmic Synthetic Token on Fantom Opera (Mar 16)

About Fantasm Finance - Fantasm (Mar 16)

@fantasm_finance Twitter (Mar 16)

@fantasm_finance Twitter (Mar 16)

Fantasm Finance - Fractional-Algorithmic Synthetic Token on Fantom Opera (Mar 16)

@fantasm_finance Twitter (Mar 16)

@fantasm_finance Twitter (Mar 16)

@fantasm_finance Twitter (Mar 16)

@fantasm_finance Twitter (Mar 16)

Address 0x47091e015b294b935babda2d28ad44e3ab07ae8d | FtmScan (Mar 16)

https://medium.com/@fantasmfinance/fantasm-finance-to-launch-synthetic-assets-on-fantom-ff31f954f5d (Mar 16)

https://medium.com/@fantasmfinance/the-fantasticdao-and-expansion-plans-fda82b6cc82 (Mar 16)

https://medium.com/@fantasmfinance/fantasm-finance-post-mortem-exploit-09-march-2022-daf48ead016f (Mar 16)

https://bscscan.com/tx/0x11407dd11dd028cfefdb24c9bde9163b4d10e3338e62c74ae2f5f3c2ec863133 (Mar 16)

https://bscscan.com/tx/0xeffe3e64b2df1e80d5282a55bd12a7e89cd088616d85274bb1589b3b96526f28 (Mar 17)

https://bscscan.com/tx/0xe47bd66738fd6721817ebc68cfdfde19d860330cc8b84bdf6761a3f1957ef188 (Mar 17)

https://bscscan.com/tx/0x2b5f61778881958d98935cdfcbcb97a7de8405b1d059c931f02461776ad9e007 (Mar 17)

Fantom Transaction Hash (Txhash) Details | FtmScan (Mar 17)

Fantom Transaction Hash (Txhash) Details | FtmScan (Mar 17)

Fantom Transaction Hash (Txhash) Details | FtmScan (Mar 17)

Contract Address 0x944b58c9b3b49487005cead0ac5d71c857749e3e | FtmScan (Mar 17)

https://etherscan.io/address/0x47091E015b294B935BAbDA2d28aD44e3Ab07ae8D (Mar 17)

https://beincrypto.com/fantasm-finance-loses-2-6-million-defi-exploit/ (Mar 17)

@PeckShieldAlert Twitter (Mar 17)

@nipun_pit Twitter (Mar 17)

Fantom's DeFi Fantasm Finance (FSM) Exploited; $2.6 Million Lost (Mar 17)

Fantom Based Protocol Fantasm Suffers 2 6m Exploit (Mar 17)

Fantom Transaction Hash (Txhash) Details | FtmScan (Mar 20)