Dekant Continuous Prediction Market
Continuous prediction markets on Solana, developed for the Solana Frontier Hackathon
On this page
1. At a glance
Dekant is a Solana continuous prediction market project developed for the Solana Frontier Hackathon. The public repository documents the program instruction set, a maximum of 256 bins for a continuous market, and separate Rust unit and Anchor integration test suites. See the README and source for the current technical record.
2. Why it existed
Binary prediction markets represent outcomes as separate yes/no questions. Dekant explores representing a continuous outcome range in one market, so participants can trade across intervals rather than choosing a single threshold.
3. Contribution
Architected and implemented nearly the entire project from scratch for the four-person Colosseum Solana Frontier Hackathon team—covering the on-chain Solana program, continuous AMM mathematical model, indexer/backend service layer, and trading client interface—as recorded in the public pya-h/dekant-pm repository.
4. System Shape & Architecture
Research and implementation repositories
8-Repo Continuous Prediction Market & AMM Cluster
DekantPM evolved from a coordinated 8-repository quantitative research lineage spanning theoretical math proofs, Python Monte Carlo verifications, Rust numerical libraries, and Solana smart contracts:
01 // On-Chain Solana Protocol
02 // Mathematical Foundations (Rust)
Continuous outcome probability density functions, numeric price integral, and fixed-point pricing logic.
Bayesian model math in Rust calculating posterior belief updates when interacting with informed traders.
03 // Comparative Simulations & Numerical Verification (Python)
Monte Carlo simulation measuring liquidity depth and price slippage across dynamically sub-binned curves.
Empirical benchmark analyzing worst-case market maker loss and capital efficiency between LMSR and BMM.
Analytical study evaluating L2-norm cost functions to bound subsidy loss in unbounded continuous outcome spaces.
Initial mathematical design sketches and theoretical notes bridging discrete prediction markets to continuous curves.
04 // Autonomous Liquidity & Agent Stress Testing
The project story
DekantPM started from a frustration with how conventional binary prediction markets compress real-world uncertainty into rigid yes/no thresholds. Building for the Colosseum Solana Frontier Hackathon gave us an opportunity to ask what an automated market maker looks like when traders can express continuous belief distributions across price intervals on Solana.
Designing a fixed-point market foundation
The initial build focused strictly on core market-state accounts, administrative lifecycle instructions, and deterministic bin accounting under Solana’s tight account size and compute constraints.
Translating continuous distributions into live trades
Once the state layout held, mathematical research from companion prototypes matured into executable buy, sell, and trade-to-price AMM curves—turning belief updates across multiple bins into atomic swaps.
Connecting indexers, tooling, and trading flows
To make the protocol operable end-to-end, an off-chain indexer, operator CLI toolkit, and web interface grew around the program to support market creation, discovery, binary, multi-choice, and continuous range trading.
Hardening numerical bounds and edge behavior
As realistic simulation workloads hit extreme tail ranges and wide multi-bin spreads, the focus shifted from feature breadth to numerical stability, overflow guards, indexer recovery, and transparent client failure reporting.
5. Technical Decisions & Tradeoffs
The implementation represents continuous market states through bounded bins and fixed-point arithmetic. The public source is the reference for the current program design and its constraints; this page avoids unverified performance or error-rate figures.
Challenges & how I solved them
Large inputs distorted the probability curve
A Taylor approximation used by the normal-density calculation produced invalid position shapes at larger values instead of the expected bell-shaped curves.
How I Solved It
I revisited the approximation path, corrected the calculation, and rewrote the unit coverage around the affected normal-density behavior. Numerical correction and tests ↗
Reserve scaling could silently truncate
A scaled liquidity reserve could fit in the intermediate integer type but exceed the destination u64, allowing a cast to truncate the value.
How I Solved It
I replaced the unchecked cast with a checked conversion that returns a math-overflow error. Boundary tests now assert that oversized inputs fail without partially changing reserves, while values that fit still succeed. Reserve overflow guard ↗
Wide-spread trades hit the compute limit
Trades spanning many bins could exceed the available compute budget, while the client needed to explain the failure without presenting misleading trade information.
How I Solved It
I improved the computation for large-bin, wide-spread trades and updated the client’s transaction feedback so it reports the constraint clearly. Compute-budget fix and UI feedback ↗
6. Verification & Security
The public README reports 205 Rust unit tests and 70 integration tests. Those are separate suites in the repository; the combined 275+ figure is their sum. The README also documents the program’s instruction set and market bin limit.
7. Outcome & Metrics
- Program interface: The README lists 17 on-chain instructions.
- Market configuration: The README specifies up to 256 bins per continuous market.
- Verification: The README reports 205 Rust unit tests and 70 integration tests.
- Hackathon: The project was submitted to the Solana Frontier Hackathon. Placement details remain pending owner confirmation.
8. Reflection & Lessons Learned
This project connected mathematical modeling, program constraints, simulation, and user-facing product work. Keeping those layers aligned was central to the design. Any quantitative claims beyond the repository’s documented limits and test totals should be added only with a dated source.
9. Explore Source & Artifacts
- Core Protocol and README: github.com/pya-h/dekant-pm
- Math Engine: github.com/pydea-rs/dekantpm
- Bayesian Model: github.com/pydea-rs/bmmath
- Research and simulations: See the linked repositories in the research cluster above.