← Back to home

Normals

Bitcoin's first distribution market. It allows traders to trade on beyond "Yes/No".

Problem Statement

Normals is a next-generation distribution market platform, built on Rootstock, that allows users to trade on the full probability distribution of an event's outcome.Current prediction markets are limited to simple binary questions ("Will X happen?"). They cannot answer complex, continuous questions like, "What will the price of Bitcoin actually be?". Normals solves this by implementing the innovative "Distribution Markets" paper, creating a new kind of Automated Market Maker (AMM) where the asset being traded is the entire probability curve itself.Instead of a single price point, our market aggregates the predictions of all traders into a visual, collective forecast—a Normal distribution curve that anyone can see, challenge, and trade against. Users can express nuanced views like "I believe the price will be around $75k, but with very high certainty," and profit if they are more accurate than the market consensus.Key Features:Full Distribution Trading: Trade the entire probability curve for any continuous outcome.Live Visual AMM: An intuitive, real-time interface to see and physically shape the market's consensus.Permissionless Market Creation: A decentralized factory allows anyone to create new markets for any asset with a Pyth Network price feed.Earn Real Yield on Bitcoin: Provide liquidity with a single asset (RBTC or RIF) to our novel AMM and earn fees from market activity.Private Markets with ENS: Creators can use ENS names to create whitelisted, private markets for syndicated groups.We built Normals on Rootstock to bring this cutting-edge DeFi primitive to the security and liquidity of the Bitcoin ecosystem.

Solution

Normals is a full-stack decentralized application with a sophisticated on-chain engine and a highly interactive frontend.Smart Contracts (Solidity & Foundry):The on-chain architecture consists of two main contracts deployed on the Rootstock Testnet:DistributionMarket.sol: The core AMM for a single market. It inherits from OpenZeppelin's ERC20 to double as an LP token and uses PRBMath for high-precision fixed-point math.DistributionMarketFactory.sol: A factory contract that allows anyone to permissionlessly deploy new DistributionMarket instances with custom parameters.The most innovative—and hacky—part of our contract is the on-chain quoting mechanism. The quoteCollateral function performs a gas-aware gradient descent search (15 iterations) directly on-chain to find the argminX (the point of maximum potential loss) for any proposed trade. To optimize gas for the final transaction, we use a "verify-and-trade" pattern: the expensive quote is done as a view call, and the trade function simply takes the user's argminX and cheaply verifies its correctness by checking if the derivative at that point is near zero.Frontend:The frontend is built with React, and TypeScript. We use wagmi and viem for all blockchain interactions. The core of the user experience is the interactive chart, built with Chart.js, which provides a real-time visualization of the on-chain market state and the user's proposed trades. State management is handled through custom React hooks for a clean and performant architecture.

Hackathon

ETHGlobal New Delhi

2025

Contributors