@gala-chain/launchpad-sdk 3.26.6 → 3.27.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,103 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.27.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Redeploy with latest price impact fix
|
|
8
|
+
|
|
9
|
+
## 3.27.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 0a49faf: **GalaSwap Liquidity Position Management (v3.25.0 SDK / v1.20.0 MCP)**
|
|
14
|
+
|
|
15
|
+
Comprehensive liquidity position management for concentrated liquidity provision on GalaSwap DEX.
|
|
16
|
+
Liquidity providers can now earn passive trading fees by providing liquidity within specific price
|
|
17
|
+
ranges.
|
|
18
|
+
|
|
19
|
+
### 8 New SDK Methods (LaunchpadSDK)
|
|
20
|
+
1. **getSwapUserLiquidityPositions(ownerAddress, limit?, bookmark?)** - View all open positions
|
|
21
|
+
for a wallet with pagination support
|
|
22
|
+
2. **getSwapLiquidityPositionById(ownerAddress, positionId)** - Get specific position by UUID
|
|
23
|
+
3. **getSwapLiquidityPosition(ownerAddress, position)** - Get position by token pair and tick
|
|
24
|
+
range
|
|
25
|
+
4. **addSwapLiquidityByPrice(args)** - Create position using user-friendly price ranges (e.g.,
|
|
26
|
+
min: 0.95, max: 1.05)
|
|
27
|
+
5. **addSwapLiquidityByTicks(args)** - Create position using precise tick boundaries (advanced)
|
|
28
|
+
6. **getSwapEstimateRemoveLiquidity(args)** - Preview amounts and fees before executing removal
|
|
29
|
+
7. **removeSwapLiquidity(args)** - Close or reduce position with slippage protection
|
|
30
|
+
8. **collectSwapPositionFees(args)** - Harvest accumulated trading fees without closing position
|
|
31
|
+
|
|
32
|
+
### 8 New MCP Tools
|
|
33
|
+
|
|
34
|
+
All SDK methods exposed as MCP tools with full type validation and privateKey override support:
|
|
35
|
+
- `gala_launchpad_get_user_liquidity_positions` - List positions with pagination
|
|
36
|
+
- `gala_launchpad_get_liquidity_position_by_id` - Get by position ID
|
|
37
|
+
- `gala_launchpad_get_liquidity_position` - Get by token pair
|
|
38
|
+
- `gala_launchpad_add_liquidity_by_price` - Create position (price-based)
|
|
39
|
+
- `gala_launchpad_add_liquidity_by_ticks` - Create position (tick-based)
|
|
40
|
+
- `gala_launchpad_estimate_remove_liquidity` - Estimate removal amounts
|
|
41
|
+
- `gala_launchpad_remove_liquidity` - Execute removal
|
|
42
|
+
- `gala_launchpad_collect_position_fees` - Collect accumulated fees
|
|
43
|
+
|
|
44
|
+
### 4 New Slash Commands (Prompts)
|
|
45
|
+
|
|
46
|
+
Quick-access workflows for Claude Desktop users:
|
|
47
|
+
- `/galachain-launchpad:my-positions` - View all liquidity positions
|
|
48
|
+
- `/galachain-launchpad:add-liquidity` - Create new position (guided workflow)
|
|
49
|
+
- `/galachain-launchpad:remove-liquidity` - Close position (with estimates)
|
|
50
|
+
- `/galachain-launchpad:collect-fees` - Harvest accumulated fees
|
|
51
|
+
|
|
52
|
+
### Key Features
|
|
53
|
+
|
|
54
|
+
**Fee Tiers**: Support for standard GalaSwap fee tiers (500 bps = 0.05%, 3000 bps = 0.30%, 10000
|
|
55
|
+
bps = 1.00%)
|
|
56
|
+
|
|
57
|
+
**Price Range Creation**: User-friendly price range interface (0.95 - 1.05) automatically converts
|
|
58
|
+
to precise tick boundaries
|
|
59
|
+
|
|
60
|
+
**Tick-Based Creation**: Advanced users can create positions using exact tick boundaries for
|
|
61
|
+
precise capital management
|
|
62
|
+
|
|
63
|
+
**Fee Collection**: Harvest passive trading fees without closing position
|
|
64
|
+
|
|
65
|
+
**Estimation**: Preview exact amounts and fees before executing any transaction
|
|
66
|
+
|
|
67
|
+
**Slippage Protection**: Built-in slippage tolerance for all operations
|
|
68
|
+
|
|
69
|
+
**Pagination**: Efficient position listing with bookmark support for large portfolios
|
|
70
|
+
|
|
71
|
+
### Documentation & Examples
|
|
72
|
+
- **Demo Script**: `packages/sdk/examples/demo-liquidity-positions.ts` - Complete workflow
|
|
73
|
+
demonstration
|
|
74
|
+
- **SDK Docs**: `explain_sdk_usage` tool includes `liquidity-positions` topic with runnable
|
|
75
|
+
examples
|
|
76
|
+
- **Integration Guide**: CLAUDE.md includes comprehensive LP integration section
|
|
77
|
+
|
|
78
|
+
### Test Coverage
|
|
79
|
+
- **54 SDK Unit Tests**: Complete test coverage for all 8 methods with edge cases
|
|
80
|
+
- **39 MCP Tool Tests**: Full validation of all 8 MCP tools and input schemas
|
|
81
|
+
- **1401 Total Tests**: Full regression test suite passing
|
|
82
|
+
|
|
83
|
+
### Version Updates
|
|
84
|
+
- SDK: 3.24.2 → 3.25.0 (minor version bump)
|
|
85
|
+
- MCP Server: 1.19.2 → 1.20.0 (minor version bump)
|
|
86
|
+
|
|
87
|
+
### Patch Changes
|
|
88
|
+
|
|
89
|
+
- Fix: GSwap price impact calculation now accounts for actual token exchange rates
|
|
90
|
+
|
|
91
|
+
Previously, the price impact formula assumed a 1:1 price ratio between tokens, resulting in
|
|
92
|
+
incorrect high price impact values (e.g., 98.71% for a 100 GALA swap).
|
|
93
|
+
|
|
94
|
+
Updated calculatePriceImpact() to:
|
|
95
|
+
- Fetch the current pool exchange rate via getPoolData()
|
|
96
|
+
- Calculate ideal output as: inputAmount _ currentPrice _ (1 - fee)
|
|
97
|
+
- Properly compute price impact based on actual vs ideal output
|
|
98
|
+
|
|
99
|
+
This fixes the nonsensical price impact calculations for non-stablecoin pairs like GALA/GUSDC.
|
|
100
|
+
|
|
3
101
|
## 3.24.0
|
|
4
102
|
|
|
5
103
|
### Minor Changes
|