# Users might immediately be liquidated after position opening leading to a loss of CVA and Liquidation fee

Symmetrical openPosition runs solvency check before adjusting locked values for fill price, so accounts can be immediately liquidatable and lose CVA plus liquidation fee.

- Payout: Contest reward
- Severity: medium
- Program: Symmetrical
- Credited: Ruhum
- Disclosed: 2023-06-05
- Write-up quality: 6/10
- Original: https://github.com/sherlock-audit/2023-06-symmetrical-judging/issues/225
- Library page: https://bugbountylibrary.com/r/sherlock%3A2023-06-symmetrical%3AM-12
- Tags: 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:** PartyBFacetImpl.openPosition solvency check (symmio-core)
**Root cause:** isSolventAfterOpenPosition is called at line 150 using pre-adjustment locked values, but line 163/185 rescales lockedValues by openedPrice/requestedOpenPrice afterward, so the actual post-open locked value can be higher than what the solvency check assumed.
**Steps:**
1. PartyA requests a LIMIT quote at requestedOpenPrice; PartyB fills at openedPrice differing from requestedOpenPrice.
2. openPosition calls LibSolvency.isSolventAfterOpenPosition(quoteId, filledAmount, upnlSig) at line 150 with old locked values.
3. Check passes because old locked values are smaller (more available balance).
4. Line 163 (complete fill) or line 185 (partial fill) rescales quote.lockedValues by openedPrice/requestedOpenPrice, increasing locked value.
5. Account is now underwater and immediately liquidatable, losing CVA and liquidation fee.
**How found:** Code reading of openPosition ordering: noticed the solvency check precedes the locked-value adjustment that maintains fixed leverage, so the check uses stale values.
**Insight:** When a function both validates solvency/health and then mutates the collateral/locked-value state, check the ordering: any post-check rescaling of locked values invalidates the check. Look for price-ratio rescaling (openedPrice/requestedOpenPrice) applied after the health check.
