> For the complete documentation index, see [llms.txt](https://definodal.gitbook.io/definodal/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://definodal.gitbook.io/definodal/prediction-game.md).

# Prediction Game

### Overview

The DeFiNodal prediction game is a fully decentralized game where users can predict BTC/USD price movements using POL tokens. The game leverages Chainlink's decentralized price feeds for accurate and tamper-proof price data, ensuring complete decentralization and transparency.

### Game Mechanics

#### Time Intervals

Users can predict asset prices across multiple time frames:

* 1 minute
* 5 minutes
* 15 minutes
* 1 hour

The countdown begins when the transaction is confirmed. There are no fixed ending periods, and additional intervals may be added or modified in the future.

#### Asset Price Information

The game currently focuses on BTC/USD price predictions, with decentralized price feeds provided  by Chainlink. Users can verify pricing data through the following contract address: 0xc907E116054Ad103354f2D350FD2514433D57F6f on the Polygon network.

Price updates occur every 5-10 seconds, though delays may occur due to:

* Polygon chain congestion
* Chainlink price feed latency

#### Odds and Returns

The odds system determines prediction returns and adjusts dynamically based on betting volume:

* More UP predictions → Lower UP odds, Higher DOWN odds
* More DOWN predictions → Lower DOWN odds, Higher UP odds

Example: If the odds for "UP" are 1.70 and a user places 1 POL, a correct prediction would yield 1.70 POL in returns.

#### How to Place a Prediction

1. Connect your wallet and ensure sufficient POL balance (currently 1 POL per prediction)
2. Select your desired time frame
3. Choose your prediction direction ("UP" or "DOWN")
4. Confirm the transaction in your wallet

### Technical Considerations

#### Slippage Protection

To protect users from unfavorable price movements, the game implements a 5% slippage tolerance:

* Transactions revert if odds change by more than 5% during confirmation
* Transactions revert if BTC/USD price changes by more than 5% between prediction placement and confirmation

#### Price Execution

Important notes about price execution:

* Official BTC/USD price is recorded at transaction confirmation
* Actual execution price may differ from the displayed price at click-time due to:
  * Polygon network congestion
  * BTC price volatility

#### Smart Contract Integration

* All game logic and transactions execute on-chain through smart contracts
* No intermediaries are involved in the process
* Full transparency is maintained through blockchain verification
