Foreon Network Development Update: Edition 1 — (Technical Progress)
Introduction:
Welcome to the first edition of Foreon Network’s Development Update!
In this weekly series, we’ll provide you with a comprehensive, detailed overview of the progress we’ve made in building our decentralized prediction market platform on the Cardano blockchain.
Today, we’ll dive deep into the smart contract and technical/non-technical flows that power Foreon Network’s platform.
Smart Contract Overview
Foreon Network’s smart contract is designed to enable the creation and settlement of prediction markets in a decentralized and trustless manner.
The smart contract governs the behavior of the market, including market rules, settlement mechanisms, and reward distribution.
The following sections delve deeper into the various components of our smart contract.
Market Scoring Rules
One key aspect of prediction markets is the market scoring rule, which determines the price of shares for each outcome.
A commonly used scoring rule is the logarithmic market scoring rule (LMSR). The LMSR is defined as follows:
C(q) = b * ln(sum(exp(q_i/b)))
where q
is the vector of shares for all outcomes, q_i
is the number of shares for outcome i
, b
is a liquidity parameter, and C
represents the cost function. The price of a share in outcome i
can be derived from the cost function as follows:
p_i = ∂C/∂q_i
Technical Flows
1: Market Creation: A user creates a market by submitting market parameters, such as the event to be predicted, possible outcomes, and trading fees, to the smart contract.
These parameters are stored in the smart contract’s state variables, ensuring that they are immutable and transparent.
For example, when a user creates a market for a sports match, they may specify the following parameters:
- Event: “Team A vs. Team B”
- Possible outcomes: “Team A wins”, “Team B wins”, “Draw”
2: Trading: Traders buy and sell shares in the market by interacting with the smart contract. The smart contract keeps track of the number of shares and the funds associated with each trade. When a trader places an order, the smart contract calculates the cost of the order using the market scoring rule and updates the state variables accordingly.
For instance, if a trader wants to buy 10 shares in outcome “Team A wins”, the smart contract would calculate the cost of the order using the LMSR, deduct the corresponding funds from the trader’s wallet, and update the shares vector q
.
3: Settlement: The smart contract determines the outcome of the event based on the settlement mechanism specified in the market parameters. It then distributes rewards to the traders based on their positions. The reward distribution can be calculated using the following formula:
R_i = p_i_final * q_i
where R_i
is the reward for outcome i
, p_i_final
is the final price of the share for outcome i
, and q_i
is the number of shares for outcome i
. This formula ensures that traders who correctly predicted the outcome receive rewards proportional to their share holdings.
4: Dispute Resolution: If the event’s outcome is disputed, the smart contract calls upon the Oracle to determine the correct outcome. The Oracle provides information to the smart contract, which is then used to settle the market and distribute rewards. The Oracle’s decision is determined by a consensus mechanism, such as a weighted majority vote by arbitrators who have staked their own cryptocurrency as collateral.
Non-Technical Flows
- User Onboarding: Users sign up and create an account on the platform. They must provide personal information such as their name, email address, and wallet address. The onboarding process is designed to be simple and user-friendly, allowing users to quickly start participating in prediction markets.
- Market Selection: Users browse the available markets on the platform and choose which ones to participate in based on their interests and predictions. Markets are organized into categories, such as sports, politics, and finance, making it easy for users to find markets that align with their preferences.
- Trading Strategies: Traders develop trading strategies based on their analysis of the event being predicted and the market parameters. They may buy and sell shares in a market based on their predictions and the potential rewards. Traders can use various tools, such as historical data, market trends, and external information, to make informed decisions.
- Rewards Distribution: After the market is settled, traders receive rewards in their wallet. They can then withdraw their rewards to their own wallet or continue trading on the platform. The rewards distribution process is automated and secure, ensuring that traders receive their fair share of profits.
- Dispute Resolution Participation: In cases where the outcome of the event is disputed, users can participate in the Oracle process by staking their own cryptocurrency. They can also provide input and evidence to support their position in the dispute. The dispute resolution process is designed to be transparent and decentralized, ensuring that the final outcome is accurate and fair.
- Platform Updates and Enhancements: As the Foreon Network platform evolves, new features and improvements will be implemented to enhance the user experience and support the growth of the prediction market ecosystem. User feedback plays a crucial role in shaping the platform’s development roadmap, ensuring that Foreon Network continues to meet the needs of its users.
In this first edition of Foreon Network’s Development Update, we’ve provided an in-depth look at the technical and non-technical aspects of our decentralized prediction market platform.
Our commitment to transparency and continuous improvement will help drive the success of the platform and the wider adoption of decentralized prediction markets.
Stay tuned for future updates as we continue to build and refine the Foreon Network platform by joining our Telegram Group and following us on Twitter.