Merged
Conversation
- Add get_market_liquidity() function to query YES/NO reserves from AMM pool - Calculate k constant (CPMM invariant: x * y = k) - Return implied odds in basis points (5000 = 50%) - Add query_amm_pool_state() helper for pool data retrieval - Resolve merge conflicts in market.rs - Add 12 comprehensive unit tests covering: * No pool scenario * Balanced and skewed pools * Extreme scenarios (95/5 splits) * Edge cases (one-sided reserves) * Large number handling * Rounding edge cases * K invariant verification * Read-only consistency Closes #[issue-number] - Query current YES/NO liquidity from AMM pool
- Add comprehensive PR description with all acceptance criteria - Add implementation summary document - Fix merge conflicts in factory_test.rs
…t resolution - Add finalize_resolution function to oracle contract - Validates consensus reached and 7-day dispute period elapsed - Makes cross-contract call to Market.resolve_market() - Stores final outcome permanently - Emits ResolutionFinalized event - Add 4 integration tests with Market contract - Add testutils feature for multi-contract testing - Fix test warnings
- Merge main branch changes (resolve_market, claim_winnings implementations) - Keep get_market_liquidity implementation from feature branch - Resolve conflicts in market.rs and market_test.rs - All liquidity query tests preserved
…t resolution (Netwalls#138) - Add finalize_resolution function to oracle contract - Validates consensus reached and 7-day dispute period elapsed - Makes cross-contract call to Market.resolve_market() - Stores final outcome permanently - Emits ResolutionFinalized event - Add 4 integration tests with Market contract - Add testutils feature for multi-contract testing - Fix test warnings Co-authored-by: Stephanie Nwankwo <63151237+GoSTEAN@users.noreply.github.com>
feat: calculate spot price
…ity-query feat: implement market liquidity query with k constant and implied odds
Adds 4 load test scenarios covering API baseline latency, 1000 concurrent WebSocket connections, 100 simultaneous predictions burst, and AMM high-frequency trading at 200 tx/sec. Includes shared config, auth helpers, orchestrator script, npm scripts, and baseline metrics template. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Confirmed get_market_liquidity function is fully implemented in market.rs - Returns YES/NO reserves, k constant, and implied odds - Comprehensive unit tests covering all edge cases - Resolved merge conflicts in factory_test.rs - Added conflict resolution summary documentation Acceptance Criteria Met: ✅ Return current YES/NO liquidity from AMM pool ✅ Return k constant and implied odds ✅ Unit tests with 12 comprehensive test cases
- Removed stray merge conflict markers (=======, >>>>>>> origin/main) at line 1103 - This was causing CI build failure with 'expected item, found ==' error - All test functions are now properly closed
feat: add k6 load testing suite for performance benchmarks
- Add multi-sig requirement (configurable, default 2 of 3 admins) - Implement emergency_override() function to override any market outcome - Add cooldown period (default 24h, minimum 1h) to prevent rapid-fire overrides - Emit EmergencyOverride event with justification hash for transparency - Store complete override records for audit trail - Add admin management functions (add_admin_signer, set_required_signatures, set_override_cooldown) - Add query functions (get_override_record, is_manual_override, get_admin_signers, etc.) - Implement 23 comprehensive unit tests covering all scenarios - Add complete documentation (feature docs, implementation summary, quick reference) Security features: - Multi-signature validation with configurable threshold - Cooldown period enforcement between overrides - Complete audit trail with permanent records - Justification hash requirement for transparency - Admin authentication and validation - No duplicate approvers allowed - Outcome validation (0 or 1 only) - Market existence verification Priority: P0 - Critical - Safety mechanism Status: Complete and tested
- Add ADMIN_SIGNERS_KEY, REQUIRED_SIGNATURES_KEY, LAST_OVERRIDE_TIME_KEY, OVERRIDE_COOLDOWN_KEY constants - Add EmergencyOverrideRecord and OverrideApproval structs - Fix emergency_override function signature with correct parameters - Resolve all compilation errors
…-contract Dispute market in market contract
- Poll AMM odds every 5 seconds - Broadcast to subscribers on change > 1% - Include direction indicator (YES/NO)
…rride-multisig Feature/emergency override multisig
[Backend] Implement structured logging
[Backend] Extend health check endpoints
cancel market
feat: get_market_state
- Test complete flow: create → pool init → trade → close → resolve → settle - Real PostgreSQL database integration via Docker - Balance verification at each step - Automated test runner script - All tests passing
[Contract] Implement Oracle read-only query functions
…realtime-odds-broadcasting feat: implement WebSocket real-time odds broadcasting (Netwalls#113)
feat: Created Soroban contract deployment script
Database Backup Strategy
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.
Netwalls#69 close