# Inconsistent in the liquidation fee leads to unfairness in liquidation process

Force-close liquidation credits PartyB's reserve vault to allocated balance before computing liquidation fee, so PartyA liquidators earn more than standard liquidators.

- Payout: Audit contest
- Severity: medium
- Program: Symmio V0 8 4 Update Contest
- Found by: xiaoming90
- Disclosed: 2024-09-27
- Write-up quality: 6/10
- Original: https://github.com/sherlock-audit/2024-09-symmio-v0-8-4-update-contest-judging/issues/52
- Library page: https://bugbountylibrary.com/r/sherlock%3A2024-09-symmio-v0-8-4-update-contest%3AM-5
- Tags: area:web3 domain:web3 impact:funds-loss kind:contest platform:sherlock sev:medium tech:solidity technique:source-review vuln:accounting-error vuln:business-logic vuln:liquidation

**Target:** ForceActionsFacet.forceClosePosition / LibLiquidation.liquidatePartyB
**Root cause:** forceClosePosition moves reserve vault funds into partyBAllocatedBalances before calling liquidatePartyB, shrinking the negative availableBalance used to compute remainingLf and liquidatorShare, unlike the standard liquidation path.
**Steps:**
1. PartyB has 1000 USD reserve vault, allocatedBalance 1000, lockedValue 100, PnL -2000.
2. Standard liquidatePartyB: availableBalance = 1000-100-2000 = -1100, larger remainingLf.
3. forceClosePosition: reserveVault zeroed, allocatedBalance += 1000 => 2000, then liquidatePartyB computes availableBalance = 2000-100-2000 = -100.
4. Smaller |availableBalance| yields larger remainingLf and liquidatorShare for the force-closing PartyA.
**How found:** Compared the two liquidation entry points and noticed forceClosePosition mutates allocatedBalance with reserve vault funds before the shared liquidatePartyB fee computation.
**Exploitation:** PartyA with force-close rights triggers forceClosePosition on an underwater PartyB, capturing a larger liquidatorShare than a normal liquidator would receive for the same position.
**Insight:** When two code paths reach the same fee/settlement function, diff the state mutations performed before the call; pre-crediting balances changes the loss magnitude that fee formulas depend on.

