Skip to main content
Engineering Case Study

Dekant Continuous Prediction Market

Continuous prediction markets on Solana, developed for the Solana Frontier Hackathon

protocolsScope L4

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

System Architecture SchematicDEKANT-PM // SVG
Quant ResearchLMSR / BMM / L2-NormTrader BotsStress & ArbitrageDEKANT SVM PROGRAMAnchor InstructionsU64F64 Deterministic MathContinuous Market BinsArbitrary Range [a, b]Verified CorePublic test suitesFrontier submission
Research and simulation artifacts connected to a Solana program and product interfaces; see the public repository for implementation detail.

Research and implementation repositories

8-Repo Continuous Prediction Market & AMM Cluster

Research Lineage

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:

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.

01

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.

02

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.

03

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.

04

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

Numerical stability

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 ↗

Integer boundaries

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 ↗

Transaction budget

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