PRISM

INDEXED 2026-09-26
DIFFICULTY BEGINNER
CATEGORIES HACKATHON PROJECT
INDEXING PROJECT DATABASE
SYS.VER.1.0
PROJECT BRIEF

The problem PRISM solves

PRISM provides a decentralized prediction-market experience where users can trade YES/NO outcomes using PRISM's own Solana-based LMSR liquidity system, without depending on a centralized order book.

It solves several problems:

Accessible prediction markets: Users can trade directly against PRISM's AMM liquidity instead of needing to find a matching counterparty.
Transparent on-chain trading: Markets, trades, liquidity, positions, and settlement are handled through Solana smart contracts, making the financial state verifiable.
Independent pricing: PRISM uses its own LMSR pricing and liquidity rather than copying prices from external prediction markets.
Real-world market discovery: Polymarket Gamma data can be used as an external source for discovering and selecting real-world events, while PRISM remains the actual trading venue.
Reliable settlement: Once an external event is resolved, PRISM's oracle verifies the outcome and settles the corresponding on-chain market.
Community interaction: Users can discuss markets through usernames, comments, and market-specific chat history, giving traders context and community insight alongside the market itself.

In short, PRISM combines on-chain prediction-market trading, automated liquidity, external event data, oracle-based settlement, and community discussion into a single platform.

Challenges we ran into

Solana/Anchor toolchain compatibility

One of the biggest hurdles was getting the Anchor program to build reliably because newer Rust dependencies started using Edition 2024, while parts of the Solana SBF build toolchain were still tied to older Rust versions.

We had to align the Solana/Agave CLI, Anchor, Rust toolchain, and platform-tools versions before the program could compile successfully.

  1. Invalid USDC mint and wallet issues

During Devnet testing, transactions were failing with:

AnchorError: InvalidMint
Error Number: 6018

The problem was that the application and user wallet were not consistently using the same Devnet USDC mint.

We traced the mint addresses through the Anchor constraints, frontend configuration, wallet balances, and market fixtures, then standardized PRISM around the correct Devnet USDC mint.

  1. Stale market configuration

At one point, the wallet had sufficient USDC, but PRISM still reported:

insufficient funds

The issue wasn't actually the wallet balance. The frontend was loading an older market configuration that referenced the previous USDC mint.

We fixed this by updating the market fixtures and configuration, then verified that the frontend, Anchor program, and wallet were all referencing the same market and token mint.

  1. LMSR pricing bug

We also found a mathematical bug in the Rust LMSR implementation. The logarithm operation was missing for parts of the old YES/NO liquidity values.

The calculation was corrected to properly apply:

ln(old_yes)
ln(old_no)

This was important because even a small mathematical mistake in an AMM can produce completely incorrect prices.

  1. Market lifecycle testing

Testing freeze and resolve initially produced errors such as:

TooEarlyToFreeze
TooEarlyToResolve

The production market had an end timestamp far in the future, making it impractical to test the complete lifecycle immediately.

Instead of changing the production lifecycle logic, we created a temporary short-duration test market and used it to verify:

Open
↓
Trading
↓
Freeze
↓
External resolution
↓
Resolve
↓
Settlement

This allowed us to test the lifecycle without weakening the actual protocol rules.

  1. Keeping external market data separate from PRISM

Another architectural challenge was integrating Polymarket data without accidentally turning PRISM into a frontend for Polymarket.

We separated:

Gamma API → external event/reference data
PRISM Anchor → actual market, liquidity, trading and settlement
PRISM LMSR → independent pricing
Oracle → external outcome verification

This means a Polymarket price can be displayed as reference information without controlling PRISM's own market price.

  1. Backend and database integration

We also needed application-level storage for usernames, comments, and market discussions without putting social data into the financial smart contract.

The solution was to use Tiger Cloud PostgreSQL for:

Users
Comments
Chat history

while keeping financially critical state on Solana.

SYSTEM TAGS
INDEXED 2026-09-26
DIFFICULTY BEGINNER
CATEGORIES HACKATHON PROJECT
Join the club

Get exclusive updates

Fuel your next build. Get project guides, tech deep-dives, new product launches, and community highlights delivered weekly.

Promotion