# Creating a Match

![PvP wager screen](/files/Z7nk5FbMVVjfjuDFtse2)

## Step-by-Step

1. Open **PVP** app.
2. Tap **CREATE MATCH**.
3. Enter your wager amount in SOL (between 0.01 and 10).
4. Confirm — a `pvp_matches` row is created with status `waiting`.
5. Approve the on-chain deposit transaction in your wallet.
   * SOL goes to the treasury wallet (escrow)
   * The TX signature is recorded as `p1_deposit_sig`
6. Wait for an opponent. Your match shows in the lobby for everyone to see.

## Auto-Cancel Protection

If no opponent joins within **5 minutes**, the system auto-cancels your match and refunds your deposit on-chain. You'll get a notification:

> *"PvP match expired — wager refunded. Nobody joined within 5 minutes. Your X SOL wager has been refunded."*

The refund TX signature is included in the notification.

## Manual Cancel

You can cancel a `waiting` match yourself anytime:

1. Open your match in the lobby
2. Tap **CANCEL MATCH**
3. Confirm — status flips to `cancelled` (CAS-guarded), refund auto-fires on-chain

## What If I Create Then Disconnect?

The match stays in `waiting` for up to 5 minutes. If you reconnect within that window, you'll see your match in the lobby. If 5 minutes pass, it auto-cancels and refunds.

## What If I Create Two Matches?

You can't — creating a new match while you have an existing `waiting` match auto-cancels the old one first (and refunds the deposit), then creates the new one. This prevents duplicate lobbies clogging the list.


---

# 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.snake-os.com/pvp-real-sol-wagering/creating.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.
