sodax-dapp-kit-dex

Installation
SKILL.md

DEX (dapp-kit granular skill)

Granular skill for the concentrated-liquidity DEX hooks of @sodax/dapp-kit v2. queryKey/mutationKey first segment: dex. Two-step flow: useDexDeposit (spoke asset → hub ERC-4626 pool shares) then useSupplyLiquidity (shares → position). React-only — backend uses @sodax/sdk directly.

Step 1 — Clarify with user before coding

  1. New code or v1 → v2 port?
  2. Which operation? Asset deposit/withdraw (useDexDeposit/useDexWithdraw), supply liquidity (useSupplyLiquidity — mint-new OR increase-existing), decrease (useDecreaseLiquidity), claim fees (useClaimRewards).
  3. Does opening a position require a deposit first? Yes — positions hold hub pool shares; deposit from a spoke before supplying liquidity. UI flows usually combine the two steps.
  4. Using the param builders? useCreate*Params compute derived params (tick range, ERC-4626 conversions) client-side; spread their result into mutate({ params: { ...result, srcChainKey, srcAddress }, walletProvider }).

Integration workflow (new v2 code)

  1. ../integration/knowledge/ai-rules.md — DO / DO NOT (read first).
  2. ../integration/knowledge/architecture.md — hook shapes, mutateAsyncSafe, unwrapResult, queryKey conventions.
  3. ../integration/knowledge/features/dex.md — full hook surface, SDK param types, the FLAT-props param builders, position-lifecycle notes.
  4. ../integration/knowledge/recipes/dex.md — full worked examples.
  5. Call-shape choice → ../integration/knowledge/recipes/mutation-error-handling.md.
Installs
1
First Seen
Jun 10, 2026
sodax-dapp-kit-dex — icon-project/sodax-sdks