sodax-dapp-kit-staking
Installation
SKILL.md
Staking (dapp-kit granular skill)
Granular skill for the staking hooks of @sodax/dapp-kit v2. queryKey/mutationKey first segment: staking. React-only — backend uses @sodax/sdk directly.
Step 1 — Clarify with user before coding
- New code or v1 → v2 port?
- Which action?
useStake,useUnstake(waiting period),useInstantUnstake(slippage, no wait),useClaim,useCancelUnstake. - Allowance gating?
stakeapproves SODA,unstake/instantUnstakeapprove xSODA — each has its OWN approve + allowance hook pair.claim/cancelUnstakeneed no approval. - Need reads?
useStakingInfo(position),useUnstakingInfoWithPenalty(pending requests + penalty),useStakingConfig(protocol params),useStakeRatio/useInstantUnstakeRatio(previews).
Integration workflow (new v2 code)
../integration/knowledge/ai-rules.md— DO / DO NOT (read first).../integration/knowledge/architecture.md— hook shapes,mutateAsyncSafe,unwrapResult, queryKey conventions.../integration/knowledge/features/staking.md— full hook surface, mutation TVars per action, the three approve/allowance pairs, read shapes.../integration/knowledge/recipes/staking.md— full worked examples.- Call-shape choice →
../integration/knowledge/recipes/mutation-error-handling.md.