# Getting Started

***

### Overview

Prediction markets let you trade on the outcome of real-world events. Instead of trading tokens, you're buying and selling shares that represent the probability of something happening. If you think an event is more likely than the market suggests, you buy. If you think it's less likely, you sell.

**Boba Agents trade prediction markets on Polymarket**, the largest decentralized prediction market platform. Your agent wallet handles all interactions automatically.

**What you can do:**

* Buy and sell shares on event outcomes (politics, sports, crypto, entertainment, and more)
* Trade at market price or place limit orders at a specific probability
* Monitor your positions and track profit/loss
* Research markets with price history, order books, and top holder data
* Browse and discover markets by category, keyword, or volume

***

### How Prediction Markets Work

#### The Basics

1. **Events** contain one or more markets (e.g., "2024 Election" has markets for each candidate)
2. **Markets** are specific questions within an event (e.g., "Will candidate X win?")
3. Each market has **outcome tokens**, typically Yes and No shares
4. Shares are priced between **$0 and $1**, representing the market's estimated probability
5. If the outcome happens, each Yes share pays out **$1**. If not, it's worth **$0**

#### Example

A market asks: "Will BTC hit $150k by June?"

* Yes shares are trading at **$0.35** (market says 35% chance)
* You think it's more likely than 35%, so you **buy 100 Yes shares for $35**
* If BTC hits $150k by June: your shares pay out **$100** (profit: $65)
* If BTC doesn't hit $150k: your shares are worth **$0** (loss: $35)

{% hint style="info" %}
The lower the price you buy at, the higher your potential return if you're right.
{% endhint %}

#### Pricing and Probability

| Share Price | Market Probability | You Buy 100 Shares For | Payout if Correct | Profit |
| ----------- | ------------------ | ---------------------- | ----------------- | ------ |
| $0.10       | 10%                | $10                    | $100              | +$90   |
| $0.25       | 25%                | $25                    | $100              | +$75   |
| $0.50       | 50%                | $50                    | $100              | +$50   |
| $0.75       | 75%                | $75                    | $100              | +$25   |
| $0.90       | 90%                | $90                    | $100              | +$10   |

{% hint style="info" %}
You can also sell shares before the event resolves to lock in a profit or cut a loss, just like trading any other asset.
{% endhint %}

***

### First-Time Setup

Before you can trade on Polymarket, token approvals need to be set. This is a one-time step that authorizes your agent wallet to interact with the Polymarket contracts.

| Prompt                          | Interpretation                             |
| ------------------------------- | ------------------------------------------ |
| "Check my Polymarket approvals" | Checks if your wallet is approved to trade |
| "Approve Polymarket trading"    | Approves all token spending (buy and sell) |
| "Approve buy side only"         | Approves just the buy side                 |

If you get a SETUP\_REQUIRED error, you'll need to sign in at [agents.boba.xyz](https://agents.boba.xyz) first to initialize your account.

Once approved, you're set. No need to approve again unless you revoke permissions.

***

### Key Concepts

| Term              | What It Means                                                                          |
| ----------------- | -------------------------------------------------------------------------------------- |
| **Event**         | A real-world event with one or more markets (e.g., "2024 Election")                    |
| **Market**        | A specific question within an event (e.g., "Will candidate X win?")                    |
| **Outcome Token** | A share representing a specific outcome (Yes or No)                                    |
| **Share Price**   | Current probability as a price between $0 and $1                                       |
| **Payout**        | $1 per share if the outcome occurs, $0 if it doesn't                                   |
| **Condition ID**  | Unique identifier for a market (0x... hash)                                            |
| **Token ID**      | Identifier for a specific outcome token (Yes/No share)                                 |
| **Slug**          | URL-friendly event identifier used in search and browse results                        |
| **Neg Risk**      | Negative risk market where outcomes are complementary (common in multi-outcome events) |

***

### Buy vs Sell Amounts

This is an important distinction:

| Action      | Amount Means     | Example                                  |
| ----------- | ---------------- | ---------------------------------------- |
| **Buying**  | USD to spend     | "Buy $20 worth" spends $20               |
| **Selling** | Number of shares | "Sell 50 shares" sells 50 outcome tokens |

{% hint style="info" %}
Minimum buy is **$1**.
{% endhint %}

***

### Typical Trading Flow

Here's how a typical prediction market trade works from start to finish:

```
1. Find a market
   "Search for bitcoin prediction markets"

2. Check the details
   "Show me the BTC $150k event"
   → See all outcomes, current prices, volume

3. Analyze the market
   "What's the price history on this market?"
   "Show me the order book"
   → Understand the trend and available liquidity

4. Check approvals (first time only)
   "Check my Polymarket approvals"
   → Approve if needed

5. Place your trade
   "Buy $20 of Yes shares"
   → Position opened

6. Monitor
   "Show my Polymarket positions"
   → Track value and PnL over time

7. Exit (optional)
   "Sell my shares" → Exit before resolution
   Or wait for the event to resolve → Automatic $1 payout if correct
```

***
