> ## Documentation Index
> Fetch the complete documentation index at: https://docs.delphai.io/llms.txt
> Use this file to discover all available pages before exploring further.

# FAQ

> Frequently asked questions about delphAI oracle

## General Questions

<AccordionGroup>
  <Accordion title="What is delphAI?" icon="circle-question">
    delphAI is an AI-powered onchain oracle that automatically resolves prediction markets. We use artificial intelligence running in Trusted Execution Environments (TEE) to fetch data, analyze it, and determine market outcomes without human intervention.

    We **only** resolve markets - we don't run prediction market platforms. Platforms integrate our oracle to get automated, trustless resolution.
  </Accordion>

  <Accordion title="How does delphAI work?" icon="gears">
    1. A prediction market platform requests resolution from delphAI
    2. At the scheduled time, our AI (running in TEE) activates
    3. AI fetches data from specified sources
    4. AI analyzes data against resolution criteria
    5. AI submits the outcome onchain with cryptographic proof
    6. Platform receives the result and handles payouts

    All resolution logic runs in secure hardware (TEE), making it tamper-proof.
  </Accordion>

  <Accordion title="What can I do with delphAI?" icon="lightbulb">
    If you're a **developer**: Integrate delphAI into your prediction market platform for automated resolution

    If you're a **user**: Use prediction market platforms that integrate delphAI for trustless, automated outcomes

    If you're a **researcher**: Study our open-source AI logic and TEE implementation
  </Accordion>

  <Accordion title="Which blockchains does delphAI support?" icon="link">
    delphAI is being deployed on:

    * Ethereum
    * Polygon
    * Arbitrum
    * Base

    More chains coming soon. Check the latest deployment addresses in our [contracts overview](/contracts/overview).
  </Accordion>
</AccordionGroup>

## Technical Questions

<AccordionGroup>
  <Accordion title="What is a TEE (Trusted Execution Environment)?" icon="microchip">
    A TEE is a secure area of a processor that provides hardware-level isolation and encryption. It guarantees:

    * **Code Integrity**: Nobody can modify the AI code running inside
    * **Data Confidentiality**: Data processed inside TEE is encrypted
    * **Attestation**: Cryptographic proof that genuine code is running in genuine hardware

    We use Intel SGX and AMD SEV for TEE security.
  </Accordion>

  <Accordion title="How do I verify resolutions are trustworthy?" icon="shield-check">
    Every resolution includes:

    1. **TEE Attestation**: Cryptographic proof the resolution came from secure hardware
    2. **Code Hash**: Identifier of the exact AI version that resolved
    3. **Data Proofs**: Evidence of data sources queried and responses received
    4. **Timestamp**: When resolution occurred

    You can verify all of this independently. See [Security Overview](/security/overview) for details.
  </Accordion>

  <Accordion title="What data sources can delphAI access?" icon="database">
    delphAI can query any publicly accessible data source:

    * **Crypto Prices**: CoinGecko, CoinMarketCap, DEX APIs
    * **Sports**: ESPN, official league APIs, The Sports DB
    * **Weather**: OpenWeatherMap, NOAA
    * **Financial**: Yahoo Finance, Alpha Vantage
    * **Onchain Data**: Etherscan, The Graph, blockchain data
    * **News/Events**: Official sources, Reuters, AP

    You specify data sources in your resolution criteria.
  </Accordion>

  <Accordion title="How accurate is the AI?" icon="bullseye">
    Resolution accuracy depends on:

    1. **Criteria Clarity**: Well-defined criteria = higher accuracy
    2. **Data Sources**: Reliable sources = better results
    3. **Question Objectivity**: Objective questions easier to resolve

    The AI includes a confidence score (0-100) with each resolution. We recommend only accepting resolutions with 95%+ confidence.
  </Accordion>

  <Accordion title="What happens if the AI is unsure?" icon="question">
    If the AI's confidence score is below the threshold:

    * Resolution is not automatically submitted
    * Market is flagged for review
    * Platform can implement dispute/manual resolution fallback
    * Resolution can be retried after more data is available

    You set the confidence threshold in your integration.
  </Accordion>

  <Accordion title="How much does it cost to use delphAI?" icon="dollar-sign">
    Costs include:

    * **Resolution Fee**: Small fee per market resolution (TBA)
    * **Gas Costs**: Standard Ethereum gas for transactions
    * **Platform Fees**: Any fees your platform charges users

    Pricing details will be announced before mainnet launch.
  </Accordion>
</AccordionGroup>

## Integration Questions

<AccordionGroup>
  <Accordion title="How do I integrate delphAI into my platform?" icon="plug">
    Basic integration steps:

    1. Deploy your prediction market contract
    2. Call `delphAI.createMarket()` with creation fee when creating markets
    3. Store the returned marketId
    4. Poll `delphAI.getMarket(marketId)` to check resolution status
    5. When resolved, use the outcome to distribute winnings on your platform

    See our [Quickstart Guide](/quickstart) for detailed instructions.
  </Accordion>

  <Accordion title="Do I need to run any infrastructure?" icon="server">
    **No!** delphAI handles all infrastructure:

    * TEE servers
    * AI execution
    * Data fetching
    * Onchain submission

    You just interact with our smart contract.
  </Accordion>

  <Accordion title="Can I test before going live?" icon="flask">
    Yes! We provide testnet deployments on:

    * Sepolia
    * Mumbai (Polygon)
    * Arbitrum Sepolia
    * Base Sepolia

    Test your full integration before mainnet launch.
  </Accordion>

  <Accordion title="What smart contract interface do I need to implement?" icon="file-contract">
    You don't need to implement any interface! Simply call delphAI functions:

    ```solidity theme={null}
    interface IDelphAI {
        function createMarket(
            string memory question,
            string memory description,
            string[] memory possibleOutcomes,
            uint256 resolutionTimestamp
        ) external payable returns (uint256);

        function getMarket(uint256 marketId) external view returns (Market memory);
        function marketCreationFee() external view returns (uint256);
    }
    ```

    See [Oracle Contract](/contracts/oracle-contract) for full API.
  </Accordion>

  <Accordion title="Can I use delphAI for non-prediction market use cases?" icon="lightbulb">
    Yes! While designed for prediction markets, delphAI can resolve any binary or multiple-choice question:

    * Insurance payouts (e.g., flight delay insurance)
    * Conditional payments (e.g., milestone-based releases)
    * Automated decision making
    * Data verification

    Any use case requiring trustless, automated oracle resolution.
  </Accordion>
</AccordionGroup>

## Security Questions

<AccordionGroup>
  <Accordion title="Is delphAI safe to use?" icon="shield">
    delphAI implements multiple security layers:

    1. **TEE Security**: Hardware-level code and data protection
    2. **Audited Contracts**: Smart contracts audited by leading firms
    3. **Cryptographic Proofs**: All resolutions include verifiable proofs
    4. **Open Source**: AI logic is transparent and auditable

    See [Security Overview](/security/overview) for complete details.
  </Accordion>

  <Accordion title="What if the TEE is compromised?" icon="triangle-exclamation">
    TEE compromise is extremely difficult but we plan for it:

    * Multiple TEE technologies (Intel SGX, AMD SEV)
    * Attestation verification catches compromised TEE
    * Platforms can reject resolutions from unknown TEE versions
    * Dispute mechanisms for contested resolutions

    Additionally, TEE vulnerabilities are rare and quickly patched by hardware vendors.
  </Accordion>

  <Accordion title="What if data sources go down?" icon="plug-circle-xmark">
    Resolution criteria should specify backup data sources:

    ```
    Primary: CoinGecko API
    Backup: CoinMarketCap API
    Fallback: Retry after 1 hour
    ```

    If all sources fail, resolution is delayed until data is available. Platforms can implement emergency resolution after timeout.
  </Accordion>

  <Accordion title="Can resolutions be disputed?" icon="gavel">
    Yes, platforms can implement dispute mechanisms:

    1. User stakes tokens to dispute resolution
    2. Community reviews the evidence (attestation + proof)
    3. If dispute valid: User gets stake back + reward
    4. If dispute invalid: Stake is slashed

    Dispute logic is implemented by the platform, not delphAI.
  </Accordion>

  <Accordion title="Has delphAI been audited?" icon="magnifying-glass-chart">
    Audits are currently in progress. See [Audits](/security/audits) for status and timeline.

    Upon completion, all audit reports will be published publicly.
  </Accordion>
</AccordionGroup>

## Resolution Criteria Questions

<AccordionGroup>
  <Accordion title="How do I write good resolution criteria?" icon="pen">
    Good resolution criteria must be:

    1. **Specific**: Name exact data sources and APIs
    2. **Clear**: Unambiguous YES/NO or outcome logic
    3. **Timed**: Exact resolution time with timezone
    4. **Complete**: Handle edge cases and failures
    5. **Verifiable**: Based on objective data

    Example:

    ```
    Question: "Will BTC reach $100k by Dec 31, 2025?"
    Source: CoinGecko API at 2025-12-31 23:59:59 UTC
    Logic: If BTC >= $100,000 → YES, else → NO
    Backup: CoinMarketCap if CoinGecko down
    ```

    See [Best Practices](/core-concepts/best-practices) for detailed guide.
  </Accordion>

  <Accordion title="What makes a bad resolution criterion?" icon="xmark">
    Avoid:

    * ❌ Vague questions: "Will BTC do well?"
    * ❌ Subjective criteria: "Will the movie be good?"
    * ❌ No data source: "Check the price"
    * ❌ Ambiguous timing: "End of year"
    * ❌ No backup plan: Single data source with no fallback

    These lead to low confidence scores or resolution failures.
  </Accordion>

  <Accordion title="Can I use subjective criteria?" icon="brain">
    No. delphAI only resolves objective, verifiable questions:

    ✅ "Will BTC price be >= \$100k?" (objective, verifiable)
    ❌ "Will BTC price be 'high'?" (subjective, vague)

    ✅ "Will Lakers win vs Warriors?" (objective, score-based)
    ❌ "Will Lakers play well?" (subjective opinion)

    For subjective decisions, consider using human voting oracles instead.
  </Accordion>

  <Accordion title="How do I handle ties or edge cases?" icon="scale-balanced">
    Define edge case behavior in your criteria:

    **For ties**:

    ```
    If teams have same score → Resolve to TIE outcome
    OR use tiebreaker rules from official source
    ```

    **For exact thresholds**:

    ```
    If price = exactly $100,000 → YES (use >= not >)
    ```

    **For cancelled events**:

    ```
    If game cancelled → Return all funds
    OR postpone until rescheduled game
    ```

    See [Best Practices](/core-concepts/best-practices) for more examples.
  </Accordion>
</AccordionGroup>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Resolution is taking longer than expected" icon="clock">
    Possible reasons:

    1. **Data source delay**: Source hasn't updated yet
    2. **Low confidence**: AI waiting for more data/confirmation
    3. **Network congestion**: Transaction pending in mempool
    4. **Criteria unclear**: AI unsure how to resolve

    Check resolution status with `getResolution(marketId)`. If still pending after expected time, contact support.
  </Accordion>

  <Accordion title="My callback function isn't being called" icon="phone-slash">
    Check:

    1. ✅ Does your contract implement `IPlatformCallback`?
    2. ✅ Is the function marked `external`?
    3. ✅ Is it callable by delphAI oracle address?
    4. ✅ Does it have access control restrictions?
    5. ✅ Is your contract verified on block explorer?

    Test callback manually on testnet before mainnet.
  </Accordion>

  <Accordion title="Resolution confidence is always low" icon="battery-low">
    Low confidence usually means:

    * **Vague criteria**: Make criteria more specific
    * **Unreliable sources**: Use established data providers
    * **Ambiguous question**: Rephrase question clearly
    * **Data unavailable**: Wrong data source or endpoint
    * **Too early**: Resolution time before data available

    Review your resolution criteria and data sources.
  </Accordion>

  <Accordion title="Attestation verification failing" icon="circle-xmark">
    Verify:

    1. You're using the correct attestation verification library
    2. You've approved the code hash for this AI version
    3. Attestation hasn't expired (check timestamp)
    4. TEE address is authorized

    See [Security Best Practices](/security/best-practices) for proper verification.
  </Accordion>
</AccordionGroup>

## Still Have Questions?

<CardGroup cols={2}>
  <Card title="Troubleshooting" icon="wrench" href="/resources/troubleshooting">
    Detailed troubleshooting guide
  </Card>

  <Card title="Telegram Community" icon="telegram" href="https://t.me/delphai_io">
    Join our community for support
  </Card>

  <Card title="Documentation" icon="book" href="/introduction">
    Read the full documentation
  </Card>

  <Card title="GitHub" icon="github" href="https://github.com/delphai-io">
    View code and examples
  </Card>
</CardGroup>
