# Force Close can be DOSed by exploiting `settleUpnl` function

PartyB front-runs PartyA's forceClosePosition by calling settleUpnl with an empty settlement array to bump PartyA/PartyB nonce, invalidating the Muon signature and reverting the close.

- 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/42
- Library page: https://bugbountylibrary.com/r/sherlock%3A2024-09-symmio-v0-8-4-update-contest%3AM-3
- Tags: area:web3 domain:web3 impact:dos kind:contest platform:sherlock sev:medium tech:evm tech:solidity technique:source-review vuln:business-logic vuln:dos vuln:signature-replay

**Target:** Perpetual futures settlement/force-close facet (ForceActionsFacetImpl, LibSettlement)
**Root cause:** settleUpnl increments partyANonces unconditionally before iterating quotesSettlementsData, so an empty array still bumps the nonce; no cooldown for self-settlement and no minimum PnL allow cheap nonce grinding.
**Steps:**
1. PartyA calls `requestToClosePosition`; PartyB does not respond within cooldown.
2. PartyA fetches Muon signatures (bound to current PartyA/PartyB nonces) and submits `forceClosePosition(quoteId, sig, settlementSig, updatedPrices)` to mempool.
3. PartyB front-runs with `settleUpnl` passing a `SettlementSig` whose `quotesSettlementsData`/`partyBs` arrays are empty, incrementing PartyA's nonce by 1.
4. PartyA's tx executes; `verifyHighLowPrice`/`verifySettlement` recompute hash with new nonce, mismatch, revert.
5. Repeat each time PartyA retries to indefinitely block force close.
**How found:** Code reading of settleUpnl: noticed nonce increment at line 34 occurs before the loop over quotesSettlementsData, so empty arrays still bump nonce; connected to nonce-bound Muon signature verification in forceClosePosition.
**Exploitation:** PartyB monitors mempool for PartyA's forceClosePosition, front-runs with a cheap settleUpnl call (empty arrays or 1-wei PnL self-settlement between own PartyA/PartyB accounts) to bump the nonce, causing signature verification to fail. PartyB only lets the close through when price favors it.
**Insight:** When signatures are bound to on-chain nonces, any permissionless function that bumps a nonce (even with empty/no-op inputs) becomes a griefing primitive against the counterparty's signed actions; check nonce-increment ordering vs. input validation.

