How Does Frax Swap Work?
Frax Swap is a DEX within the Frax Finance ecosystem, notable for being the first live implementation of a TWAMM (Time-Weighted Average Market Maker) that allows large trades to execute gradually over many blocks to minimize price impact. Built on Uniswap V2 core code and deployed on Ethereum, Fraxtal, and Binance, it serves both as a general-purpose DEX and a key infrastructure component for Frax protocol operations. The B+ risk grade reflects strong documentation and the backing of the established Frax ecosystem, balanced against the novelty risk of TWAMM mechanics.
TVL
$14M
Sector
DEX
Risk Grade
B
Value Grade
C-
Core Mechanisms
4.1.1
Constant product AMM (xy=k) based on Uniswap V2 core, supporting permissionless pair creation and instant swaps
Standard Uniswap V2 AMM foundation
4.2.3
NovelEmbedded TWAMM allowing long-term orders executed over many blocks — first live implementation of Paradigm's TWAMM concept with gas-efficient approximation
Novel TWAMM mechanism — first live implementation, uses approximation of Paradigm's original formula
2.1.2
Standard percentage-based swap fees on trades, consistent with Uniswap V2 fee model
0.3% swap fee standard
2.2.4
Fee revenue split between LPs and protocol (part of broader Frax ecosystem fee structure)
Standard fee split
5.1.3
Governed by veFXS (now veFRAX) vote-escrow governance as part of the broader Frax Finance ecosystem
Curve-style vote-escrow governance
8.2.2
Deployed on Ethereum, Fraxtal, and Binance — multi-chain native deployments
Multi-chain deployment within Frax ecosystem
How the Pieces Interact
Long-term TWAMM orders execute against the embedded AMM — if someone places a large TWAMM order, arbitrageurs front-run each virtual sub-order against the AMM, extracting value from the long-term trader
TWAMM orders on one chain are visible and create predictable price impact — cross-chain arbitrageurs can exploit the known order flow
veFRAX holders can direct protocol parameters including fee structures — governance may prioritize Frax ecosystem operations over LP returns
With only $14M TVL, AMM pool depth is thin — large instant swaps or TWAMM orders create significant price impact
TWAMM gas-efficient approximation introduces rounding in order execution — accumulated rounding errors over long durations could benefit or harm long-term traders unpredictably
What Could Go Wrong
- TWAMM (Time-Weighted Average Market Maker) is a novel mechanism — the first live implementation, meaning potential undiscovered edge cases in long-duration order execution
- Deep integration with broader Frax ecosystem (FRAX stablecoin, Fraxtal chain, frxETH) creates single-ecosystem concentration risk
- Relatively low TVL of $14M suggests limited standalone traction compared to major DEXs, with most utility derived from serving Frax protocol operations
TWAMM Order Exploitation
TailTrigger: Attacker discovers exploit in TWAMM approximation formula or order execution logic that allows draining LP funds
- 1.Vulnerability in TWAMM approximation formula discovered by attacker — Attacker places specially crafted long-term orders that exploit rounding or execution edge cases
- 2.LP funds extracted through manipulated TWAMM execution — AMM pool balances become skewed, LPs suffer losses
- 3.All TWAMM orders become suspect — protocol halts or users cancel pending orders — TWAMM functionality disabled, protocol loses its primary differentiator
- 4.Confidence in Frax ecosystem products affected — FRAX stablecoin and related products face increased scrutiny
Risk Profile at a Glance
Overall: B (27/100)
Lower score = safer