Open Issues Need Help
View All on GitHubAI Summary: This issue proposes implementing a robust oracle resolution system that includes a fallback mechanism and a configurable timeout. If the primary oracle fails or exceeds the timeout, a secondary fallback oracle will be used; if both fail or time out, an admin or auto-refund path will be triggered. The solution must be secure, thoroughly tested, documented, and prevent double-resolution or double-refunds.
AI Summary: This issue requests the implementation of configurable rate limiting for user bets and admin-created events to prevent spam and abuse. The solution must be secure, thoroughly tested, and documented, allowing administrators to set limits based on time windows. It should emit clear errors when limits are exceeded while ensuring legitimate high-volume usage is not unduly restricted.
AI Summary: This GitHub issue requests the addition of comprehensive test cases for multi-outcome markets, covering their creation, betting, resolution, and payout mechanisms. The tests must achieve a minimum of 95% coverage, validate various outcome counts (2, 3, N), handle valid/invalid bets, accurately calculate payouts for single winners and ties, ensure backward compatibility with binary markets, and address specific edge cases.
AI Summary: This issue proposes implementing event archiving and historical query support for resolved or cancelled events. The goal is to enable analytics and UI features by allowing users to query events by various criteria such as time range, outcome, or category. The implementation must be secure, gas-efficient with pagination, and backward-compatible with existing event storage, while only exposing public metadata.
AI Summary: This GitHub issue proposes implementing a circuit breaker pattern within a contract to enable emergency pausing of operations. It aims to add both manual and automatic triggering mechanisms, along with event notifications, recovery procedures, and comprehensive testing to enhance contract safety and control.
AI Summary: This GitHub issue proposes implementing batch operations for various functions like voting, claiming, market creation, and oracle calls to improve efficiency and reduce gas usage. It requires creating a new `BatchProcessor` struct, specific batch functions for each operation, and robust validation, error handling, and statistics tracking for these new batch processes.
AI Summary: This issue aims to enhance market creation by implementing comprehensive validation for its parameters, including duration limits, stake amounts, outcome counts, threshold values, and comparison operators. It requires creating a new `MarketParameterValidator` struct with dedicated functions for each validation type, culminating in an aggregate validation function and a rule-retrieval mechanism.
AI Summary: This GitHub issue proposes to significantly enhance the validation of Oracle configuration parameters, moving beyond basic checks. It aims to implement comprehensive validation for aspects such as feed ID formats, threshold ranges, comparison operators, and oracle provider compatibility, including consistency checks. The solution involves creating a dedicated `OracleConfigValidator` struct with several specific functions to ensure robust configuration.
AI Summary: Develop a comprehensive build and integration system for a modular Soroban contract structure. This includes creating build scripts, integration tools for module coordination, module dependency management, build validation and testing scripts, deployment scripts, module testing scripts, documentation generation, and module compatibility checking. The goal is to automate the entire build and deployment process for the modular contracts.
AI Summary: Refactor the existing single test file (`test.rs`) into a modular test structure, creating separate test files for each module within the Soroban contract. This includes implementing module-specific test utilities, integration tests, helper functions, documentation, validation utilities, and tracking test coverage.
AI Summary: Refactor the main `lib.rs` file of a Soroban smart contract to use a modular structure. This involves breaking down the existing code into smaller, more manageable modules, ensuring proper imports, organization, integration, and documentation. Testing utilities and module compatibility validation should also be implemented.
AI Summary: Implement a dynamic dispute threshold mechanism for a Soroban smart contract. This involves creating functions to calculate, adjust, validate, and track dispute thresholds based on market size, activity, and a configurable base threshold. The system should allow an administrator to update thresholds and maintain a history of adjustments.
AI Summary: Implement a dynamic fee system for a Soroban smart contract, adjusting fees based on market size, activity levels, and configurable tiers. This involves creating several functions for fee calculation, validation, adjustment, and historical tracking, along with a mechanism for administrators to update the fee structure.
AI Summary: Implement a comprehensive dispute resolution system for a Soroban smart contract, including voting mechanisms, outcome determination logic, fee distribution, escalation procedures, and data retrieval functions. This involves creating several new functions within the existing contract to handle dispute creation, voting, resolution, fee distribution, and escalation.
AI Summary: Implement a dispute resolution mechanism in a Soroban smart contract that includes setting timeouts, automatically resolving disputes after timeout, determining outcomes based on timeouts, emitting timeout events, and managing timeout status. This involves creating several functions to handle timeout configuration, checking, resolution, outcome determination, event emission, and extension of dispute timeouts.
AI Summary: Implement robust fee collection mechanisms for a Soroban smart contract, including validation, distribution tracking, error handling (with refunds), event logging, and status monitoring. This involves creating several functions to handle fee validation, distribution, tracking, error handling, and reporting.
AI Summary: Implement a Soroban smart contract function to distribute fees to multiple parties based on configurable percentages. This involves creating functions for distribution, validation (including percentage totals), configuration updates, event emission, and historical tracking. The system needs to ensure the integrity of fee distribution and provide transparency through events.
AI Summary: Refactor the Soroban smart contract located at `contracts/predictify-hybrid/src/lib.rs` to extract all error types and enums into a new file, `contracts/predictify-hybrid/src/errors.rs`. This involves creating the new file, moving the error definitions, implementing the `Display` trait for improved error messages, adding error categorization, conversion traits, helper functions, documentation, and examples. The goal is to improve code organization, readability, and maintainability of the error handling system.
AI Summary: Refactor the Soroban smart contract `predictify-hybrid` by extracting all types, enums, and data structures (OracleProvider, OracleConfig, Market, PythPrice, etc.) from `lib.rs` into a new `types.rs` file. This involves organizing types categorically, adding validation functions, helper functions, comprehensive documentation, conversion utilities, and serialization/deserialization helpers.
AI Summary: Refactor the Soroban smart contract codebase to extract all oracle-related code (interfaces, implementations, clients) into a dedicated `oracles.rs` file. This involves creating the file, moving existing code, implementing an oracle factory pattern, adding configuration management, error handling, testing helpers, and ensuring organized implementations by provider.
AI Summary: Refactor the Soroban smart contract's `lib.rs` file by extracting all market-related functions and logic into a new `markets.rs` file. This includes moving existing market creation functions, adding state management utilities, implementing validation, analytics, helper functions, configuration management, and testing utilities for the market system.
AI Summary: Refactor the Soroban smart contract to extract voting and staking logic from `lib.rs` into a new `voting.rs` file. This involves moving existing functions (`vote`, `claim_winnings`), adding validation and processing utilities for voting and staking, implementing staking management, and creating testing utilities. The goal is to improve code organization, maintainability, and testability.
AI Summary: Refactor the Soroban smart contract to extract all dispute resolution logic from `lib.rs` into a new `disputes.rs` file. This involves moving existing functions, adding new functions for dispute creation, management, validation, resolution, analytics, and helper utilities, and creating corresponding tests.
AI Summary: Refactor the Soroban smart contract to extract all fee-related logic from `lib.rs` into a new `fees.rs` file. This involves moving existing fee collection functions, adding new functions for fee calculation, validation, distribution, analytics, tracking, and configuration management, and creating comprehensive tests for the new module.
AI Summary: Refactor the Soroban smart contract located at `contracts/predictify-hybrid/src/lib.rs` by extracting the oracle and market resolution logic into a new file, `contracts/predictify-hybrid/src/resolution.rs`. This involves moving existing functions (`fetch_oracle_result`, `resolve_market`, `finalize_market`), adding new functions for utilities, validation, analytics, and testing, and ensuring all functionality remains intact.
AI Summary: Refactor the Soroban smart contract `predictify-hybrid` to extract all constants and configuration values from `lib.rs` into a new `config.rs` file. This involves creating appropriate structs for configuration, implementing validation and helper functions, adding support for environment-specific configurations, and writing comprehensive documentation and tests.
AI Summary: Create a `utils.rs` file within the `contracts/predictify-hybrid/src` directory to consolidate common utility functions currently scattered throughout `lib.rs`. This includes implementing time/date, string manipulation, numeric calculation, validation, conversion, and testing utilities, along with comprehensive documentation for each function.
AI Summary: Create a new `events.rs` file within the `contracts/predictify-hybrid/src` directory to centralize event emission and logging logic for the Soroban smart contract. This involves defining event structures, implementing emission and logging utilities, adding validation and helper functions, and creating comprehensive documentation and tests.
AI Summary: Refactor the Soroban smart contract located at `contracts/predictify-hybrid/src/lib.rs` to extract all input and data validation logic into a new file, `contracts/predictify-hybrid/src/validation.rs`. This new file should organize validation functions categorically (market, oracle, fees, etc.), include comprehensive error handling and reporting, and be thoroughly tested. The goal is to improve maintainability, consistency, and readability of the validation rules.
AI Summary: Refactor the Soroban smart contract to separate admin functions and access control logic into a dedicated `admin.rs` file. This involves moving existing functions like `initialize` and `close_market`, implementing admin validation, role management, event logging, and creating associated helper and testing utilities. The goal is to improve code organization, maintainability, and security.
AI Summary: Refactor the Soroban `hello_world` contract to implement a modular design. This involves creating a new module structure within the `contracts/predictify-hybrid/src` directory, defining clear module dependencies and relationships, implementing module integration and coordination, adding comprehensive documentation and examples, creating testing utilities, and managing module versions and migrations. The goal is to transform the monolithic codebase into a well-organized, maintainable, and testable system.
AI Summary: Create comprehensive documentation for a new modular architecture in a Soroban project, including module relationships, dependencies, usage examples, architecture diagrams, a migration guide from the old structure, API documentation, testing documentation, and maintenance guidelines.
AI Summary: Create comprehensive documentation and best practices for gas optimization in Soroban smart contracts. This includes analyzing gas usage for all functions, implementing optimization techniques, establishing benchmarking procedures, and developing testing and monitoring guidelines. Case studies and troubleshooting advice should also be included.
AI Summary: Integrate a real Pyth oracle contract into a Soroban project, replacing a mock implementation. This involves creating a `PythOracleClient` struct to interact with the Pyth contract, implementing functions for fetching and validating prices, parsing responses, handling errors, and retrieving confidence intervals. The goal is to replace hardcoded mock price data with real-time price feeds from the Pyth network.
AI Summary: Implement robust state management for a market contract within a Soroban project. This involves creating a `MarketState` enum, defining valid state transitions, implementing access control based on the market's state, creating functions for state change events and logging, and ensuring state consistency. The goal is to improve the reliability and auditability of the market contract.
AI Summary: Implement a Soroban smart contract function to extend the duration of a market. This requires adding functions for extension validation, approval (likely via an admin address), fee handling, event logging, and history tracking. The implementation should include checks for limits on extension duration and appropriate error handling.
AI Summary: Integrate the DIA oracle into a Soroban smart contract. This involves creating a DIAOracle struct, implementing functions to fetch and validate price data from the DIA network (including error handling and data integrity checks), and integrating this functionality into the existing contract. The goal is to enable the contract to retrieve real-time price feeds for various assets supported by DIA.
AI Summary: Develop comprehensive security documentation for a Soroban smart contract project, including attack vector analysis, mitigation strategies, best practices, audit checklists, testing guides, incident response procedures, security monitoring guidelines, and update procedures.
AI Summary: Develop comprehensive API documentation for a Soroban smart contract project, including function documentation with parameters and return values, error handling, usage examples, integration patterns, API versioning, and a troubleshooting guide. The documentation should cover all public functions within the `contracts` directory.
AI Summary: Create a comprehensive guide for deploying and maintaining Soroban smart contracts on mainnet, including step-by-step deployment instructions, configuration for mainnet settings, oracle setup, testing procedures, monitoring setup, security checklist, rollback procedures, and maintenance procedures.
AI Summary: Implement comprehensive end-to-end integration tests for a Soroban smart contract market, covering the entire lifecycle from creation to resolution, including oracle integration with real contracts, dispute resolution, fee collection, error scenarios, and multi-user scenarios. This involves creating a test suite and several test functions to cover all aspects of the market's functionality.
AI Summary: Implement storage optimization and efficient data structure management for a Soroban smart contract. This involves creating functions for data compression, cleanup, migration, usage monitoring, layout optimization, and integrity validation, focusing on market data structures. The goal is to reduce storage costs and improve overall efficiency.