Skip to content

[Smart Contract] Dynamic slippage protection on token swaps and property payments #695

Description

@nanaf6203-bit

Problem Statement

For token swaps (property payments via ERC-20), there's no slippage guard. Sandwich attacks during volatile windows can extract value silently.

Acceptance Criteria

  • A <SlippageControl> UI component with 0.1/0.5/1.0% presets and a custom input
  • Slippage value stored in zustand cartStore.SLIPPAGE_TOLERANCE
  • Default slippage computed from 24h price volatility
  • EIP-712 typed-data receipt includes the slippage intent

Implementation Notes

For property purchases against a stable-price escrow, slippage can default to 0% — overlay SlippageControl only renders for volatile tokens.

Files Likely Affected

  • src/components/SlippageControl.tsx (new)
  • src/store/cartStore.ts
  • src/lib/batchTransaction.ts

Difficulty / Effort

  • Difficulty: Hard
  • Effort: T-Shirt M

Labels

web3, priority:high, area:smart-contract, area:security

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions