Skip to content
Business logic Write-up Intermediate

Post-Mortem: BetterBank $5M Exploit (August 2025)

The BetterBank protocol's reward functions validated only that swap paths included the FAVOR token, not which liquidity pair was used. An attacker created unauthorised pools with worthless tokens, repeatedly swapped to trigger bonus minting, and extracted $5 million.

medium.com

Published on medium.com

On August 27th, 2025, BetterBank, a lending protocol on PulseChain, suffered a $5 million exploit due to insufficient validation of liquidity pairs in its reward distribution mechanism. The attack exploited a critical vulnerability in how the protocol handled reward minting, allowing attackers to create unauthorized…

Olympix, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the swap functions validated only token addresses in the path, not the liquidity pair contract, allowing unauthorised pools to trigger bonus minting.

Impact

The attacker extracted $5 million from the protocol, though BetterBank later froze trading and negotiated the return of 550 million pDAI.

What the attacker needed

Ability to create a liquidity pool on PulseX; Access to the vulnerable swap functions

The fix

The protocol should whitelist authorised liquidity pairs and validate the pair contract in swap functions before allowing bonus minting.

How it was found

  1. Create unauthorised liquidity pools on PulseX pairing FAVOR with worthless tokens.
  2. Use the vulnerable swap functions to trade worthless tokens for FAVOR.
  3. Each swap triggers bonus minting via IFavorToken.logBuy().
  4. Bypass tax fees because the pool is not an official BetterBank pair.
  5. Convert accumulated bonuses into native tokens and stablecoins.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A DeFi protocol rewarded users with bonus tokens when they bought its FAVOR token through certain swap functions. The code checked that the swap involved FAVOR but did not check that it went through an approved trading pool. The attacker made their own pool with worthless tokens, swapped repeatedly to earn bonuses, and cashed them out for real money.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.