Skip to content

feat(perps): every close position analytics event carries order_type (market or limit) - #11027

Merged
abretonc7s merged 2 commits into
mainfrom
TAT-4200-feat-every-close-position-analytics
Oct 23, 2026
Merged

abretonc7s merged 2 commits into
mainfrom
TAT-4200-feat-every-close-position-analytics

Conversation

@abretonc7s

@abretonc7s abretonc7s commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Explanation

Mixpanel shows Perp Position Close Transaction events with order_type = not set.

Root cause: the close-all summary event that TradingService.closePositions emits from its finally block carries status, completion_duration, bulk_action_id, number_positions_closed and error_message, but no order_type. On Hyperliquid the provider's batch close runs, so this summary is the only close event a close-all produces.

Fix: tag that summary event order_type: market. A batch close only ever submits market orders: ClosePositionsParams has no order type, HyperLiquidProvider.closePositions builds reduce-only IOC orders tagged market, and the fallback closes each position with closePosition({ symbol }), which defaults to market. The property is set in finally, so failed and thrown batches carry it too.

Every close event path in the controller, after this change:

Path Event order_type
closePosition submitted / executed / failed / partially filled Perp Position Close Transaction params.orderType ?? market (unchanged)
closePositions per-position (fallback) same market (unchanged)
closePositions summary same market (was missing)
flipPosition Perp Trade Transaction market (unchanged)
TP/SL update Perp Risk Management n/a: no close event. A TP/SL trigger closes on the venue; the controller emits no close event for it.

Contract impact: one added property on an emitted analytics payload. No state, method, export, constant or type change. Mobile (app/components/UI/Perps/adapters/mobileInfrastructure.ts) and Extension (app/scripts/controllers/perps/infrastructure.ts) forward controller event properties unchanged, so both pick this up on the next controller release.

Client paths that emit their own close event without order_type (separate client fix, not in this PR):

  • Extension ui/components/app/perps/perps-view.tsx:252, :265, :274 (close-all handler; main at 2454d1f133): tracks MetaMetricsEventName.PerpsPositionCloseTransaction with only status and number_positions_closed.
  • Mobile (main at 6441e74cbd): none. PERPS_POSITION_CLOSE_TRANSACTION appears only in the event definitions and the A/B mapping (app/components/UI/Perps/abTestConfig.ts:97).

Validation:

  • Testnet recipe: drives PerpsController through its public API with the real Messenger on Hyperliquid testnet (fixture dev1, SOL, ~11 USD positions), records every metrics.trackPerpsEvent call, and asserts each close path. Every position it opened was closed, and teardown asserts no SOL positions or orders.
    • Market close: submitted/executed, both market. Limit close: submitted/executed, both limit. Flip: trade events submitted/executed, both market. TP/SL update: no close event. Close-all summary: executed, market.
    • With the fix reverted the same recipe fails only at the close-all assertion (order_type missing).
  • Unit tests: three new TradingService tests (success, thrown and fallback batch close) assert order_type: market on every close event; all fail with the fix reverted.

References

Validation Recipe

recipe.json (23 nodes — Close position analytics carry order_type - Core)
{
  "$schema": "https://farmslot.io/schemas/recipe-v1.schema.json",
  "title": "Close position analytics carry order_type - Core",
  "description": "Drives PerpsController closePosition (market and limit), flipPosition, updatePositionTPSL and closePositions through the real messenger on Hyperliquid testnet, as a client wallet does, and records every analytics event the controller hands to metrics.trackPerpsEvent. Only the wallet side (account selection, keyring signing with the fixture key) is answered by the driver. Positions are opened with the library place_order action on one task-owned market (default SOL, about 11 USD notional) and every one is closed by its phase or by teardown. Close-all is scoped to that market. Driver records are written to fixed scratch paths, deleted by the driver before it runs, copied into the run package, and asserted against this run's run_tag.",
  "paramsSchema": {
    "type": "object",
    "additionalProperties": false,
    "required": [
      "run_tag",
      "exclusive_testnet_market"
    ],
    "properties": {
      "account": {
        "type": "string",
        "default": "dev1",
        "description": "Wallet-fixture signing account for Hyperliquid testnet."
      },
      "market": {
        "type": "string",
        "default": "SOL",
        "description": "Task-owned testnet market. Not BTC: other runs hold BTC state on dev1."
      },
      "notional": {
        "type": "string",
        "default": "11",
        "description": "USD notional of each opened position (Hyperliquid minimum is 10)."
      },
      "leverage": {
        "type": "number",
        "default": 2,
        "description": "Leverage of each opened position."
      },
      "run_tag": {
        "type": "string",
        "description": "Fresh id for this run; the driver records and assertions are bound to it."
      },
      "exclusive_testnet_market": {
        "type": "boolean",
        "enum": [
          true
        ],
        "description": "Confirm this run owns the account/market during setup and teardown cleanup."
      }
    }
  },
  "proofTargets": [
    {
      "id": "AC-1",
      "kind": "acceptance",
      "proofMode": "state",
      "claim": "[TAT-4200] Every close position event emitted by perps-controller (single close, close all, flip, TP/SL close) carries order_type market or limit."
    },
    {
      "id": "AC-2",
      "kind": "acceptance",
      "proofMode": "review",
      "claim": "[TAT-4200] Any client path that emits its own close event without order_type is listed with file and line."
    }
  ],
  "workflow": {
    "entry": "setup-driver-tsconfig",
    "teardown": "teardown-clean-market",
    "nodes": {
      "setup-driver-tsconfig": {
        "action": "command",
        "timeout_ms": 30000,
        "intent": "Point the client driver at this checkout's package sources",
        "next": "setup-clean-market"
      },
      "setup-clean-market": {
        "action": "call",
        "ref": "perps.clean-market-testnet",
        "params": {
          "account": "{{params.account}}",
          "market": "{{params.market}}",
          "exclusive_testnet_market": "{{params.exclusive_testnet_market}}"
        },
        "intent": "Start from a flat task-owned testnet market with no open orders",
        "next": "setup-open-for-tpsl"
      },
      "setup-open-for-tpsl": {
        "action": "metamask.perps.place_order",
        "network": "testnet",
        "account": "{{params.account}}",
        "market": "{{params.market}}",
        "side": "long",
        "notional": "{{params.notional}}",
        "leverage": "{{params.leverage}}",
        "intent": "Open a small long to attach TP/SL to and then close by market",
        "next": "ac1-tpsl-drive"
      },
      "ac1-tpsl-drive": {
        "action": "command",
        "timeout_ms": 180000,
        "intent": "TP/SL update through the controller public API, recording its analytics events",
        "next": "ac1-tpsl-evidence"
      },
      "ac1-tpsl-evidence": {
        "action": "index_artifacts",
        "artifacts": [
          {
            "type": "json",
            "category": "proof",
            "label": "TP/SL update: controller result, positions and captured analytics events",
            "proofTarget": "AC-1"
          },
          {
            "type": "log",
            "category": "proof",
            "label": "TP/SL update: controller debug log",
            "proofTarget": "AC-1"
          }
        ],
        "intent": "Keep the tp/sl update record and controller log in the run package",
        "next": "ac1-tpsl-no-close-event"
      },
      "ac1-tpsl-no-close-event": {
        "action": "assert_json",
        "assert": {
          "all": [
            {
              "path": "$.runTag",
              "operator": "eq",
              "value": "{{params.run_tag}}"
            },
            {
              "path": "$.phase",
              "operator": "eq",
              "value": "tpsl"
            },
            {
              "path": "$.market",
              "operator": "eq",
              "value": "{{params.market}}"
            },
            {
              "path": "$.error",
              "operator": "falsy"
            },
            {
              "path": "$.positionBefore.side",
              "operator": "eq",
              "value": "long"
            },
            {
              "path": "$.result.success",
              "operator": "eq",
              "value": true
            },
            {
              "path": "$.closeEvents",
              "operator": "length_eq",
              "value": 0
            },
            {
              "path": "$.riskEventCount",
              "operator": "gte",
              "value": 1
            },
            {
              "path": "$.positionAfter.side",
              "operator": "eq",
              "value": "long"
            }
          ]
        },
        "intent": "Setting TP/SL on an open position emits no close position event",
        "proves": [
          "AC-1"
        ],
        "next": "ac1-close-market-drive"
      },
      "ac1-close-market-drive": {
        "action": "command",
        "timeout_ms": 180000,
        "intent": "Single market close through the controller public API, recording its analytics events",
        "next": "ac1-close-market-evidence"
      },
      "ac1-close-market-evidence": {
        "action": "index_artifacts",
        "artifacts": [
          {
            "type": "json",
            "category": "proof",
            "label": "Single market close: controller result, positions and captured analytics events",
            "proofTarget": "AC-1"
          },
          {
            "type": "log",
            "category": "proof",
            "label": "Single market close: controller debug log",
            "proofTarget": "AC-1"
          }
        ],
        "intent": "Keep the single market close record and controller log in the run package",
        "next": "ac1-close-market-order-type"
      },
      "ac1-close-market-order-type": {
        "action": "assert_json",
        "assert": {
          "all": [
            {
              "path": "$.runTag",
              "operator": "eq",
              "value": "{{params.run_tag}}"
            },
            {
              "path": "$.phase",
              "operator": "eq",
              "value": "close-market"
            },
            {
              "path": "$.market",
              "operator": "eq",
              "value": "{{params.market}}"
            },
            {
              "path": "$.error",
              "operator": "falsy"
            },
            {
              "path": "$.positionBefore.side",
              "operator": "eq",
              "value": "long"
            },
            {
              "path": "$.result.success",
              "operator": "eq",
              "value": true
            },
            {
              "path": "$.closeStatuses",
              "operator": "deep_eq",
              "value": [
                "submitted",
                "executed"
              ]
            },
            {
              "path": "$.closeOrderTypes",
              "operator": "deep_eq",
              "value": [
                "market",
                "market"
              ]
            },
            {
              "path": "$.positionAfter",
              "operator": "falsy"
            }
          ]
        },
        "intent": "Every close event from a market close carries order_type market",
        "proves": [
          "AC-1"
        ],
        "next": "setup-open-for-limit"
      },
      "setup-open-for-limit": {
        "action": "metamask.perps.place_order",
        "network": "testnet",
        "account": "{{params.account}}",
        "market": "{{params.market}}",
        "side": "long",
        "notional": "{{params.notional}}",
        "leverage": "{{params.leverage}}",
        "intent": "Open a small long to close with a limit order",
        "next": "ac1-close-limit-drive"
      },
      "ac1-close-limit-drive": {
        "action": "command",
        "timeout_ms": 180000,
        "intent": "Single limit close through the controller public API, recording its analytics events",
        "next": "ac1-close-limit-evidence"
      },
      "ac1-close-limit-evidence": {
        "action": "index_artifacts",
        "artifacts": [
          {
            "type": "json",
            "category": "proof",
            "label": "Single limit close: controller result, positions and captured analytics events",
            "proofTarget": "AC-1"
          },
          {
            "type": "log",
            "category": "proof",
            "label": "Single limit close: controller debug log",
            "proofTarget": "AC-1"
          }
        ],
        "intent": "Keep the single limit close record and controller log in the run package",
        "next": "ac1-close-limit-order-type"
      },
      "ac1-close-limit-order-type": {
        "action": "assert_json",
        "assert": {
          "all": [
            {
              "path": "$.runTag",
              "operator": "eq",
              "value": "{{params.run_tag}}"
            },
            {
              "path": "$.phase",
              "operator": "eq",
              "value": "close-limit"
            },
            {
              "path": "$.market",
              "operator": "eq",
              "value": "{{params.market}}"
            },
            {
              "path": "$.error",
              "operator": "falsy"
            },
            {
              "path": "$.positionBefore.side",
              "operator": "eq",
              "value": "long"
            },
            {
              "path": "$.request.orderType",
              "operator": "eq",
              "value": "limit"
            },
            {
              "path": "$.result.success",
              "operator": "eq",
              "value": true
            },
            {
              "path": "$.closeStatuses",
              "operator": "deep_eq",
              "value": [
                "submitted",
                "executed"
              ]
            },
            {
              "path": "$.closeOrderTypes",
              "operator": "deep_eq",
              "value": [
                "limit",
                "limit"
              ]
            },
            {
              "path": "$.positionAfter",
              "operator": "falsy"
            }
          ]
        },
        "intent": "Every close event from a limit close carries order_type limit",
        "proves": [
          "AC-1"
        ],
        "next": "setup-open-for-flip"
      },
      "setup-open-for-flip": {
        "action": "metamask.perps.place_order",
        "network": "testnet",
        "account": "{{params.account}}",
        "market": "{{params.market}}",
        "side": "long",
        "notional": "{{params.notional}}",
        "leverage": "{{params.leverage}}",
        "intent": "Open a small long to flip short and then close with close-all",
        "next": "ac1-flip-drive"
      },
      "ac1-flip-drive": {
        "action": "command",
        "timeout_ms": 180000,
        "intent": "Flip through the controller public API, recording its analytics events",
        "next": "ac1-flip-evidence"
      },
      "ac1-flip-evidence": {
        "action": "index_artifacts",
        "artifacts": [
          {
            "type": "json",
            "category": "proof",
            "label": "Flip: controller result, positions and captured analytics events",
            "proofTarget": "AC-1"
          },
          {
            "type": "log",
            "category": "proof",
            "label": "Flip: controller debug log",
            "proofTarget": "AC-1"
          }
        ],
        "intent": "Keep the flip record and controller log in the run package",
        "next": "ac1-flip-order-type"
      },
      "ac1-flip-order-type": {
        "action": "assert_json",
        "assert": {
          "all": [
            {
              "path": "$.runTag",
              "operator": "eq",
              "value": "{{params.run_tag}}"
            },
            {
              "path": "$.phase",
              "operator": "eq",
              "value": "flip"
            },
            {
              "path": "$.market",
              "operator": "eq",
              "value": "{{params.market}}"
            },
            {
              "path": "$.error",
              "operator": "falsy"
            },
            {
              "path": "$.positionBefore.side",
              "operator": "eq",
              "value": "long"
            },
            {
              "path": "$.result.success",
              "operator": "eq",
              "value": true
            },
            {
              "path": "$.closeEvents",
              "operator": "length_eq",
              "value": 0
            },
            {
              "path": "$.tradeStatuses",
              "operator": "deep_eq",
              "value": [
                "submitted",
                "executed"
              ]
            },
            {
              "path": "$.tradeOrderTypes",
              "operator": "deep_eq",
              "value": [
                "market",
                "market"
              ]
            },
            {
              "path": "$.positionAfter.side",
              "operator": "eq",
              "value": "short"
            }
          ]
        },
        "intent": "A flip reports its trade events with order_type market and emits no close event without it",
        "proves": [
          "AC-1"
        ],
        "next": "ac1-close-all-drive"
      },
      "ac1-close-all-drive": {
        "action": "command",
        "timeout_ms": 180000,
        "intent": "Close all through the controller public API, recording its analytics events",
        "next": "ac1-close-all-evidence"
      },
      "ac1-close-all-evidence": {
        "action": "index_artifacts",
        "artifacts": [
          {
            "type": "json",
            "category": "proof",
            "label": "Close all: controller result, positions and captured analytics events",
            "proofTarget": "AC-1"
          },
          {
            "type": "log",
            "category": "proof",
            "label": "Close all: controller debug log",
            "proofTarget": "AC-1"
          }
        ],
        "intent": "Keep the close all record and controller log in the run package",
        "next": "ac1-close-all-order-type"
      },
      "ac1-close-all-order-type": {
        "action": "assert_json",
        "assert": {
          "all": [
            {
              "path": "$.runTag",
              "operator": "eq",
              "value": "{{params.run_tag}}"
            },
            {
              "path": "$.phase",
              "operator": "eq",
              "value": "close-all"
            },
            {
              "path": "$.market",
              "operator": "eq",
              "value": "{{params.market}}"
            },
            {
              "path": "$.error",
              "operator": "falsy"
            },
            {
              "path": "$.positionBefore.side",
              "operator": "eq",
              "value": "short"
            },
            {
              "path": "$.request.symbols",
              "operator": "deep_eq",
              "value": [
                "{{params.market}}"
              ]
            },
            {
              "path": "$.result.success",
              "operator": "eq",
              "value": true
            },
            {
              "path": "$.result.successCount",
              "operator": "eq",
              "value": 1
            },
            {
              "path": "$.closeBulkActionIds.0",
              "operator": "not_null"
            },
            {
              "path": "$.closeStatuses",
              "operator": "deep_eq",
              "value": [
                "executed"
              ]
            },
            {
              "path": "$.closeOrderTypes",
              "operator": "deep_eq",
              "value": [
                "market"
              ]
            },
            {
              "path": "$.positionAfter",
              "operator": "falsy"
            }
          ]
        },
        "intent": "The close-all summary event carries order_type market",
        "proves": [
          "AC-1"
        ],
        "next": "done"
      },
      "done": {
        "action": "end",
        "status": "pass"
      },
      "teardown-clean-market": {
        "action": "call",
        "ref": "perps.clean-market-testnet",
        "params": {
          "account": "{{params.account}}",
          "market": "{{params.market}}",
          "exclusive_testnet_market": "{{params.exclusive_testnet_market}}"
        },
        "intent": "Leave the task-owned testnet market flat with no open orders",
        "next": "teardown-done"
      },
      "teardown-done": {
        "action": "end",
        "status": "pass"
      }
    }
  }
}

Validation Logs

Run: f6a420f0-7153-4fb4-99b2-6eeaf1e04b56

Runner: @metamask/recipe-runner

Runner revision: unknown

Recipe digest: sha256:fce1f8d2462f33723f63e80e2b71f39d6215b61dcbbd155c4424abb839b2b12f

Full output (31/31 passed, pass)
# MetaMask Recipe Run

Status: pass
Duration: 121s
Nodes: 31/31 passed

## Steps

- PASS setup-clean-market/clean-market (metamask.perps.start_state, 7.2s): network=testnet, proof=perps-controller-start_state
- PASS setup-clean-market/assert-no-positions (metamask.perps.assert_positions, 4.5s): network=testnet, account=0x8Dc6...9003, matching=0, proof=perps-controller-getPositions
- PASS setup-clean-market/assert-no-orders (metamask.perps.assert_orders, 7.1s): network=testnet, account=0x8Dc6...9003, matching=0, proof=perps-controller-getOpenOrders
- PASS setup-clean-market/done (end, 0ms)
- PASS setup-clean-market (call, 19s): ref=perps.clean-market-testnet, status=pass
- PASS setup-open-for-tpsl (metamask.perps.place_order, 14s): network=testnet, account=0x8Dc6...9003, matching=1, proof=perps-controller-placeOrder

- PASS ac1-tpsl-evidence (index_artifacts, 19ms)

- PASS ac1-close-market-evidence (index_artifacts, 163ms)
- PASS setup-open-for-limit (metamask.perps.place_order, 11s): network=testnet, account=0x8Dc6...9003, matching=1, proof=perps-controller-placeOrder

- PASS ac1-close-limit-evidence (index_artifacts, 117ms)
- PASS setup-open-for-flip (metamask.perps.place_order, 15s): network=testnet, account=0x8Dc6...9003, matching=1, proof=perps-controller-placeOrder

- PASS ac1-flip-evidence (index_artifacts, 14ms)

- PASS ac1-close-all-evidence (index_artifacts, 10ms)
- PASS done (end, 0ms)
- PASS teardown-clean-market/clean-market (metamask.perps.start_state, 7.0s): network=testnet, proof=perps-controller-start_state
- PASS teardown-clean-market/assert-no-positions (metamask.perps.assert_positions, 9.4s): network=testnet, account=0x8Dc6...9003, matching=0, proof=perps-controller-getPositions
- PASS teardown-clean-market/assert-no-orders (metamask.perps.assert_orders, 6.2s): network=testnet, account=0x8Dc6...9003, matching=0, proof=perps-controller-getOpenOrders
- PASS teardown-clean-market/done (end, 0ms)
- PASS teardown-clean-market (call, 23s): ref=perps.clean-market-testnet, status=pass
- PASS teardown-done (end, 0ms)

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them
Full evidence gallery and publication receipt

Publication approval

farm-automation · service · farm-automation · 2026-10-23T07:11:32.670Z
Package: 72087ec4d6325418ad8bbbd8f21c7b5969db49bac009499fa16a4e6877f36a57. Visual receipts: none.


Note

Low Risk
Analytics-only payload change in TradingService.closePositions with no API or trading behavior changes.

Overview
Fixes Perp Position Close Transaction analytics for close-all / batch closes by setting order_type: 'market' on the summary event TradingService.closePositions emits from its finally block.

On Hyperliquid’s batch path that summary was often the only close event, so Mixpanel showed an unset order_type even though batch closes always submit market orders (provider batch or per-position fallback). The property is included on success and failure. Unit tests cover provider success, thrown errors, and the fallback path.

Reviewed by Cursor Bugbot for commit 4ab4f09. Bugbot is set up for automated code reviews on this repo. Configure here.

@abretonc7s abretonc7s changed the title chore: prepare farmslot publication pkg-f6073ce8-mvkmrefb feat(perps): every close position analytics event carries order_type (market or limit) Oct 23, 2026
@abretonc7s
abretonc7s marked this pull request as ready for review October 23, 2026 07:12
@abretonc7s
abretonc7s requested review from a team as code owners October 23, 2026 07:12
The Perp Position Close Transaction summary event emitted by
closePositions had no order_type, so close-all events reached Mixpanel
as "not set". A batch close always submits market orders, on both the
provider batch path and the per-position fallback, so tag the summary
as market.

Refs: TAT-4200
@abretonc7s
abretonc7s force-pushed the TAT-4200-feat-every-close-position-analytics branch from 6225cc5 to 4ab4f09 Compare October 23, 2026 07:40
@abretonc7s
abretonc7s enabled auto-merge October 23, 2026 08:15
@abretonc7s
abretonc7s added this pull request to the merge queue Oct 23, 2026
Merged via the queue into main with commit fd2dded Oct 23, 2026
50 checks passed
@abretonc7s
abretonc7s deleted the TAT-4200-feat-every-close-position-analytics branch October 23, 2026 08:38
@abretonc7s abretonc7s mentioned this pull request Oct 23, 2026
1 of 4 tasks
SnowingFox pushed a commit to SnowingFox/core-1 that referenced this pull request Oct 24, 2026
## Explanation

Major release of `@metamask/perps-controller` (`21.0.0` → `22.0.0`).

- **Breaking:** testnet deposit and withdrawal routes use Arbitrum
Sepolia USDC2 (`0x1baAbB04529D43a73232B713C0FE471f7c7334d5`).
`USDC_ARBITRUM_TESTNET_ADDRESS` and
`HYPERLIQUID_ASSET_CONFIGS.usdc.testnet` change to that address, and
`withdraw` rejects the previous testnet asset ID.
`depositWithConfirmation` prepares an Arbitrum Sepolia transfer to the
Hyperliquid testnet bridge.
([MetaMask#10991](MetaMask#10991))
- `TrackingData`, `TPSLTrackingData`, and `WithdrawParams` accept an
optional `environmentType`. Events that already copy attribution include
`environment_type` when it is set.
([MetaMask#10899](MetaMask#10899))
- New export `@metamask/perps-controller/providers/lighter`, plus
optional `LighterCredentials.loadProvider`, so a web client can bundle
Lighter itself. `switchProvider('lighter')` reports why the provider
failed to load. A missing Lighter module is debug-logged instead of sent
through `logger.error`.
([MetaMask#10996](MetaMask#10996))
- The `closePositions` summary event includes `order_type: 'market'`.
([MetaMask#11027](MetaMask#11027))
- Engines allow Node.js 26.
([MetaMask#10981](MetaMask#10981))

## References

- [MetaMask#10991](MetaMask#10991)
- [MetaMask#10899](MetaMask#10899)
- [MetaMask#10996](MetaMask#10996)
- [MetaMask#11027](MetaMask#11027)
- [MetaMask#10981](MetaMask#10981)

## Checklist

- [ ] I've updated the test suite for new or updated code as appropriate
- [ ] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] I've communicated my changes to consumers by [updating changelogs
for packages I've
changed](https://github.com/MetaMask/core/tree/main/docs/processes/updating-changelogs.md)
- [ ] I've introduced [breaking
changes](https://github.com/MetaMask/core/tree/main/docs/processes/breaking-changes.md)
in this PR and have prepared draft pull requests for clients and
consumer packages to resolve them

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Major perps-controller release with breaking testnet token/bridge
behavior; this PR only bumps versions but consumers picking up 22.0.0
inherit that risk.
> 
> **Overview**
> **Monorepo release 1359.0.0** that publishes
**`@metamask/perps-controller` 22.0.0** and bumps
**`@metamask/transaction-pay-middleware`** to depend on `^22.0.0` (plus
`yarn.lock` and root package version).
> 
> The diff is mostly versioning and changelog housekeeping; the shipped
**22.0.0** behavior (already merged) includes a **breaking testnet USDC2
/ Arbitrum Sepolia deposit path** change, optional **`environmentType`**
on perps tracking/withdraw params, **Lighter** `loadProvider` + public
provider export, **`closePositions`** analytics `order_type: 'market'`,
and **Node.js 26** engine support.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
8356d7d. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants