sodax-dapp-kit-money-market

Installation
SKILL.md

Money Market (dapp-kit granular skill)

Granular skill for the lending/borrowing hooks of @sodax/dapp-kit v2. queryKey/mutationKey first segment: mm. React-only — backend uses @sodax/sdk directly.

Step 1 — Clarify with user before coding

  1. New code or v1 → v2 port?
  2. Which action? useSupply, useBorrow, useWithdraw, useRepay, or read-only (reserves / user position).
  3. Same-chain or cross-chain delivery? All four actions accept optional dstChainKey/dstAddress (omit for same-chain; don't pass dstChainKey === srcChainKey).
  4. Need allowance gating? supply/repay need approval (useMMAllowance + useMMApprove); borrow/withdraw never need ERC-20 approval (useMMAllowance is enabled: false for those → data stays undefined).
  5. Need position reads? Reserve data (useReservesHumanized etc.) and user position (useUserFormattedSummary, useUserReservesData) — read hooks key on spokeChainKey, not srcChainKey.

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/money-market.md — full hook surface, mutation TVars ({ params: MoneyMarketSupplyParams<K>, walletProvider }), reserve/position read shapes, the spokeChainKey vs srcChainKey split.
  4. ../integration/knowledge/recipes/money-market.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-money-market — icon-project/sodax-sdks