DMi Hack

TOTAL LOST $124K
Low Flash Loan Attacks bsc

What happened

On December 8, 2025, DMi’s DMi/WBNB PancakeSwap pool on BNB Smart Chain was drained through a token-transfer logic flaw. The DMi implementation redirected transfer() calls addressed to the liquidity pair away from the pair, while transferFrom() could still credit it normally. That inconsistency desynchronized the AMM’s actual DMi balance from its recorded reserves.

An attacker used the resulting pricing distortion in one transaction to extract about $124,000 in WBNB value.

Technical Root Cause

DMi gave transfer() and transferFrom() incompatible semantics for transfers to its PancakeSwap pair. The transfer() branch redirected the full amount away from the intended recipient, breaking the AMM invariant that its token balance tracks the reserves used in pricing. The exploitable condition was the asymmetric token accounting, not the flash loan itself.

Case & protocol details

Classification Token
Protocol Type Exploit/Other
Affected asset / contract DMi

Attack Timeline

The attacker used flash liquidity to execute a sequence of DMi transfers and swaps against the DMi/WBNB pair in one atomic transaction. A transfer() directed to the pair sent the DMi amount to outfee_add instead of the pair, while transferFrom() delivered DMi normally. Alternating those paths let the attacker create a mismatch between the pair’s actual token balance and the reserves used for swap pricing.

Once the reserves were distorted, a final swap overpaid WBNB; the flash liquidity was repaid and the reported remainder was about 138.68 WBNB.

Practice this exploit pattern safely

Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.