Buy Trades
Purpose
The Buy function allows users to purchase shares of a specific outcome in a prediction market. The price of shares is dynamically adjusted based on the current state of the market, reflecting demand and supply.
Workflow
Input Parameters:
Market ID.
Outcome to buy (e.g., YES or NO).
Amount of collateral the user is willing to spend.
Price Calculation
The AMM calculates the cost of the desired shares using the constant.
Pool Update:
Collateral is added to the pool for the selected outcome.
The share pool is adjusted to maintain the constant product.
Share Allocation:
The user receives the purchased shares in their wallet.
Fee Deduction:
A small fee is deducted and distributed to liquidity providers or the platform treasury.
Last updated