jingswap
Jingswap blind batch auction — supports sbtc-stx and sbtc-usdcx markets. Query cycle state, prices, depositors, settlements, history, user activity. Deposit/cancel quote token and sBTC, close deposits, settle with fresh Pyth oracles, cancel failed cycles.
What this skill does
# Jingswap Skill Blind batch auction for swapping sBTC against a quote token on Stacks. Two markets are available: | Market | Contract | Quote Token | |--------|----------|-------------| | `sbtc-stx` (default) | `SPV9K21TBFAK4KNRJXF5DFP8N7W46G4V9RCJDC22.sbtc-stx-jing` | STX | | `sbtc-usdcx` | `SPV9K21TBFAK4KNRJXF5DFP8N7W46G4V9RCJDC22.sbtc-usdcx-jing` | USDCx | Each auction cycle has three phases: deposit, buffer, settle. Anyone can participate by depositing on either side, and anyone can trigger close/settle/cancel transitions. ## Usage ``` bun run jingswap/jingswap.ts <subcommand> [--market <pair>] [options] ``` All commands accept `--market sbtc-stx` (default) or `--market sbtc-usdcx`. ## Subcommands ### cycle-state Get current auction cycle state (phase, blocks elapsed, totals, minimums). ``` bun run jingswap/jingswap.ts cycle-state --market sbtc-usdcx ``` ### depositors Get quote-token and sBTC depositors for a cycle. ``` bun run jingswap/jingswap.ts depositors --cycle <number> --market sbtc-stx ``` ### user-deposit Get a user's deposit amounts for a cycle. ``` bun run jingswap/jingswap.ts user-deposit --cycle <number> --address <stx_address> ``` ### settlement Get settlement details for a completed cycle. ``` bun run jingswap/jingswap.ts settlement --cycle <number> ``` ### cycles-history Get full history of all auction cycles. ``` bun run jingswap/jingswap.ts cycles-history --market sbtc-usdcx ``` ### user-activity Get a user's auction activity (deposits, cancellations, fills, rollovers). ``` bun run jingswap/jingswap.ts user-activity --address <stx_address> --market sbtc-usdcx ``` ### prices Get oracle and DEX prices (Pyth, XYK pool, DLMM). ``` bun run jingswap/jingswap.ts prices ``` ### deposit-stx Deposit quote token (STX or USDCx depending on market) into the current auction cycle. Deposit phase only. ``` bun run jingswap/jingswap.ts deposit-stx --amount 10 --market sbtc-usdcx ``` ### deposit-sbtc Deposit sBTC (in satoshis) into the current auction cycle. Deposit phase only. ``` bun run jingswap/jingswap.ts deposit-sbtc --amount 10000 --market sbtc-usdcx ``` ### cancel-stx Cancel your quote-token deposit and get a refund. Deposit phase only. ``` bun run jingswap/jingswap.ts cancel-stx --market sbtc-usdcx ``` ### cancel-sbtc Cancel your sBTC deposit and get a refund. Deposit phase only. ``` bun run jingswap/jingswap.ts cancel-sbtc ``` ### close-deposits Close the deposit phase (requires min 150 blocks elapsed, both sides above minimum). ``` bun run jingswap/jingswap.ts close-deposits --market sbtc-usdcx ``` ### settle Settle using stored Pyth prices (free). Usually fails due to stale prices — prefer settle-with-refresh. ``` bun run jingswap/jingswap.ts settle ``` ### settle-with-refresh Settle with fresh Pyth VAAs (~2 uSTX). Recommended settlement method. ``` bun run jingswap/jingswap.ts settle-with-refresh --market sbtc-usdcx ``` ### cancel-cycle Cancel cycle if settlement failed after 530 blocks (~17.5 min). Rolls deposits to next cycle. ``` bun run jingswap/jingswap.ts cancel-cycle ``` ## Notes - Stacks blocks average ~2 seconds (Nakamoto) - Deposit phase: min 150 blocks (~5 min) before close - Buffer phase: 30 blocks (~1 min) after close - Cancel threshold: 530 blocks (~17.5 min) from close - `distribute` events show swap proceeds + unswapped remainder (rolled to next cycle, not refunded) - Post conditions: deposits use Deny mode; cancel/settle/cancel-cycle use Allow mode - USDCx is a stablecoin (~$1) — `SP120SBRBQJ00MCWS7TM5R8WJNTTKD5K0HFRC2CNE.usdcx`, asset `usdcx-token`, 6 decimals
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.