Add bulk operations support to Stacks DEX AMM pool#1
Open
AdekunleBamz wants to merge 2 commits intophessophissy:mainfrom
Open
Add bulk operations support to Stacks DEX AMM pool#1AdekunleBamz wants to merge 2 commits intophessophissy:mainfrom
AdekunleBamz wants to merge 2 commits intophessophissy:mainfrom
Conversation
- Implement bulk-swap-x-for-y for multiple X→Y swaps in one transaction (up to 10 swaps) - Implement bulk-swap-y-for-x for multiple Y→X swaps in one transaction (up to 10 swaps) - Implement bulk-add-liquidity for multiple liquidity additions (up to 5 additions) - Implement bulk-remove-liquidity for multiple liquidity removals (up to 5 removals) - Added comprehensive test suite covering all bulk operations - Tests include successful bulk operations, error handling, slippage protection, and integration scenarios - Bulk operations maintain all existing AMM logic, fee collection, and security validations - Compatible with existing single-operation workflow while providing efficiency for DEX users
- Added confirmation modal before executing swaps - Displays swap details: pay amount, receive amount, exchange rate, slippage, deadline - Improved user experience with clear swap preview - Added modal styling and event handlers - Separated swap preparation from execution for better UX
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.
This PR introduces comprehensive bulk operations functionality to the Stacks DEX AMM pool, enabling efficient batch processing of swaps and liquidity operations.
Changes Made
Contract Updates (
contracts/pool-v5.clar)mapfunction for efficient bulk processing while maintaining AMM integrityTest Suite Updates (
contracts/tests/pool-v5.test.ts)New Features
For DEX Users
For Liquidity Providers
For DEX Operators
API Examples
Technical Details
Use Cases
This enhancement significantly improves the operational efficiency of the Stacks DEX while maintaining all existing AMM properties, security validations, and mathematical guarantees.