On March 28, 2023, the Jake-Paul-promoted memecoin SafeMoon lost approximately $8.9 million from its WBNB liquidity pool when an attacker exploited a public burn() function accidentally exposed in a recent contract upgrade. The function let any user burn tokens from any other address — including the SafeMoon WBNB Liquidity Pool itself. After negotiation, the attacker returned $7M (80%).
What happened
A SafeMoon contract upgrade introduced a burn() function with public access permissions — almost certainly an unintended consequence of a refactor that was supposed to leave the function as an internal admin operation. The function let any caller specify any address and burn SFM tokens from that address's balance, with no authorisation check.
PeckShield's analysis noted the upgrade pattern and characterised the bug as likely related to an admin key leak — someone with the upgrade authority appears to have pushed the public-burn version of the contract, either through compromise or through a developer error that wasn't caught in review.
The attack:
- Identified the public
burn()function in the new contract. - Burned a majority of SFM tokens held by the WBNB/SFM liquidity pool — drastically reducing the SFM supply in the pool while leaving the WBNB unchanged.
- The pool's automatic price-discovery mechanism interpreted the supply reduction as an enormous price spike in SFM — because the same WBNB now had to be priced against a tiny SFM supply.
- Sold a small amount of SFM into the pool at the artificially inflated price, draining the majority of the pool's WBNB in exchange.
- Walked with approximately $8.9M in WBNB.
Aftermath
- The SafeMoon team alerted the community within hours and engaged the attacker via on-chain messages.
- The attacker returned $7M (80% of the stolen funds) after negotiation, keeping $2M as an effective "bounty."
- SafeMoon paused affected contracts and shipped a redesigned token with proper access controls.
- The episode contributed to the broader unwind of the SafeMoon project, which had already faced SEC enforcement actions for fraud allegations against its founders.
Why it matters
SafeMoon is a striking case for how a single mistakenly-public function can compromise a contract's entire economic model. The burn() function in question was, in its intended form, a routine administrative operation. Exposing it without access control transformed it into a universal pool-drainer for any liquidity pool holding SFM.
The structural lessons:
- Access modifiers on every external function must be reviewed line-by-line, especially during upgrades. The default for any privileged operation should be
onlyOwneror equivalent; the burden of proof is on the developer to justify any function that'spublicorexternalwithout restrictions. - Function permissions should be tested explicitly — every audit should include an "anyone can call this" test for every privileged path, not just functional tests of the intended user flow.
- Recent upgrades are high-risk for the first 48-72 hours after deployment. Many protocols now schedule independent post-upgrade audits or community bug bounties with elevated payouts during the immediate post-upgrade window.
SafeMoon's broader unwind — combining the hack with SEC enforcement and the underlying tokenomics being widely viewed as predatory — is also a recurring memecoin pattern: technical security failures, regulatory pressure, and design-level skepticism often converge on the same projects within months of each other.
Sources & on-chain evidence
- [01]halborn.comhttps://www.halborn.com/blog/post/explained-the-safe-moon-hack-march-2023
- [02]theblock.cohttps://www.theblock.co/post/223547/safemoon-liquidity-pair-compromised-in-8-9-million-hack
- [03]zellic.iohttps://www.zellic.io/blog/safemoon-exploit-explained/