# Partial Fills before amendOrder TX exposes Users to unintended Risks

amendLimitOrder overwrites order.amount with baseAmount without accounting for partial fills, so a race with a fill doubles a user's exposure.

- Payout: Contest reward
- Severity: medium
- Program: GTE
- Credited: VinciGearHead
- Disclosed: 2026-02-05
- Write-up quality: 6/10
- Original: https://code4rena.com/reports/2025-08-gte-perps-and-launchpad#m-07
- Library page: https://bugbountylibrary.com/r/c4%3A2025-08-gte-perps-and-launchpad%3AM-07
- Tags: domain:web3 impact:funds-loss kind:contest platform:code4rena sev:medium tech:solidity technique:race-window technique:source-review vuln:business-logic vuln:race-condition

**Target:** Perps limit order amendment (PerpManager/OrderLib)
**Root cause:** _executeAmendAmount sets order.amount = args.baseAmount directly, treating the amendment as absolute size rather than a delta, without checking how much of the order has already been filled since submission.
**Steps:**
1. Alice places buy order for 10 ETH @ $2000.
2. Alice submits amendLimitOrder changing only expiryTime (baseAmount still 10 ETH).
3. Before her tx mines, 9 ETH of the order fills.
4. amendLimitOrder executes `_executeAmendAmount`, setting `order.amount = args.baseAmount` (10 ETH) instead of remaining 1 ETH.
5. Resulting exposure: 9 filled + 10 resting = 19 ETH vs intended 10 ETH.
**How found:** Code review of amendLimitOrder flow: noticed _processAmend routes same-price/side changes to _executeAmendAmount, which assigns absolute baseAmount rather than a delta, and reasoned about async ordering between submission and inclusion.
**Exploitation:** Sequencer/miner ordering lets a fill land between amend submission and execution; the amendment then re-inflates the order size, silently doubling the user's position and liquidation risk.
**Insight:** When an amend API takes absolute size fields, check whether it reconciles against already-filled quantity; any async order book where fills can interleave with amendments is a race candidate for size re-inflation.
