Fantasm Finance Contract Vulnerabilities
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!
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.[1][2][3][4][5][6][7][8]
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.
| Date | Event | Description |
|---|---|---|
| March 9th, 2022 6:34:12 AM MST | Funds Transferred From Tornado Cash | The attacker transfers BNB from the Tornado Cash protocol in two transactions[14][15][16]. |
| March 9th, 2022 6:36:06 AM MST | Swapping BNB To USDC | The attacker swaps their BNB to the USDC stablecoin[16][17]. |
| March 9th, 2022 6:39:21 AM MST | USDC Bridged To Fantom Network | The attacker uses the Celer Bridge to bring their USDC onto the Fantom network[16][18]. They ultimately receive their USDC[19]. |
| March 9th, 2022 6:46:57 AM MST | Attacker Obtaining FTM | The attacker obtains more FTM via a faucet and a swap from USDC[20][21][16]. |
| March 9th, 2022 6:49:26 AM MST | Exploit Contract Deployed | The attacker deploys an exploit contract[16][22][23]. |
| March 9th, 2022 7:42:00 AM MST | Urgent Announcement on Twitter | Fantasm Finance posts an urgent announcement on Twitter, recommending that all users redeem their XFTM. There is still a 1,820,012 FTM pool balance remaining at this time[24]. The exploiter address is provided[25]. |
| March 9th, 2022 8:11:00 AM MST | Exit From Liquidity Pools | Fantasm Finance recommends that users exit from their liquidity pools[26]. |
| March 9th, 2022 8:18:00 AM MST | Some Collateral Whitehacked | Fantasm Finance posts to Twitter to announce that some of the FTM collateral reserve was whitehacked[27]. |
| March 9th, 2022 8:20:36 AM MST | Main Event | Expand this into a brief description of what happened and the impact. If multiple lines are necessary, add them here. |
| March 9th, 2022 8:52:00 AM MST | Twitter Apology Announcement | Fantasm Finance posts an announcement/apology on their Twitter, acknowledging the exploit and that they are still investigating it further[28]. |
| March 10th, 2022 6:22:00 AM MST | Post-Mortem Published | Fantasm Finance publishes their post-mortem on the incident[16]. This is shared on their Twitter[29]. TBD more Twitter review. TBD review post-mortem and add in more timeline. |
| March 16th, 2022 5:54:00 AM MDT | WhiteHack FTM Distribution | Fantasm Finance announces that they will be distributing 935k of whitehacked Fantom tokens to affected users[30]. TBD more review. |
Total Amount Lost
The total amount lost has been estimated at $2,626,000 USD.
Exploiter address: [25] TBD follow this address.
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?
Fantasm Finance Twitter Announcement
Fantasm Finance initially posted a couple of urgent announcements and recommendations[24][26].
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.
Exploiter address:
https://ftmscan.com/address/0x47091e015b294b935babda2d28ad44e3ab07ae8d#tokentxns
We are looking into this right now, more details to follow immediately
Please also exit from liquidity pools.
They later followed this up with an announcement/apology on their Twitter[28].
Dear Community,
we 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.
Ultimate Outcome
What was the end result? Was any investigation done? Were any individuals prosecuted? Was there a lawsuit? Was any tracing done?
Fantasm Finance Post-Mortem
Fantasm Finance ultimately publishes a post-mortem on the incident[16][29].
Dear Fantasm Community and Partners, we would first and again like to sincerely apologize for the exploit which occurred yesterday. We also want to thank everyone who has helped us in handling this event and supported us in fixing the code vulnerability. We have patched the vulnerability and shared the newly committed code with our auditor.
Total Amount Recovered
There do not appear to have been any funds recovered in this case.
Fantams finance distributed whitehacked funds[30].
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
- ↑ SlowMist Hacked - SlowMist Zone (Jun 26, 2021)
- ↑ https://etherscan.io/address/0x47091E015b294B935BAbDA2d28aD44e3Ab07ae8D (Mar 17, 2022)
- ↑ https://beincrypto.com/fantasm-finance-loses-2-6-million-defi-exploit/ (Mar 17, 2022)
- ↑ @PeckShieldAlert Twitter (Mar 17, 2022)
- ↑ @nipun_pit Twitter (Mar 17, 2022)
- ↑ Fantom's DeFi Fantasm Finance (FSM) Exploited; $2.6 Million Lost (Mar 17, 2022)
- ↑ Fantom Based Protocol Fantasm Suffers 2 6m Exploit (Mar 17, 2022)
- ↑ Fantom Transaction Hash (Txhash) Details | FtmScan (Mar 20, 2022)
- ↑ Fantasm Finance - Fractional-Algorithmic Synthetic Token on Fantom Opera (Mar 16, 2022)
- ↑ About Fantasm Finance - Fantasm (Mar 16, 2022)
- ↑ Fantasm Finance - Fractional-Algorithmic Synthetic Token on Fantom Opera (Mar 16, 2022)
- ↑ https://medium.com/@fantasmfinance/fantasm-finance-to-launch-synthetic-assets-on-fantom-ff31f954f5d (Mar 16, 2022)
- ↑ https://medium.com/@fantasmfinance/the-fantasticdao-and-expansion-plans-fda82b6cc82 (Mar 16, 2022)
- ↑ Attacker Transfers Funds From TornadoCash - BscScan (Mar 16, 2022)
- ↑ More Funds From TornadoCash - BscScan (Mar 17, 2022)
- ↑ 16.0 16.1 16.2 16.3 16.4 16.5 16.6 Fantasm Finance Post Mortem: Exploit 09 March 2022 (Mar 16, 2022)
- ↑ The Exploiter swaps BNB to USDC via Pancakeswap - BSCScan (Mar 17, 2022)
- ↑ The Exploiter bridges USDC to Fantom via Celer Bridge - BSCScan (Mar 17, 2022)
- ↑ The Exploiter receives USDC from Celer Bridge - FtmScan (Mar 17, 2022)
- ↑ The Exploiter receives FTM from a faucet - FtmScan (Mar 17, 2022)
- ↑ Swap USDC for more FTM - FtmScan (Mar 17, 2022)
- ↑ Attacker Exploit Contract - FtmScan (Mar 17, 2022)
- ↑ Exploit Contract Creation - FtmScan (Apr 25, 2023)
- ↑ 24.0 24.1 fantasm_finance - "URGENT ANNOUNCEMENT : Redeem your XFTM" - Twitter (Mar 16, 2022)
- ↑ 25.0 25.1 Exploiter Address Token Transactions - FtmScan (Mar 16, 2022)
- ↑ 26.0 26.1 fantasm_finance - "Please also exit from liquidity pools." - Twitter (Mar 16, 2022)
- ↑ fantasm_finance - "Update: Some of the FTM collateral reserve has been whitehacked" - Twitter (Mar 16, 2022)
- ↑ 28.0 28.1 fantasm_finance - "we 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." - Twitter (Mar 16, 2022)
- ↑ 29.0 29.1 fantasm_finance - "Dear Community, we have published a Post Mortem for the Fantasm Finance Exploit on 09 March 2022." - Twitter (Mar 16, 2022)
- ↑ 30.0 30.1 fantasm_finance - "935k whitehacked FTM will be evenly distributed on Friday 18th to all XFTM holders during the snapshot" - Twitter (Mar 16, 2022)
- ↑ https://coinmarketcap.com/currencies/ethereum/historical-data/ (Dec 21, 2021)