-
Notifications
You must be signed in to change notification settings - Fork 99
fix: Ensure the swap liquidity is at min 10k sats #733
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #733 +/- ##
===========================================
+ Coverage 68.87% 80.79% +11.92%
===========================================
Files 35 49 +14
Lines 4932 14431 +9499
===========================================
+ Hits 3397 11660 +8263
- Misses 1535 2771 +1236 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Request to rebase on master. |
d506c16 to
2086d1e
Compare
Done |
1448eff to
2086d1e
Compare
2086d1e to
b4b55c6
Compare
Code Review - Issue FoundUnconditional address generation causing address index exhaustion The check_swap_liquidity_taproot function unconditionally generates a new external address at lines 404-407 before checking if liquidity is insufficient. Since this function is called every 5 minutes by the monitoring thread, it generates ~105,000 addresses per year even when liquidity is already sufficient. Problem: Lines 403 to 412 in b4b55c6
The address generation should be moved inside the if offer_max_size < min_required block to only generate addresses when actually needed. Related code showing permanent index increment: Lines 1253 to 1257 in b4b55c6
|
Code reviewIssue: Unnecessary address generation wastes address spaceLocation: The Since this function is called every 5 minutes from the monitoring loop ( Lines 703 to 707 in b4b55c6
The Suggested fix: Move the Lines 422 to 429 in b4b55c6
No other issues found. Checked for bugs and CLAUDE.md compliance. |
5726a8a to
31e1252
Compare
Done |
31e1252 to
7884deb
Compare
Fixes #721, by enforcing the
MakerConfigto not be initialized if theminimum_swap_amountis lesser than 10k sats, and by continuously checking the swap-liquidity at certain interval of time.Note-: The v1-maker server already checks for
swap_liquidityat certain interval of time.