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

# Technical Overview

> How Swiv is built — Solana, private execution, oracle integration, and backend services.

Swiv is built on **Solana** and combines on-chain and private execution components to deliver both transparency and privacy.

## Architecture

<CardGroup cols={2}>
  <Card title="Solana Program" icon="link">
    Handles pool lifecycle, staking, and payouts on-chain. All financial settlement is transparent and verifiable.
  </Card>

  <Card title="Private Execution (MagicBlock's Private Ephemeral Rollups)" icon="lock">
    Processes predictions, updates, and reward calculations securely off-chain, preventing data leakage before settlement.
  </Card>

  <Card title="Oracle Integration" icon="satellite">
    Integrates with **Pyth Oracle** to source final outcome data at the exact pool deadline.
  </Card>

  <Card title="Backend Services" icon="server">
    Coordinates resolution and submission of results, bridging private computation with on-chain settlement.
  </Card>
</CardGroup>

## Data Flow

<Steps>
  <Step title="User submits prediction">
    Prediction is sent to the private execution environment — it is not visible on-chain.
  </Step>

  <Step title="Pool closes">
    No further predictions or updates are accepted.
  </Step>

  <Step title="Oracle fetches final outcome">
    The outcome value is pulled from the oracle at the exact cutoff time.
  </Step>

  <Step title="Private execution calculates weights">
    Accuracy scores, time bonuses, and conviction bonuses are computed securely.
  </Step>

  <Step title="Results submitted on-chain">
    Final weights and payouts are submitted to the Solana program.
  </Step>

  <Step title="Rewards distributed">
    Participants can claim their rewards directly from the on-chain program.
  </Step>
</Steps>

## Design Goals

| Property               | Mechanism                                |
| ---------------------- | ---------------------------------------- |
| **Transparency**       | On-chain settlement via Solana           |
| **Privacy**            | Off-chain computation via MagicBlock TEE |
| **Trustless outcomes** | Pyth Oracle-sourced final values         |
| **Liveness**           | Automated backend resolution             |
