DxSale
Why it happened
Attack class: Rugpull / insiderA single live owner key over the old locker was never renounced and not behind a timelock or multisig.
What would have stopped it
- Renounce ownership of the locker once locks are set, or move it behind a multisig with a timelock.
- Monitor ownership-transfer events on any contract that custodies user funds.
Not scored before the exploit
BlackHart had not scored DxSale before this exploit.
An attacker who controls the owner key of DxSale's old liquidity locker on BNB Chain has been draining LP tokens that more than 1,400 projects locked up as far back as 2021, including SafeMoon-linked liquidity. Around $1.74 million has been pulled out so far and roughly $2.91 million more is still exposed, out of about $7.3 million of affected positions. The locker keeps working exactly as coded. The problem is that whoever holds its owner key can move the locked funds, and that key is now in hostile hands. Proceeds were swapped into BNB and moved through more than 80 wallets, so they are effectively gone.
The drain runs against DxSale's liquidity locker, whose owner is now an attacker account. That account set its own code to point at a purpose-built drainer contract using a new account-delegation feature, so the locker sees every call as coming from its rightful owner. For each batch of positions the drainer drops the lock fee to one unit, creates lock records with the unlock date backdated to 1970 so they count as already expired, restores the fee, then withdraws the freed LP in a loop and routes it through wrapped BNB into BNB. The cash-out moved through a pass-through wallet and a years-dormant wallet tied to the DxSale team before fanning across 80 or more hops.
Attack flow
All 7 on-chain stepsThe attack in 4 steps. Step 1, Source: Attacker account (attacker), Bybit withdrawal (source). Step 2, Takeover: DxSale liquidity locker (hub), about $1.74M reached this step. Step 3, Monetization: Withdraw LP, swap to BNB (swap). Step 4, Laundering: Pass-through + 80+ hops (exit).
Step 1: Source
- AttackerAttacker accountowns the lockerdelegated to the drainer0xC4574DDE...aaFA69
- SourceBybit withdrawal104 BNB gas~ $67K, ~20h prior
Step 2: Takeover
- HubDxSale liquidity locker1,400+ positions~ $7.3M affected, ~$2.91M still exposed0xEb3a9C56...53e449
Step 3: Monetization
- SwapWithdraw LP, swap to BNBfee set to 1, unlock backdated to 1970withdraw in a loop, route through wrapped BNB0xc2efbd94...1e4718
Step 4: Laundering
- ExitPass-through + 80+ hops1,200+ BNB, ~$763Kteam-linked dormant wallet in the flow0x47F80D09...1F66bf
Why each step worked
- Live owner key0xC457...FA69
- Ownership takeoverowner moved to attacker ~269 days earlier, unnoticed
- EIP-7702 self-delegationattacker account sets its own code to the drainer, so the locker sees every call as its rightful owner
- Owner-only fund-moving functionschangeFees, createLocker, unlockToken gated only by onlyOwner; no multisig over user LP
- Backdated unlock acceptedlock records created with unlockTime = 68s after 1970, so positions register as already expired
- No ownership-change monitoringmissing controlthe quiet owner move sat undetected ~269 days; no alert on outflow either
Full forensic detail
Step-by-step reconstruction, root cause, counterfactuals, remediation, and disclosure timeline.
Exploit anatomy
Root cause
DxSale's old liquidity locker is a single contract that custodies LP tokens for thousands of projects. It kept owner-only functions that can change the lock fee, create lock records, and withdraw locked tokens. That owner key was live, never renounced, not behind a timelock, and not behind a multisig. Ownership over the key moved to an attacker, who then used the normal owner functions to convert locked deposits into a withdrawable balance and pull them out. The contract did exactly what it was written to do. The failure is that a single key was allowed to keep that much authority over other people's funds. Whether the key was always the team's or was acquired by an outsider is not independently proven; the load-bearing fact either way is the live privileged key.
// Owner-only functions on the locker that move user funds
function changeFees(uint256 newFee) external onlyOwner { ... }
function createLocker(address token, uint256 amount, uint256 unlockTime, string memory logo) external { ... } // unlockTime = 68 -> 1970, already expired
function unlockToken(uint256 lockerId) external { ... } // withdraws the positionPrevention analysis
The drain becomes impossible or far slower. A single hostile key can no longer change fees or withdraw, and a timelock would surface the owner change long before funds move.
The quiet owner change here happened about 269 days before the drain. An alert at that moment would have given holders months to exit.
The attacker account delegated its code to a drainer right before the drain. Watching for that delegation marker would have caught the setup.
Locks that outlive their teams and interfaces stay exposed for years. Moving them to maintained, ownerless infrastructure removes the standing risk.
Similar incidents
A privileged role on a DeFi product was used to withdraw user-supplied liquidity, with insider or key-control attribution. Same shape: legitimate authority turned against the funds it was meant to protect.
Custodial admin authority over locked assets was exercised to drain them. Identical risk class at the architecture level: a privileged custodial role over user funds without enough operational hardening.
Same delegation primitive used here: an account sets its own code to a drainer and self-executes. Usually pointed at victim wallets; here it is pointed at a protocol locker.
Remediation
Timeline
Get your protocol scored across 12 dimensions, or request ongoing coverage.