Skip to main content

Market

Market is stored using a hybrid approach:
  • On-chain: Market state is stored in Solana Program Derived Addresses (PDA).
  • Off-chain: Additional market metadata (title, description, images) is stored on IPFS and immutably linked to the market on-chain.
This architecture keeps on-chain storage minimal while allowing rich metadata to be associated with each market.

Market Account Structure

The Market account structure is similar to a basic AMM:
Like traditional AMMs, the market maintains reserves of two tokens (x_liquidity and y_liquidity). The liquidity parameter acts as the PM-AMM’s sigma (liquidity parameter), which controls market sensitivity to trades. The market uses these reserves to facilitate trading through the PM-AMM pricing mechanism.

IPFS Metadata

The metadata_uri field points to off-chain data stored on IPFS. Example structure:

User’s Bet Structure

Each user’s position in a market is tracked via a Bet PDA (referred to as “shares” on the frontend):
The Bet PDA stores the user’s holdings of X and Y outcome tokens, as well as how much collateral they initially deposited.