# Smart Contract Logic

## **Stage 1 Logic**:

* **Oracle Node Reports**: When a user submits an outcome report, the smart contract records the data on-chain. Each submission is weighed equally, and a consensus is reached based on the majority of submissions.
* **Resolution Process**: Polyquest has the ability to either initiate the outcome to the contract or deny it, ensuring balance between user-generated data and the platform's oversight.
* **Reward Distribution**: Once the outcome is confirmed, participants who submitted accurate reports are rewarded automatically via the contract.

## **Stage 2 Logic**:

* **Validator Proposal Review**: After the oracle nodes propose an outcome, the governance group reviews the outcome through their delegated role. The smart contract facilitates the approval or rejection of the outcome.
* **Validator Rewards**: Platform fees are distributed to validators based on their participation and contribution to the validation process.

## **Stage 3 Logic**:

* **Oracle as a Service**: The smart contract provides an API that external DApps can call to receive oracle data, which is submitted and validated by the decentralized oracle network.
* **Chain Forking**: The smart contract enables other DApps to either build directly on the Polyquest Oracle Chain or fork the chain to customize it for their own use cases.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.polyquest.xyz/prediction-oracle/smart-contract-logic.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
