FactGPT

Leveraging Muon’s infrastructure, this framework allows projects to build custom prediction markets and securely fetch data from off-chain sources and push them on-chain.

Integration Examples

The integration process for building decentralized prediction markets using Muon’s infrastructure can be broken down into a few core steps.

Solidity Example: SimplePredictionMarket.sol

1. On-Chain Market Metadata

Market metadata is stored directly on the contract. This includes essential details like:

  • The event being predicted

  • Outcome options

  • Parameters defining the market

These are hard-coded in the contract, providing transparency and immutability on-chain.

2. Off-Chain Outcome Verification

The outcome of the prediction market is verified off-chain via the Muon. The verification process is handled through a Muon App that integrates with an external data provider, such as ChatGPT, to determine the outcome. The app generates cryptographic proof (Muon Signature) that is then submitted to the blockchain for validation.

  • Off-Chain Component: The off-chain process can be viewed on the Muon Explorer. It interacts with ChatGPT or other AI services to fetch data and compute the result.

  • Flexibility: Projects can build custom Muon Apps to load data from any external source (AIs, public/private APIs, other blockchains, or even perform computations) before generating the proof.

3. Outcome Execution

An executor (this could be a user, project, or Muon itself) submits the proof generated by the Muon protocol to the blockchain via an on-chain transaction to set the outcome of the prediction market.

  • Example Reference: The executor process is implemented here.

4. Dispute Resolution

In the event of a dispute, anyone can initiate a dispute, triggering the creation of a proposal on Snapshot.org to resolve it.

  • Snapshot Integration: A customized Snapshot strategy allows for flexible voting options. The dispute proposal and voting strategy can be adjusted to fit project-specific needs. An example of dispute resolution process can be viewed on Snapshot.

  • Dispute App: For handling disputes, Muon also provides a specialized dispute resolution app, further ensuring the process remains trustless and transparent.

5. Voting:

  • Voting is conducted off-chain but remains permissionless and trustless, with customizable strategies for who can participate.

Solana Example

The integration process for Solana follows the same structure as EVM, with similar steps for creating and verifying decentralized markets. The Solana-specific example can be found here.

Last updated