Safemoon Vulnerable Deployer Exploited: Difference between revisions

From Quadriga Initiative Cryptocurrency Hacks, Scams, and Frauds Repository
Jump to navigation Jump to search
(Initial 30 minutes. All sources integrated.)
(Another 30 minutes complete.)
Line 43: Line 43:
|RektHQ Article
|RektHQ Article
|RektHQ publishes an article on the situation<ref name="rekthqtwitter-10772" />. Safemoon, a two-year-old cryptocurrency beset by scandal, lost $8.9m worth of locked LP tokens thanks to a bug introduced in its latest upgrade. The project's CEO, John Karony, announced the loss, but replies were disabled on both tweets. The hacker responsible claimed to be a white knight willing to return the funds, but past on-chain activity suggested otherwise. The vulnerability was introduced by the project's deployer address, and Peckshield suggested admin keys may have been leaked or phished. This episode is not a good look for a project that was never very highly regarded, and the lack of trust from the wider crypto community suggests the project may not be safe, even with the team<ref name="rektnews-10771" />.
|RektHQ publishes an article on the situation<ref name="rekthqtwitter-10772" />. Safemoon, a two-year-old cryptocurrency beset by scandal, lost $8.9m worth of locked LP tokens thanks to a bug introduced in its latest upgrade. The project's CEO, John Karony, announced the loss, but replies were disabled on both tweets. The hacker responsible claimed to be a white knight willing to return the funds, but past on-chain activity suggested otherwise. The vulnerability was introduced by the project's deployer address, and Peckshield suggested admin keys may have been leaked or phished. This episode is not a good look for a project that was never very highly regarded, and the lack of trust from the wider crypto community suggests the project may not be safe, even with the team<ref name="rektnews-10771" />.
|-
|March 29th, 2023 12:57:00 PM MDT
|SafeMoon Community Update
|<ref>https://twitter.com/safemoon/status/1641152524697600025 (May 17, 2023)</ref> TBS more above this from Twitter.
|-
|March 30th, 2023 12:59:00 PM MDT
|SafeMoon Community Update
|<ref>https://twitter.com/safemoon/status/1641515594565443587 (May 17, 2023)</ref>
|-
|March 31st, 2023 12:52:00 PM MDT
|SafeMoon Community Update
|<ref>https://twitter.com/safemoon/status/1641876085917769742 (May 17, 2023)</ref>
|-
|April 3rd, 2023 12:43:00 PM MDT
|SafeMoon Community Update
|SafeMoon shared a further update to the community on Twitter<ref>[https://twitter.com/safemoon/status/1642961152396107796 SafeMoon - "As previously communicated, we are taking a phased approach to reseed liquidity to ensure maximum stability. This will involve balancing pools across various chains including BSC, ETH, and POLY, which we began last week." - Twitter] (May 17, 2023)</ref>.
|-
|April 4th, 2023 3:47:00 PM MDT
|SafeMoon Community Update
|SafeMoon posts a community update on Twitter to notify that they've brought trading back online on the Binance smart chain, ethereum, and polygon<ref name=":1">[https://twitter.com/safemoon/status/1643369741954740225 SafeMoon - "Initial reseeding has taken place on BSC, with additional seeding on ETH and Poly chains." - Twitter] (May 17, 2023)</ref>.
|-
|April 11th, 2023 12:53:00 PM MDT
|SafeMoon Community Update
|SafeMoon posts a community update to notify that they are continuing to work to recover the lost funds from the liquidity pools<ref>[https://twitter.com/safemoon/status/1645862633050984454 SafeMoon - "As we continue working on the recovery of the LP funds, we appreciate that this is a challenging situation and that people might feel frustrated. We are truly thankful to you all for your continued patience and support during this process." - Twitter] (May 17, 2023)</ref>.
|-
|April 19th, 2023 7:24:00 AM MDT
|Announcement of BNB Liquidty Returning
|The Safemoon team confirms on Twitter that they've received 100BNB as a test transaction from the party holding the liquidity pool funds, and expect to receive the full 80% of the BNB they hold to the same address. Following that, they expect to set up a SafeMoon/BNB token pair liquidity pool<ref name=":2">[https://twitter.com/safemoon/status/1648679029438906369 SafeMoon - "A 100BNB test was completed by the party holding the LP funds. We have confirmed with them that the test was successful." - Twitter] (May 17, 2023)</ref>.
|-
|-
|April 20th, 2023 6:39:00 AM MDT
|April 20th, 2023 6:39:00 AM MDT
|Distribution of Retrieved Liquidity
|Distribution of Retrieved Liquidity
|SafeMoon has announced on Twitter that they will begin distributing the recovered liquidity<ref>[https://twitter.com/safemoon/status/1649029991022182401 SafeMoon - "SafeMoon will shortly be distributing the retrieved LP into the SafeMoon Bridging Liquidity Pools (BNB, POLYGON, ETH)." - Twitter] (May 3, 2023)</ref>.
|SafeMoon has announced on Twitter that they will begin distributing the recovered liquidity<ref name=":3">[https://twitter.com/safemoon/status/1649029991022182401 SafeMoon - "SafeMoon will shortly be distributing the retrieved LP into the SafeMoon Bridging Liquidity Pools (BNB, POLYGON, ETH)." - Twitter] (May 3, 2023)</ref>.
|}
|}


Line 92: Line 120:
== Ultimate Outcome ==
== Ultimate Outcome ==
What was the end result? Was any investigation done? Were any individuals prosecuted? Was there a lawsuit? Was any tracing done?
What was the end result? Was any investigation done? Were any individuals prosecuted? Was there a lawsuit? Was any tracing done?
=== April 3rd Update Post ===
SafeMoon shared an update on Twitter on April 3rd<ref name=":1" />.<blockquote>We want to express our gratitude for your continued patience and understanding during this time.
As previously communicated, we are taking a phased approach to reseed liquidity to ensure maximum stability. This will involve balancing pools across various chains including BSC, ETH, and POLY, which we began last week. Although we are experiencing some semi-frequent LP changes and moves, rest assured that this is a natural outcome of the reseeding process. We expect to see these moves continue as we work towards steadying the ship.
We acknowledge that it takes a significant amount of time and effort to comprehend, reset and rectify the situation in the aftermath of attacks. As a result, we are working closely with our partners to prioritize the safety and security of our customers at all times.</blockquote>
=== April 4th Update Post ===
SafeMoon shared an update on Twitter on April 4th<ref name=":1" />.<blockquote>Service Update:
SafeMoon community – A massive thank you for all your continued patience during this process.
Today we have some big updates for you that would not be possible without the dedication and hard work shown by all our amazing team.
πŸ†• We are delighted to say that trading has now resumed!
πŸ†• Initial reseeding has taken place on BSC, with additional seeding on ETH and Poly chains.
🟒 The team continue to re-balance and adjust liquidity pools during this process – Some semi-frequent LP changes and moves are expected, so do please bear with us.
πŸ†• A new upgraded SWaP interface has been deployed to <nowiki>http://swap.safemoon.com</nowiki>
πŸ†• SafeMoon SWaP and Evolve has been updated to now collect in native token. This means it will now only buy SFM to add to LP on BSC. No more selling by Swap and Evolve.
πŸ†• SafeMoon App updates released today: Apple and Android stores.
πŸ†• TMI now gives token partners on our SafeMoon SWaPΒ  the option to take a portion or all of their fees in BNB if they choose
πŸ†• When TMI is combined with the Tokenomics Supervisor, any token can take advantage of customized tokenomics
πŸ†• Tokenomics refinements (detailed below)
The 10% on buy/sell is split as follows:
6% in tokens
Β  Β  Β πŸ’  4% to reflections as always
Β  Β  Β πŸ’  2% to burn
4% in BNB
Β  Β  Β πŸ’  3% to LP
Β  Β  Β πŸ’  1% to ecosystem
Note: ETH/Poly tokens are still 10% - but swap fee 0.25% taken in native coin with TMI
There is so much more to come - Stay tuned for further updates.</blockquote>
=== Distribution of Retrieved Liquidity Back to Liquidity Pools ===
On April 20th, SafeMoon announced that they would being the process of distributing the retrieved liquidity back to the affected liquidity pools<ref name=":3" />.<blockquote>SafeMoon will shortly be distributing the retrieved LP into the SafeMoon Bridging Liquidity Pools (BNB, POLYGON, ETH).
This seeding may take place in incremental stages.
As part of regular ongoing maintenance and healthy operational procedures, SafeMoon may look to re-balance / re-distribute liquidity across multiple chain pairings over time.</blockquote>


== Total Amount Recovered ==
== Total Amount Recovered ==
The Safemoon team recovered funds from the BNB blockchain<ref name=":2" />.
The total amount recovered is unknown.
The total amount recovered is unknown.


Line 100: Line 189:
== Ongoing Developments ==
== Ongoing Developments ==
What parts of this case are still remaining to be concluded?
What parts of this case are still remaining to be concluded?
== General Prevention Policies ==
Greater review and insight needs to happen prior to smart contract upgrades.
== Individual Prevention Policies ==
== Individual Prevention Policies ==
{{Prevention:Individuals:Placeholder}}
{{Prevention:Individual:Avoid Using Smart Contracts}}


{{Prevention:Individuals:End}}
{{Prevention:Individuals:End}}


== Platform Prevention Policies ==
== Platform Prevention Policies ==
{{Prevention:Platforms:Placeholder}}
{{Prevention:Platforms:Regular Audit Procedures}}
Β 
The primary issue in this case was a smart contract upgrade without any validation. This should be subject to two third party reviews.


{{Prevention:Platforms:End}}
{{Prevention:Platforms:End}}


== Regulatory Prevention Policies ==
== Regulatory Prevention Policies ==
{{Prevention:Regulators:Placeholder}}
{{Prevention:Regulators:Platform Security Assessments}}
Β 
The primary issue in this case was a smart contract upgrade without any validation. This should be subject to two third party reviews.


{{Prevention:Regulators:End}}
{{Prevention:Regulators:End}}

Revision as of 13:06, 17 May 2023

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' and 'General Prevention' sections 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.

Safemoon Logo/Homepage

SafeMoon is a human-focused technology and innovation business expanding blockchain technologies to build blockchain, commerce, metaverse, and NFT products for good. SafeMoon has faced criticism in the past, initially labeled as a pump and dump scheme, and later shillfluencers were slapped with a class action suit. The project claims to be un-ruggable due to locked liquidity, but the transfer fees were criticized as ponzinomics. SafeMoon recently suffered an attack that drained the SFM/BNB pool, causing the project to lose $8.9M worth of 'locked LP.' The hacker claims to have front-run the attack and has reached out to SafeMoon to negotiate the return of funds. However, the past on-chain activity suggests they may not be trustworthy.

About Safemoon

Safemoon describes themselves as "[a] human-focused technology and innovation business expanding blockchain technologies for a brighter tomorrow."[1][2]

"A human-focused technology and innovation business expanding blockchain technologies for a brighter tomorrow."

"Deeply connected to and driven by our award winning community (The SafeMoon Army), we are innovating for good. Building blockchain, commerce, metaverse and NFT products to derive new kinds of value from crypto technology and to apply it to increasingly better use."

"We are now addressing the second part of our mission – the expansion and channeling of our technology to propel new innovations for good, and a Venture Philanthropy model to advance those innovations to every part of the world."

The Reality

"Initially labelled as a pump and dump scheme, Safemoon shillfluencers were later slapped with a class action suit, before Coffeezilla published a series of detailed investigations into what went on behind the scenes.[3]

The favourite of tiktok investors during the peak of Spring 2021’s BSC hype, Safemoon claimed it was un-ruggable due to locked liquidity, which was topped-up with every transfer of tokens. However, the transfer fees were also criticised as ponzinomics as bagholders were disincentivised to sell."

"Just over six hours before the attack, the Safemoon: Deployer address upgraded the token contract to a new implementation. In doing so, the team introduced a vulnerability leading to an astonishingly simple exploit."

"The new code left the burn() function publicly callable, allowing anyone to burn SFM tokens from any address.

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 - Safemoon Vulnerable Deployer Exploited
Date Event Description
March 28th, 2023 1:26:27 PM MDT Theft Transaction The transaction happens to remove the liquidity from Safemoon[4].
March 28th, 2023 3:17:00 PM MDT Attack Announced on Twitter The exploit is announced on Twitter. Responses to the Tweet are disabled[5].
March 29th, 2023 11:31:00 AM MDT RektHQ Article RektHQ publishes an article on the situation[6]. Safemoon, a two-year-old cryptocurrency beset by scandal, lost $8.9m worth of locked LP tokens thanks to a bug introduced in its latest upgrade. The project's CEO, John Karony, announced the loss, but replies were disabled on both tweets. The hacker responsible claimed to be a white knight willing to return the funds, but past on-chain activity suggested otherwise. The vulnerability was introduced by the project's deployer address, and Peckshield suggested admin keys may have been leaked or phished. This episode is not a good look for a project that was never very highly regarded, and the lack of trust from the wider crypto community suggests the project may not be safe, even with the team[3].
March 29th, 2023 12:57:00 PM MDT SafeMoon Community Update [7] TBS more above this from Twitter.
March 30th, 2023 12:59:00 PM MDT SafeMoon Community Update [8]
March 31st, 2023 12:52:00 PM MDT SafeMoon Community Update [9]
April 3rd, 2023 12:43:00 PM MDT SafeMoon Community Update SafeMoon shared a further update to the community on Twitter[10].
April 4th, 2023 3:47:00 PM MDT SafeMoon Community Update SafeMoon posts a community update on Twitter to notify that they've brought trading back online on the Binance smart chain, ethereum, and polygon[11].
April 11th, 2023 12:53:00 PM MDT SafeMoon Community Update SafeMoon posts a community update to notify that they are continuing to work to recover the lost funds from the liquidity pools[12].
April 19th, 2023 7:24:00 AM MDT Announcement of BNB Liquidty Returning The Safemoon team confirms on Twitter that they've received 100BNB as a test transaction from the party holding the liquidity pool funds, and expect to receive the full 80% of the BNB they hold to the same address. Following that, they expect to set up a SafeMoon/BNB token pair liquidity pool[13].
April 20th, 2023 6:39:00 AM MDT Distribution of Retrieved Liquidity SafeMoon has announced on Twitter that they will begin distributing the recovered liquidity[14].

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?

This allowed the attacker to burn large quantities of SFM held inside the SFM:BNB liquidity pool, vastly inflating the price of SFM tokens in the pool.

Then, by selling (previously acquired) SFM tokens into the skewed pool, the attacker was able to drain it of BNB liquidity, for a profit of 28k BNB, or $8.9M."

"Safemoon lost $8.9M worth of β€˜locked LP’ thanks to a bug introduced in the project’s latest upgrade."

Total Amount Lost

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

Attack Announcement on Twitter

The SafeMoon team initially posted on Twitter to announce the exploit[5].

To the @SAFEMOON community: We want to inform you that our LP has been compromised.

We are taking swift action in an attempt to resolve the issue as soon as possible. Follow here for updates.

Thank you for your support as we work to address this situation.


"The attack, which drained the SFM/BNB pool, was announced by the project and its CEO, John Karony, with replies disabled on both tweets.

A few hours after the attack, the hacker sent a message to the Safemoon: Deployer address, claiming to be MEV bot operator willing to return the funds:

Hey relax, we are accidently frontrun an attack against you, we would like to return the fund, setup secure communication channel , lets talk

However, past on-chain activity suggests they are no white knight after all…

Even if the team has dodged a bullet this time…

…can they be trusted after such a basic error?"

"The hacker claims to have frontrunned attack and has reached out to Safemoon to negotiate the return of funds, the majority of which have since been transferred to 0x237D where they remain at the time of writing."

"Whether a botched rug attempt, or sheer incompetence, this episode is not a good look for a project that was never very highly regarded."

Ultimate Outcome

What was the end result? Was any investigation done? Were any individuals prosecuted? Was there a lawsuit? Was any tracing done?

April 3rd Update Post

SafeMoon shared an update on Twitter on April 3rd[11].

We want to express our gratitude for your continued patience and understanding during this time.

As previously communicated, we are taking a phased approach to reseed liquidity to ensure maximum stability. This will involve balancing pools across various chains including BSC, ETH, and POLY, which we began last week. Although we are experiencing some semi-frequent LP changes and moves, rest assured that this is a natural outcome of the reseeding process. We expect to see these moves continue as we work towards steadying the ship.

We acknowledge that it takes a significant amount of time and effort to comprehend, reset and rectify the situation in the aftermath of attacks. As a result, we are working closely with our partners to prioritize the safety and security of our customers at all times.

April 4th Update Post

SafeMoon shared an update on Twitter on April 4th[11].

Service Update:

SafeMoon community – A massive thank you for all your continued patience during this process.

Today we have some big updates for you that would not be possible without the dedication and hard work shown by all our amazing team.

πŸ†• We are delighted to say that trading has now resumed!

πŸ†• Initial reseeding has taken place on BSC, with additional seeding on ETH and Poly chains.

🟒 The team continue to re-balance and adjust liquidity pools during this process – Some semi-frequent LP changes and moves are expected, so do please bear with us.

πŸ†• A new upgraded SWaP interface has been deployed to http://swap.safemoon.com

πŸ†• SafeMoon SWaP and Evolve has been updated to now collect in native token. This means it will now only buy SFM to add to LP on BSC. No more selling by Swap and Evolve.

πŸ†• SafeMoon App updates released today: Apple and Android stores.


πŸ†• TMI now gives token partners on our SafeMoon SWaP  the option to take a portion or all of their fees in BNB if they choose

πŸ†• When TMI is combined with the Tokenomics Supervisor, any token can take advantage of customized tokenomics

πŸ†• Tokenomics refinements (detailed below)

The 10% on buy/sell is split as follows:

6% in tokens

     πŸ’  4% to reflections as always

     πŸ’  2% to burn

4% in BNB

     πŸ’  3% to LP

     πŸ’  1% to ecosystem

Note: ETH/Poly tokens are still 10% - but swap fee 0.25% taken in native coin with TMI

There is so much more to come - Stay tuned for further updates.


Distribution of Retrieved Liquidity Back to Liquidity Pools

On April 20th, SafeMoon announced that they would being the process of distributing the retrieved liquidity back to the affected liquidity pools[14].

SafeMoon will shortly be distributing the retrieved LP into the SafeMoon Bridging Liquidity Pools (BNB, POLYGON, ETH).

This seeding may take place in incremental stages.

As part of regular ongoing maintenance and healthy operational procedures, SafeMoon may look to re-balance / re-distribute liquidity across multiple chain pairings over time.

Total Amount Recovered

The Safemoon team recovered funds from the BNB blockchain[13].

The total amount recovered is unknown.

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

Avoid the use of smart contracts unless necessary. Minimize the level of exposure by removing or withdrawing assets whenever possible. Aim to choose smart contracts which have obtained third party security audits, preferably having been audited by at least three separate reputable firms. Pay attention to the audit reports, which smart contracts are covered, and whether the smart contract has been upgraded or modified since the report. Ensure that any administrative functions with the ability to remove funds from the smart contract are under the authority of a multi-signature wallet which is controlled by at least three separate and reputable entities.

For the full list of how to protect your funds as an individual, check our Prevention Policies for Individuals guide.

Platform Prevention Policies

All aspects of any platform should undergo a regular validation/inspection by experts. This validation should include a security audit of any smart contracts, reporting any risks to the backing (of any customer assets, ensuring treasuries or minting functions are properly secured under the control of a multi-signature wallet, and finding any inadequacies in the level of training or integrity of the team. The recommended interval is twice prior to launch or significant system upgrade, once after 3 months, and every 6 months thereafter. It is recommended that the third party performing the inspection not be repeated within a 14 month period.

The primary issue in this case was a smart contract upgrade without any validation. This should be subject to two third party reviews.

For the full list of how to protect your funds as a financial service, check our Prevention Policies for Platforms guide.

Regulatory Prevention Policies

All platforms should undergo published security and risk assessments by independent third parties. Two assessments are required at founding or major upgrade, one after 3 months, and one every 6 months thereafter. The third parties must not repeat within the past 14 months. A risk assessment needs to include what assets back customer deposits and the risk of default from any third parties being lent to. The security assessment must include ensuring a proper multi-signature wallet, and that all signatories are properly trained. Assessments must be performed on social media, databases, and DNS security.

The primary issue in this case was a smart contract upgrade without any validation. This should be subject to two third party reviews.

For the full list of regulatory policies that can prevent loss, check our Prevention Policies for Regulators guide.

References

  1. ↑ Home | SafeMoon (May 3, 2023)
  2. ↑ https://pixabay.com/vectors/safemoon-safe-moon-safemoon-logo-6273158/ (May 3, 2023)
  3. ↑ 3.0 3.1 Rekt - Safemoon - REKT (May 3, 2023)
  4. ↑ Binance Exploit Transaction - BscScan (May 3, 2023)
  5. ↑ 5.0 5.1 SafeMoon - "We are taking swift action in an attempt to resolve the issue as soon as possible. Follow here for updates." - Twitter (May 3, 2023)
  6. ↑ RektHQ - "Yesterday, @safemoon lost $8.9M worth of supposedly locked LP to a vulnerability introduced in the project’s latest upgrade." - Twitter (May 3, 2023)
  7. ↑ https://twitter.com/safemoon/status/1641152524697600025 (May 17, 2023)
  8. ↑ https://twitter.com/safemoon/status/1641515594565443587 (May 17, 2023)
  9. ↑ https://twitter.com/safemoon/status/1641876085917769742 (May 17, 2023)
  10. ↑ SafeMoon - "As previously communicated, we are taking a phased approach to reseed liquidity to ensure maximum stability. This will involve balancing pools across various chains including BSC, ETH, and POLY, which we began last week." - Twitter (May 17, 2023)
  11. ↑ 11.0 11.1 11.2 SafeMoon - "Initial reseeding has taken place on BSC, with additional seeding on ETH and Poly chains." - Twitter (May 17, 2023)
  12. ↑ SafeMoon - "As we continue working on the recovery of the LP funds, we appreciate that this is a challenging situation and that people might feel frustrated. We are truly thankful to you all for your continued patience and support during this process." - Twitter (May 17, 2023)
  13. ↑ 13.0 13.1 SafeMoon - "A 100BNB test was completed by the party holding the LP funds. We have confirmed with them that the test was successful." - Twitter (May 17, 2023)
  14. ↑ 14.0 14.1 SafeMoon - "SafeMoon will shortly be distributing the retrieved LP into the SafeMoon Bridging Liquidity Pools (BNB, POLYGON, ETH)." - Twitter (May 3, 2023)