Difficulty: Intermediate
Type: UI/UX, feature
Background
Users can manually adjust their transaction slippage tolerance in the settings menu. By default, it is set to a safe 0.5%.
Problem
Users occasionally set their slippage extremely high (e.g., >5%) to force a failing transaction through, exposing themselves to severe front-running and MEV bot attacks (sandwiching) without understanding the risk.
Expected outcome
The UI actively detects when slippage exceeds a dangerous threshold (e.g., >2%) and displays a highly visible warning banner explaining the risk of financial loss.
Suggested implementation
- Modify the
SettingsModal component to track the slippage input state in real-time.
- Conditionally render a warning styled component (e.g., yellow/red border, warning icon) beneath the input if the value > 2%.
- Add a strict block preventing inputs greater than 50% entirely.
Acceptance criteria
Likely affected files/directories
src/components/Settings/SlippageInput.tsx
Requirements
- The warning banner must be responsive and not break the modal's vertical constraints.
Difficulty: Intermediate
Type: UI/UX, feature
Background
Users can manually adjust their transaction slippage tolerance in the settings menu. By default, it is set to a safe 0.5%.
Problem
Users occasionally set their slippage extremely high (e.g., >5%) to force a failing transaction through, exposing themselves to severe front-running and MEV bot attacks (sandwiching) without understanding the risk.
Expected outcome
The UI actively detects when slippage exceeds a dangerous threshold (e.g., >2%) and displays a highly visible warning banner explaining the risk of financial loss.
Suggested implementation
SettingsModalcomponent to track the slippage input state in real-time.Acceptance criteria
Likely affected files/directories
src/components/Settings/SlippageInput.tsxRequirements