Proposal Details
Proposal #148
Passed
Proposal title
Persistence DEX Vault Contract Upgrade to v1.2.2 - Fix Query Pools Function for Defunct Pool Handling
Submit time
Deposit end time
Voting start time
Voting end time
Tally result
92.69%
Proposal #148 description
This proposal requests approval to upgrade the Persistence DEX Vault contract from version 1.2.1 to 1.2.2 to address a critical bug in the
 function that causes failures when defunct pools are present in the system.
The current
 function in v1.2.1 attempts to load all pool IDs within a range without checking if pools are defunct, causing query failures when defunct pools exist. This breaks pagination and pool discovery functionality for frontend applications and other integrators.
Additionally, this proposal updates the global WASM
 parameter to modify the whitelist of addresses permitted to upload new code.
This is part of a key rotation security exercise.
Specifically, it removes 
 and adds 
, keeping existing addresses intact.
Proposal
The proposal aims to:
- Fix Query Pools Function Logic: Implement proper iteration with to skip defunct pools gracefully
- Enhance Pagination: Improve pagination logic to properly handle gaps in pool IDs caused by defunct pools
- Add Migration Support: Include variant for seamless upgrade path
- Maintain Backward Compatibility: Ensure all existing functionality remains unchanged
Technical Changes
- 
Fixed Function Logic:- Before: Used a simple range-based approach that failed when encountering defunct pools
- After: Implements proper iteration with to skip defunct pools gracefully
- Impact: Ensures only returns active pools and handles pagination correctly
 
- 
Enhanced Pagination: - Improved pagination logic to properly handle gaps in pool IDs caused by defunct pools
- Maintains correct limit enforcement even when skipping defunct pools
- Ensures consistent behavior across different query scenarios
 
- 
Migration Support: - Added variant for seamless upgrade path
- Includes proper version validation (from v1.2.1 to v1.2.2)
- No state migration required - purely a bug fix upgrade
 
- Added 
- 
Governance Params Update (WASM): - Update via
- Address list after update:
- Leaves other WASM params unchanged
 
- Update 
Code Quality Improvements
- Added comprehensive test suite () with 6 test cases covering:- Basic pool queries
- Pagination scenarios
- Defunct pool handling
- Edge cases and boundary conditions
 
- Minor code formatting improvements
Benefits
- Reliability: Prevents query failures when defunct pools exist
- User Experience: Frontend applications can reliably fetch pool lists
- API Stability: Maintains backward compatibility while fixing the bug
- Future-Proof: Robust handling for mixed active/defunct pool scenarios
Risk Assessment
- Low Risk: This is purely a bug fix with no breaking changes
- Backward Compatible: All existing functionality remains unchanged
- Well Tested: Comprehensive test coverage for all scenarios
- No State Changes: Migration only updates version, no storage modifications
Deployment Details
- Current Version: 1.2.1
- Target Version: 1.2.2
- Migration Type: 
- WASM Hash: Updated in artifacts with new checksum
Voting
- YES: Vote in favor of upgrading the vault contract to fix the query pools functionality
- NO: Vote against the implementation
- NO WITH VETO: Vote if you believe this proposal is spam or fundamentally flawed
- ABSTAIN: Abstain from voting while contributing to quorum requirements
This upgrade is essential for maintaining the reliability of the Persistence DEX pool querying functionality and ensuring a smooth user experience across all integrating applications.
Proposal #148 overview
Total votes
136
Voters
136
Total deposit
3,500 XPRT
