Skip to content

feat: Praxis prediction market plugin - 15/15 tests passing#406

Open
Makaveli912 wants to merge 184 commits into
canopy-network:mainfrom
Makaveli912:feat/praxis-prediction-markets
Open

feat: Praxis prediction market plugin - 15/15 tests passing#406
Makaveli912 wants to merge 184 commits into
canopy-network:mainfrom
Makaveli912:feat/praxis-prediction-markets

Conversation

@Makaveli912
Copy link
Copy Markdown

Praxis - Prediction Market Plugin

A fully tested, mainnet-ready prediction market plugin for Canopy.
Built and tested entirely on mobile (userland/Android).

Full LMSR prediction market implementation
MIN_B0 = 5,000 PRX for meaningful liquidity
500 PRX non-refundable creation fee to protocol treasury
COI-1, COI-2, COI-3 conflict-of-interest guards
Anti-spam: minimum question length validation
15/15 tests passing including full PORS flow, claim winnings, cancelled market refund

Makaveli912 and others added 30 commits May 25, 2026 10:57
- COI-1 CRITICAL: resolver cannot hold a position in market they resolve
  - Added PositionState check in propose_outcome + resolve_market DeliverTx
  - ErrResolverHasPosition() code 199
- COI-2 HIGH: market creator cannot be the resolver for the same market
  - Added bytes.Equal(market.Creator, msg.ResolverAddress) in propose_outcome DeliverTx
  - ErrCreatorCannotResolve() code 200
- COI-3 MEDIUM: per-address position cap at 20% of pool
  - MAX_POSITION_BPS = 2000, exceedsPositionCap() helper in helpers.go
  - Enforced in submit_prediction DeliverTx before balance check
  - ErrPositionCapExceeded() code 201
… docs, corrupt state error, accepted risks documented
…or bond, superadmin, Canopy keystore support
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants