lensQuoter), which picks the best DEX (Uniswap V3/V4 or Swapr) and returns calldata for that DEX’s own router. Swaps execute against the official DEX routers — Lens is not an AMM or a swap router.
Use @seer-pm/sdk to get quotes and build swap flows. The SDK handles routing, amounts, and slippage for all supported chains (Gnosis, Ethereum, Base, Optimism).
Main collateral by chain
Each market’s pool is outcome token / that market’s collateral (market.collateralToken). On Gnosis, multiple primaries are registered (sDAI, s-gCRC); call configureCollateral for the profile your site uses, then use getActivePrimaryCollateral for quotes and swaps.
See Collateral profiles for the full registry and white-label configuration.
Getting quotes with @seer-pm/sdk
Chain coverage:- AMM via Lens smart quoter on Gnosis, Ethereum, Base, Optimism:
fetchAmmQuotewithTradeType(exact-in / exact-out). Requires a viemPublicClient.
QuoteTradeResult — value (bigint), decimals, buyToken, sellToken, sellAmount, swapType, and trade (AmmTrade).
Token and collateral
Quote: exact input (e.g. “I spend 10 collateral → how many outcome tokens?”)
Quote: exact output (e.g. “I want exactly N outcome tokens → how much collateral?”)
Using TradeType for exact-in vs exact-out
Executing the swap
The SDK provides execution functions that take atrade (from a quote) and send the transaction. You need wagmi (config, getConnectorClient) and optionally a toast/notification layer for UX.
Execute any trade (AMM via Lens)
UsetradeTokens to execute an AMM trade (including complete-set / PSM3 composite routes when present on the props):
toastifyTx in your app to show “Executing…” and “Done!” notifications.