Protocol
RFQ for size
The AMM caps each trade at maxTradeUsdE6 and widens with inventory skew because it cannot see Hyperliquid depth. For larger sizes the pool accepts signed quotes through TangentRFQ:
- The hedger exposes
POST /rfq/quote { tokenIn, tokenOut, amountIn, taker? }. It walks the Hyperliquidl2Bookfor the hedge size to get VWAP slippage in bps and pricesspreadBps = clamp(max(minRfqSpreadBps, baseSpreadBps/2 + slippageBps + buffer), minRfqSpreadBps, maxSpreadBps)at the current posted mid, with the same rounding as the contract. The quote expires after ~30 s and carries a random 256-bit nonce. - It signs an EIP-712
Quote { taker, tokenIn, tokenOut, amountIn, amountOut, spreadBps, expiry, nonce }(domain"Tangent RFQ", version"1") with the key set asTangentRFQ.quoter. - The taker approves
tokenInto TangentRFQ (not the pool) and callsfill(quote, signature). The contract checks expiry (QuoteExpired), taker (WrongTaker), nonce (NonceUsed) and signer (BadSigner), pullsamountInand callspool.swapRFQ. swapRFQapplies no skew but enforcesminRfqSpreadBps ≤ spreadBps ≤ maxSpreadBps,tradeUsd ≤ rfqMaxTradeUsdE6(default $50,000), the inventory cap and the reduce-only rule, and bounds the price at the current oracle mid:fairOut × (1 − maxSpread) ≤ amountOut ≤ fairOut, otherwiseRfqPriceOutOfBounds. The taker can never receive more than the stated spread implies.
The web app proxies the quoter at POST /api/rfq/quote and reports its configuration at GET /api/rfq/info. On the Trade page the AMM | RFQ toggle switches to RFQ automatically when the AMM reverts TradeTooLarge; the firm output, spread, book slippage and a countdown to expiry are shown and a fresh quote is requested when fewer than 5 s remain. When TangentRFQ is not deployed on the configured chain the toggle is disabled.