jingswap-v2
Jingswap V2 limit-price auction — sbtc-stx markets with mandatory limit prices, 2-phase (no buffer), bundled close+settle. Markets: sbtc-stx-market (0% premium) and sbtc-stx-20bp-stx-premium (0.20% STX bonus).
What this skill does
# Jingswap V2 Skill Limit-price auction for swapping sBTC against STX on Stacks. Two markets: | Market | Contract | Premium | |--------|----------|---------| | `sbtc-stx-market` (default) | `SPV9K21TBFAK4KNRJXF5DFP8N7W46G4V9RCJDC22.sbtc-stx-0-jing-v2` | 0% (oracle price) | | `sbtc-stx-20bp-stx-premium` | `SPV9K21TBFAK4KNRJXF5DFP8N7W46G4V9RCJDC22.sbtc-stx-20-jing-v2` | 0.20% STX bonus | ## Key Differences from V1 - **Limit prices required** on all deposits (in sats/STX) - **2 phases only**: deposit (10 blocks ~20s) then settle (no buffer) - **Bundled settlement**: `close-and-settle` in a single atomic tx (reverts entirely if fails) - **No separate close-deposits** — avoids stuck cycles - **Limit updates** without re-depositing via `set-stx-limit` / `set-sbtc-limit` ## Usage ``` bun run jingswap-v2/jingswap-v2.ts <subcommand> [--market <pair>] [options] ``` Default market is `sbtc-stx-market`. All limit prices are in **sats/STX**. ## Subcommands ### cycle-state Get current V2 cycle state (phase, blocks, totals). ``` bun run jingswap-v2/jingswap-v2.ts cycle-state --market sbtc-stx-20bp-stx-premium ``` ### user-deposit Get deposit amounts and limit prices for a user. ``` bun run jingswap-v2/jingswap-v2.ts user-deposit --cycle 0 --address SP... ``` ### clearing-preview Simulate settlement at current oracle — shows what will clear vs roll. ``` bun run jingswap-v2/jingswap-v2.ts clearing-preview ``` ### prices Get oracle prices with default limit suggestions. ``` bun run jingswap-v2/jingswap-v2.ts prices ``` ### deposit-stx Deposit STX with limit price (sats/STX floor). Omit `--limit` for 20% in-the-money default. ``` bun run jingswap-v2/jingswap-v2.ts deposit-stx --amount 10 --limit 240 ``` ### deposit-sbtc Deposit sBTC (satoshis) with limit price (sats/STX ceiling). Omit `--limit` for 20% in-the-money default. ``` bun run jingswap-v2/jingswap-v2.ts deposit-sbtc --amount 10000 --limit 360 ``` ### set-stx-limit Update STX-side limit price without re-depositing. Deposit phase only. ``` bun run jingswap-v2/jingswap-v2.ts set-stx-limit --limit 250 ``` ### set-sbtc-limit Update sBTC-side limit price without re-depositing. Deposit phase only. ``` bun run jingswap-v2/jingswap-v2.ts set-sbtc-limit --limit 350 ``` ### cancel-stx Cancel STX deposit for full refund. Deposit phase only. ``` bun run jingswap-v2/jingswap-v2.ts cancel-stx ``` ### cancel-sbtc Cancel sBTC deposit for full refund. Deposit phase only. ``` bun run jingswap-v2/jingswap-v2.ts cancel-sbtc ``` ### close-and-settle Close deposits and settle atomically with fresh Pyth prices. Single tx, reverts entirely if settlement fails. ``` bun run jingswap-v2/jingswap-v2.ts close-and-settle --market sbtc-stx-20bp-stx-premium ``` ### cancel-cycle Cancel cycle if settlement failed. Callable 42 blocks (~84s) after close. Rolls all deposits forward. ``` bun run jingswap-v2/jingswap-v2.ts cancel-cycle ``` ## Notes - Limit prices in sats/STX: STX depositors set a floor (min sats/STX they'll accept), sBTC depositors set a ceiling (max sats/STX they'll pay) - Default limits are 20% in-the-money vs oracle (virtually guaranteed fill) - Stacks blocks average ~2 seconds (Nakamoto) - Deposit phase: 10 blocks (~20s) before close-and-settle is callable - Cancel threshold: 42 blocks (~84s) after close - If limits wipe a side below minimum, bundled tx reverts — no stuck cycle - Post conditions: deposits use Deny mode; cancel/settle/cancel-cycle use Allow mode
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.