# Lister is overpaying during the cancel of his listing on ```Listings::cancelListings()```.

Flayer's cancelListings forces lister to repay already-used tax, double-charging fees and burning excess collection tokens.

- Payout: Audit contest
- Severity: high
- Program: Flayer
- Found by: 0x73696d616f
- Disclosed: 2024-08-06
- Write-up quality: 6/10
- Original: https://github.com/sherlock-audit/2024-08-flayer-judging/issues/705
- Library page: https://bugbountylibrary.com/r/sherlock%3A2024-08-flayer%3AH-23
- Tags: area:web3 domain:web3 impact:funds-loss kind:contest platform:sherlock sev:high tech:solidity technique:source-review vuln:accounting-error vuln:business-logic

**Target:** Listings contract cancelListings function
**Root cause:** requiredAmount subtracts only refund, not fees, so the lister must return the used tax that was already prepaid at listing creation; burn also ignores used tax.
**Steps:**
1. Call `Listings::createListings()`; receive `1e18 - prepaidTax` collection tokens.
2. Wait some time so part of prepaid tax is used.
3. Call `Listings::cancelListings()`; `_resolveListingTax` returns `_fees` (used) and `_refund` (unused).
4. Observe `requiredAmount = 1e18 - refund` requires paying back `fees` again.
5. `collectionToken.burn(requiredAmount + refund)` burns full `1e18` including used tax.
**How found:** Code reading of cancelListings accounting: compared tokens received at creation (`1e18 - refund - fees`) with tokens required at cancellation (`1e18 - refund`), spotting the `-fees` discrepancy.
**Exploitation:** Any lister cancelling a liquid listing after time passes is forced to pay used tax out of pocket; no attacker needed, loss occurs on normal cancellation.
**Insight:** In prepaid-fee escrow designs, verify that cancellation refund math subtracts both unused and used portions consistently with the creation-time deduction; check burn amounts against actual fee capture.

