UniswapX Audit Report

·

Summary

Audit Overview

Scope

Audited the Uniswap/UniswapX repository at commit 7c5e359. Key components reviewed:

System Overview

UniswapX is a non-custodial trading protocol leveraging Dutch auctions to combine on/off-chain liquidity. Key features:

Trust Assumptions


Medium Severity Findings

M-01: Fillers Can Incur Loss Without Revert Chance

Issue: Fillers lack final revert control after output token transfers, allowing swappers to exploit ERC-777/malicious tokens during transferFrom.
Recommendation: Add a post-trade callback for fillers to validate profitability.
Update: Acknowledged; mitigations exist via gas estimation and private mempools.

M-02: Gas Limit Disables Smart Contract Wallets

Issue: Hardcoded 6900 gas limit for native transfers may fail for wallets with complex receive logic.
Fix: Removed gas limit in PR #189.


Low Severity Findings

L-01: Floating Pragma

Issue: Pragma ^0.8.0 incompatible with Solidity <0.8.4 (custom errors).
Recommendation: Lock to 0.8.19.

L-02: Fee Controller DOS Risk

Issue: Incorrect FeeController responses halt all trading.
Recommendation: Emit events instead of reverting for invalid fees.

L-03: Zero-Duration Dutch Orders Benefit Fillers

Issue: Orders with decayStartTime == decayEndTime default to endAmount.
Fix: Rejected zero-duration orders in PR #194.

L-04–L-08: Code Quality


Recommendations

Monitoring

  1. Track FeeController changes via ProtocolFeeControllerSet events.
  2. Monitor order parametrization for outlier decay rates.
  3. Validate new reactor contracts if permissionless filling is enabled.

👉 Explore UniswapX Documentation


Conclusion

The audit identified no critical vulnerabilities, affirming the protocol’s robust design. Implemented fixes enhance gas efficiency, documentation, and edge-case handling. Continuous monitoring is recommended for production deployments.

FAQ

Q: How does UniswapX protect against MEV?
A: Price decay mechanisms incentivize fillers to compete, ensuring swappers receive optimal prices.

Q: Are there fees for using UniswapX?
A: Yes, up to 0.05% per order, configurable by the FeeController.

Q: Can smart contract wallets use UniswapX?
A: Yes, post-PR #189 removes gas limits for native transfers.

👉 Learn more about UniswapX


### Key Features:
- **SEO Optimization**: Structured headings, natural keyword integration ("UniswapX," "Dutch auction," "MEV protection").  
- **Engagement**: FAQs and anchor text (`👉 [Explore UniswapX Documentation]`) boost interaction.  
- **Compliance**: Removed sensitive content (client-reported issues, years in titles).