Skip to content

Conversation

@matallui
Copy link
Contributor

@matallui matallui commented Nov 20, 2025

Description

Bump slippage for Sell orders to 3% (from 1.5%). This will help reducing the failure rate.

Changelog

CHANGELOG entry: null

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/PRED-327

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Increase sell-order slippage to 3% and introduce separate buy/sell slippage constants, applying them in order previews.

  • Polymarket provider:
    • Slippage constants: Replace SLIPPAGE with SLIPPAGE_BUY (1.5%) and SLIPPAGE_SELL (3%) in app/components/UI/Predict/providers/polymarket/constants.ts.
    • Order preview: In app/components/UI/Predict/providers/polymarket/utils.ts, use SLIPPAGE_BUY for buy previews and SLIPPAGE_SELL for sell previews; update imports accordingly.

Written by Cursor Bugbot for commit 582821f. This will update automatically on new commits. Configure here.

@github-actions
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot metamaskbot added the team-predict Predict team label Nov 20, 2025
@matallui matallui added the skip-sonar-cloud Only used for bypassing sonar cloud when failures are not relevant to the changes. label Nov 20, 2025
@github-actions
Copy link
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokePredictions
  • Risk Level: medium
  • AI Confidence: 90%
click to see 🤖 AI reasoning details

The changes modify slippage constants for Polymarket prediction trading, specifically splitting SLIPPAGE into SLIPPAGE_BUY (1.5%, unchanged) and SLIPPAGE_SELL (3%, doubled from previous 1.5%).

Impact Analysis:

  1. Files changed: Only polymarket provider constants and utils
  2. Functionality affected: previewOrder function in utils.ts, which is used when users buy or sell prediction positions
  3. Business logic change: Sell orders now have higher slippage tolerance (3% vs 1.5%), affecting order execution behavior
  4. E2E coverage: SmokePredictions tag includes tests like predict-cash-out.spec.ts that cover the cash out flow (selling positions)

Why SmokePredictions:

  • The changes are entirely isolated to the Predict/Polymarket feature
  • Existing E2E tests with SmokePredictions tag cover the affected flows (viewing markets, cashing out positions, claiming, withdrawing)
  • The predict-cash-out test specifically exercises the sell flow that uses SLIPPAGE_SELL

Risk Assessment:

  • Medium risk because this is a business logic change affecting actual trading behavior
  • The increased slippage for sell orders could impact user experience and trade outcomes
  • However, changes are isolated to a specific feature with no cross-cutting concerns
  • No changes to core wallet, controllers (except PredictController which is feature-specific), or critical infrastructure

Confidence: 90% - High confidence because:

  • Clear isolation to prediction market feature
  • Direct mapping to existing SmokePredictions E2E tests
  • Used tools to verify related files and test coverage
  • No other features are impacted by these constants

View GitHub Actions results

@matallui matallui changed the title chore(predict): bump sell slippage to 3% chore(predict): cp-7.60.0 bump sell slippage to 3% Nov 20, 2025
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
D Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@matallui matallui enabled auto-merge November 21, 2025 00:27
@matallui matallui added this pull request to the merge queue Nov 21, 2025
Merged via the queue into main with commit ad906ab Nov 21, 2025
92 of 93 checks passed
@matallui matallui deleted the predict/bump-sell-slippage branch November 21, 2025 01:11
@github-actions github-actions bot locked and limited conversation to collaborators Nov 21, 2025
@metamaskbot metamaskbot added the release-7.61.0 Issue or pull request that will be included in release 7.61.0 label Nov 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.61.0 Issue or pull request that will be included in release 7.61.0 size-XS skip-sonar-cloud Only used for bypassing sonar cloud when failures are not relevant to the changes. team-predict Predict team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants