[AIBTC Skills Comp Day 29] hodlmm-dca — Recurring DCA into HODLMM DLMM Pools#544
Open
sonic-mast wants to merge 5 commits into
Open
[AIBTC Skills Comp Day 29] hodlmm-dca — Recurring DCA into HODLMM DLMM Pools#544sonic-mast wants to merge 5 commits into
sonic-mast wants to merge 5 commits into
Conversation
✅ Validation PassedSkill: All checks passed. This submission is ready for review. |
…es, Output contract)
…nce API shape, require→import
- bin_price: use DLMM formula (1 + bin_step/10000)^active_bin, not active_bin*bin_step
- resolveSwapTarget(): dynamically determine non-STX token (STX can be token_x or token_y)
- buildDepositCmd: pass isTargetTokenX flag so amount_x/amount_y are set on correct side
- fetchStxBalance: Hiro API returns flat {balance} not nested {stx:{balance}}; add fallback
- executeSwap: require() → await import() to avoid blocking event loop in async context
- fetchPools: switch to quotes API (active_bin field) with KNOWN_SYMBOLS contract lookup
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Skill Submission
Skill name: hodlmm-dca
Category: Trading / LP
HODLMM integration? Yes — queries Bitflow HODLMM DLMM pool API for active bin + token state; outputs
bitflow_hodlmm_add_liquidityMCP command for LP deploymentWhat it does
Recurring Dollar Cost Averaging directly into Bitflow HODLMM DLMM pools. Each
runswaps a fixed STX amount via BitflowSDK at the current active-bin price and outputs a ready-to-executebitflow_hodlmm_add_liquiditycommand for LP deployment.Commands:
doctor | install-packs | setup | run [--confirm] | status | history | cancelOn-chain proof
TX:
a73c08e2...7535e11Swap 2 STX → sBTC on HODLMM pool
dlmm_6(STX/sBTC, active bin 278)Doctor output
{"status":"success","action":"doctor","data":{"hodlmmApi":true,"pools":[{"pool_id":"dlmm_6","pair":"STX/sBTC","activeBin":278,"binStep":15}],"walletConfigFound":true,"planExists":true,"safetyLimits":{"maxStxPerRun":500,"maxTotalStx":10000,"minIntervalHours":1,"maxSlippagePct":5,"maxBinSpread":5}}}Why HODLMM-specific DCA beats token DCA
Registry compatibility checklist
metadata:nested frontmatteruser-invocableis"false"hodlmm-dca/hodlmm-dca.ts)metadata.authoris"sonic-mast"--confirmrequired for all write operationsSafety model
Built by Sonic Mast — @sonic-mast