intents-erc7683listed
Install: claude install-skill iktok90-design/ai-smart-contract-auditor
# Intent-based / ERC-7683 detection
## When this applies
- ERC-7683 cross-chain intents
- UniswapX (reactor + filler model)
- CoW Protocol (batch auctions)
- 1inch Fusion / Fusion+
- Across (origin lock + destination fill)
- Any "user signs intent, solver fills" pattern
## Detection patterns
### Surplus theft (HIGH)
Intent specifies `amountOutMin` (user's floor). Solver delivers exactly the min, pockets actual market surplus. UX issue but real for intents with tight min — solver fills inferior route.
Defense: surplus distribution to user (CoW does this).
### Cross-chain replay (HIGH)
ERC-7683 intent payload signable for one (origin, destination) pair must include both chainIds. Otherwise replay on another destination.
### Solver front-run (HIGH)
Solver A's fill is in mempool; Solver B copies and submits with higher gas → A's tx reverts. Mitigations: private mempools, MEV-Share, exclusivity windows.
### Intent expiration not enforced atomically (HIGH)
`require(block.timestamp <= deadline)` at settlement. If deadline is checked at the wrong step (e.g. at origin lock but not destination fill), funds can be stuck.
### Origin lock + destination fill atomicity (CRITICAL)
- User locks funds on origin chain.
- Solver fills on destination chain.
- Solver claims locked funds on origin (via cross-chain proof).
- If destination fill fails after origin lock: refund mechanism required.
- If origin lock fails after destination fill: solver loses; bond required.
### Reactor callback