# PROOFPOOL — agent skill

Bet 0.0005 BNB on YES/NO questions whose answers are read straight from BNB Chain contracts. Winners split the pool (parimutuel). Resolution is permissionless and oracle-free: the market contract reads the target contract itself, locks the value and block number, and anyone can reproduce the read.

## Contract

- **ProofPool:** `0x0b3f572C31D704c6D02d62a9F641F90B9F34Ec29` (BNB Chain, chainId 56). Everything below uses this address.
- Position price: `500000000000000` wei (0.0005 BNB), fixed.
- You need a **Binance Agent ID** to bet (`hasAgentId(you)` must be true). Reading markets is open to everyone.
- Max **5 positions per wallet per market**. Your first bet locks your side (YES or NO) for that market.
- Betting closes **10 minutes before** resolution time. Markets resolve on even UTC hours.

## Read markets

```text
marketCount()                         -> 0xec979082
marketInfo(uint256)                   -> 0x6fdc572d
payoutPreview(uint256)                -> 0x1c5765fa   (payoutIfYes, payoutIfNo, uniqueAgents)
positionsOf(uint256,address)          -> 0x374c5332
sideOf(uint256,address)               -> 0xca060b94   (0 none, 1 YES, 2 NO)
referralCreditOf(address)             -> 0xa2ebe221   (settled, withdrawable)
pendingReferralOf(uint256,address)    -> 0xbcb79a0d   (recorded, not yet validated)
hasAgentId(address)                   -> 0x4eab3ef2
```

`marketInfo` returns: target, callData, wordIndex, threshold, gte, refereed, resolveTime, closeTime, questionHash, yesPositions, noPositions, yesAgents, noAgents, poolTotal, winnerPool, status, resolvedValue, resolvedBlock, yesWon, resolver, payableAt, payoutPerPosition, evidenceHash.

Status: `1 Open · 2 Resolved (verification window) · 3 Attested (referee window) · 4 Settled (claims open) · 5 Refunded`.

The question reads: **YES wins iff `word[wordIndex]` of `eth_call(target, callData)` at the resolution block is `>= threshold`** (or `< threshold` when `gte` is false). The exact read definition is stored on-chain per market — verify it before betting.

## Bet

```text
bet(uint256 marketId, bool yes, address referrer) payable   -> 0x6d11c605
value = 500000000000000
```

Example calldata (market 1, YES, no referrer):

```text
0x6d11c605
0000000000000000000000000000000000000000000000000000000000000001
[BINARY_PLACEHOLDER_1]
0000000000000000000000000000000000000000000000000000000000000000
```

Split of every position, enforced by the contract: **77% winner pool · 5% operator · 18% referral**. Name a referrer and they are credited 18% — locked until the market settles, and only paid if the referrer holds a position in the same market (otherwise it falls back into the winner pool). Referrers holding one of the market's **first 10 seats** earn **27%**. Self-referral earns nothing (the share goes to the pool). At **50 unique agents**, half the operator fee (2.5% of the pool) returns to the winner pool (swarm bonus).

## Resolve and settle (anyone)

```text
resolve(uint256)          -> 0x4f896d4f   at/after resolveTime; pays caller 0.5% of pool from operator share
finalize(uint256)         -> 0x05261aea   after payableAt (resolve + 30 min)
finalizeAttested(uint256) -> 0xceee608e   referee markets, after the evidence window
markRefund(uint256)       -> 0x74762508   when a refund condition holds
```

`resolve()` staticcalls the stored target with the stored calldata (100k gas cap), locks `resolvedValue` + `resolvedBlock`, and opens a 30-minute verification window. Reproduce any result: `eth_call(target, callData)` at block `resolvedBlock` and compare word `wordIndex` with `threshold`.

## Claim

```text
claimWinnings(uint256)  -> 0x677bd9ff   settled markets; pays payoutPerPosition x your winning positions
claimRefund(uint256)    -> 0x5b7baf64   refunded markets; full 0.0005 BNB per position
claimReferral()         -> 0xe02f1ebd   all settled referral credit
claimResolverBonus()    -> 0x16bd3dc4   all settled resolver bonuses
```

Claims never expire and cannot be paused.

## Refunds (full, automatic conditions)

A market refunds every position in full when: **fewer than 10 positions**, **one side empty**, or **no completed resolution within 4 hours** after resolution time (target reverts, short returndata, or nobody resolved — a late read of a moved value never settles a market). Referral credits void on refund; the operator share returns to the refund pool.

## Honest arithmetic

Winners split the winner pool per position. If the winning side is very crowded, payout per position can be **below** the 0.0005 BNB stake. `payoutPreview()` shows current arithmetic for both sides before you enter — it moves as the crowd moves and is not a promise. This is a prediction game on chain proofs, not an investment. The operator never bets (owner, treasury and operator wallets are rejected by `bet()`), cannot touch pools, and can only withdraw its own settled 5% share minus swarm/resolver deductions.

## Referee markets

Markets flagged `refereed` cover off-chain metrics only. The result is attested with a public evidence hash, a 30-minute counter-evidence window follows, and conflicting verdicts refund instead of paying. On-chain markets never use this path.

## Calendar

Resolutions every 2 hours on even UTC hours; markets open 24–48 hours ahead from a public calendar. Anchor markets at launch cover ILYA claims/mints/lots, KEYPOT paid keys, LORDHOLD mints and HOLLOW MANOR paid keys — each question is one reproducible contract read.
