# BONE PIT — Whitepaper

**Version 1.0**

*10,000 fighters. One pit. The game is on-chain.*

---

## 1. Abstract

Bone Pit is a collection of 10,000 NFT warriors that doubles as a fully on-chain PvP tournament. Each NFT is not a static image — it is a fighter with a power score, three lives, and a combat record that lives in the smart contract. After minting, fighters enter a 48-hour arena where they duel, grow stronger, kill, fall, and compete for an ETH prize pool the project creator can never access.

The artwork is stored on IPFS. The **game** — power, combat, matchmaking, randomness, lives, bounties and the prize pool — runs entirely in an Ethereum smart contract. Bone Pit's innovation is not on-chain art; it is an on-chain *game* with real stakes and provable fairness.

---

## 2. The Problem

The overwhelming majority of NFTs do nothing after mint. The buyer receives an image, the price chart moves, and the asset sits idle in a wallet. "Utility" is usually a promise about the future rather than something the contract actually does.

Bone Pit takes the opposite approach: the utility *is* the contract. The moment the battle phase begins, every fighter has a measurable, evolving on-chain state and a direct path to a prize pool. Nothing is promised for "later" — the game is the product.

---

## 3. What Is Bone Pit

Bone Pit is two things at once:

- **An NFT collection** — 10,000 pixel-art warriors, including 20 hand-made 1/1 Avatars.
- **An on-chain tournament** — a single 48-hour PvP event in which those warriors fight for a locked ETH prize pool.

A complete run has three stages: a 24-hour **mint phase**, a 48-hour **battle phase**, and a 3-day **claim window**. When it ends, every NFT permanently carries the record of how it performed.

---

## 4. The Collection

- **Supply:** 10,000
- **Chain:** Ethereum L1
- **Artwork:** pixel-art, stored on IPFS
- **Metadata:** dynamic — the `tokenURI` combines the IPFS image with the fighter's **live on-chain stats** (power, lives, wins, kills, status). An NFT's metadata changes as it fights.

Every fighter belongs to one of six power tiers, determined at mint:

| Tier | Power | Count | Share |
|---|---|---|---|
| Recruit | 30–45 | 2,500 | 25% |
| Soldier | 46–65 | 5,000 | 50% |
| Veteran | 66–80 | 1,800 | 18% |
| Champion | 81–92 | 600 | 6% |
| Warlord | 93–99 | 80 | 0.8% |
| **Avatar** | **100** | **20** | **0.2%** |

The 20 Avatars are unique, hand-illustrated 1/1s and the only fighters that begin at maximum power.

---

## 5. Minting

- **Price:** 0.005 ETH
- **Mint phase:** 24 hours, public
- **Limits:** 3 per transaction; 3 per wallet

Power is assigned by **random draw at mint** — no buyer can preview or cherry-pick a roll. The result is revealed roughly 30 seconds after minting. Power is a visible trait, but the *draw* is unpredictable and tamper-proof.

---

## 6. Power System

Power is a fighter's core stat. It drives every duel and grows or decays based on results. It starts in the 30–100 range and is capped at 100. Losses decay power by 1, but never below the fighter's **personal floor of `max(1, mintPower − 5)`** — so an unlucky Recruit can still climb back after revival, and an underdog comeback is always mechanically possible. Power is the input to combat, but it never *guarantees* a result — the dice always have a say.

---

## 7. The Arena: Joining & Matchmaking

To compete, an owner **opts in** before the battle phase begins. Opt-in is a single transaction that enrolls the fighter and funds a gas deposit. From that point, a decentralized keeper (Gelato Network) handles execution — the player does not sign every duel.

- The **roster locks** when the battle phase starts. No late entries.
- Minted NFTs that never opt in simply do not compete — no penalties, a pristine record.
- Matchmaking is **random**. There is no challenge board; opponents cannot be hand-picked.
- A fighter never faces another NFT owned by the same wallet.
- Any two specific NFTs may duel each other at most twice.
- Each fighter has a 5-minute cooldown between duels.

While enrolled, a fighter is either **in the arena** (the keeper keeps matching it) or **withdrawn** (paused and protected — see the Coward Tax).

---

## 8. Combat

Duels are free. When two fighters are matched, each rolls a d100. The roll maps to an outcome multiplier with the following distribution:

| Outcome | Roll range (when crit = 6%) | Probability | Multiplier |
|---|---|---|---|
| Miss | 1–5 | 5% | ×0.25 |
| Weak | 6–15 | 10% | ×0.6 |
| Normal | 16 – (90 − crit) | ~69% | ×1 |
| Strong | (90 − crit + 1) – (100 − crit) | 10% | ×1.5 |
| Critical | (100 − crit + 1) – 100 | crit% | ×4 |

**Effective score = power × multiplier.** The higher score wins; the loser loses one life. In the rare event of an exact tie, a bit of the duel's randomness decides the winner.

Critical chance is not fixed — it rewards the underdog:

> **Crit chance = 6% + (opponent's power − your power) × 0.15**, applied only when you are the weaker fighter, capped at 15%.

The larger the power gap, the better the weaker fighter's chance of a ×4 critical. A Recruit can drop a Warlord. Power is an advantage, never a guarantee.

**Example.** A Recruit (power 35) is matched against an Avatar (power 100). The 65-point gap caps the Recruit's crit at 15%. The Avatar rolls Normal → 100. The Recruit rolls Critical → 35 × 4 = 140. The Recruit wins, takes a life, and earns a Giant Slayer bonus.

---

## 9. Lives, Death & Revival

Every fighter has **3 lives**. Each duel loss costs one life. At zero lives, a fighter becomes **FALLEN** and is eliminated; the opponent who took the final life is credited with a **kill**.

A FALLEN fighter may be **revived once**:

- **0.005 ETH → 1 life** · **0.010 ETH → 2 lives**
- Power is restored to its value at the moment of death.
- The fighter gains the permanent **REVIVED** trait.
- Revival fees are split **75% to the creator, 25% to the prize pool**.

---

## 10. Progression

Results reshape a fighter over the course of the battle:

| Event | Effect |
|---|---|
| Win a duel (vs equal/weaker) | +1 power |
| Win a duel (vs stronger) | +2 power |
| Kill — eliminate equal/weaker opponent | +3 power |
| Kill — eliminate stronger opponent (gap < 20) | +4 power |
| Giant Slayer — eliminate opponent stronger by ≥ 20 power | +5 power + 3× kill bounty |
| Lose a duel | −1 power, −1 life |

A fighter already at power 100 cannot climb further; each win there is recorded as an extra win instead. Power is floored at `max(1, mintPower − 5)`; losses cannot push a fighter below five points under its mint power.

---

## 11. Kill Bounties

A separate **bounty reserve** (10% of mint revenue) pays ETH for kills:

- **0.0003 ETH** per kill
- **0.0009 ETH** for a Giant Slayer kill (3×)

Bounties are paid to whoever lands the eliminating blow and are funded entirely from the reserve. The reserve is sized so it cannot be drained before the tournament ends; any surplus rolls into the next-edition pool.

---

## 12. The Coward Tax

To keep the pit aggressive, hiding is penalized. The Coward Tax is based on the **cumulative time a fighter spends withdrawn** during the 48-hour battle:

| Withdrawn (cumulative) | Penalty |
|---|---|
| 6 hours | −1 power |
| 12 hours | −3 power + removed from prize-pool eligibility |
| 18 hours | −5 power + becomes a 2× bounty target |

Penalties cap at −5 power and apply as a **temporary deduction to combat power** — the fighter's stored power stat is not changed, only the effective number used inside a duel. A fighter that stays in the arena but simply isn't matched is **not** taxed — only deliberate withdrawal counts. The clock runs uniformly from the start of the battle for every roster member.

---

## 13. The Prize Pool

The prize pool is **20% of all mint revenue**, plus 25% of every revival fee. During the battle and the 3-day claim window, it is held in a contract bucket payable **only** to verified category winners.

At the end of the battle, the pool is distributed across five categories. Winners are determined by **on-chain leader tracking**:

| Category | Share | Winner |
|---|---|---|
| Most Wins | 35% | Highest win count |
| Giant Slayer | 25% | Most Giant Slayer kills |
| Win Streak | 15% | Longest win streak |
| Biggest Climb | 15% | Highest peak power reached, minus mint power |
| Lucky Survivor | 10% | Random, among eligible fighters still alive |

To be eligible for any category a fighter must have completed **at least 5 duels**. Exclusion is **per NFT** — a single NFT can win at most one category; the contract cascades down a top-3 leader list for that category, then leaves the slot unfilled if no eligible alternate exists. Ties split the category prize equally.

**Example at full mint** (10 ETH pool): Most Wins ≈ 3.5 ETH · Giant Slayer ≈ 2.5 ETH · Win Streak ≈ 1.5 ETH · Biggest Climb ≈ 1.5 ETH · Lucky Survivor ≈ 1.0 ETH.

Note that Avatars (power 100) cannot win Biggest Climb — there is no room to climb. Avatars **can** win Giant Slayer, though it is much harder as crit chance does not scale up for them. The category design naturally spreads rewards between strong fighters and underdogs.

Winners call `claimPrize()` within a **3-day window**. After that window closes, any unclaimed prize money and any remaining bounty reserve transfer to a creator-controlled treasury that seeds future Bone Pit editions.

---

## 14. Fairness & Security

Bone Pit is built so that no party — including the creator — can tilt the outcome.

- **Randomness:** duels use future-blockhash randomness. No private RNG, no VRF dependency, and outcomes cannot be predicted at the time a duel is committed.
- **Locked funds during the contest:** mint revenue is split into three contract buckets — a creator bucket (withdrawable), and prize-pool and bounty buckets that are **locked to players** for the full battle and the 3-day claim window. The creator cannot touch prize money while winners are still able to claim it. After the claim window closes, unclaimed amounts transfer to a creator-controlled treasury for future editions; players who claim within the window are paid in full.
- **Random matchmaking:** opponents cannot be selected, so wins cannot be farmed or fed.
- **Anti-collusion:** no self-matching, a 2-duel cap per pair, and an 8-duel minimum for pool eligibility.
- **NFT-bound state:** all state — power, lives, record, coward-tax timer, prize rights — is bound to the token ID. Transferring an NFT carries its full history with it; nothing is reset or escaped by trading.
- **Trade safety:** transfers are locked only while a duel is mid-resolution, so a buyer can never inherit a surprise loss.
- **Multi-keeper redundancy:** matchmaking execution is not bound to a single off-chain service. The contract maintains an owner-managed allowlist of keepers — typically a primary automation provider (Gelato), a backup provider, and a manual failsafe wallet — any of which can drive the arena. A single keeper outage cannot freeze the tournament.

**Mint randomness disclosure.** Mint outcomes are derived from a combination of `block.prevrandao`, `blockhash(block.number − 1)`, `msg.sender`, the token id, and a per-mint slot — fed through `keccak256` and then through a lazy Fisher-Yates draw over the unallocated metadata pool. A validator that controls a block can influence `prevrandao` but cannot predict the upcoming Fisher-Yates slot mapping, and at a 0.005 ETH mint price the expected gain from biasing a single mint is far below the cost of forfeiting a validator slot. For these economics, future-block entropy is considered sufficient. Future editions with higher value-at-stake may upgrade to commit-reveal mint.

---

## 15. NFT Lifecycle & Provenance

A fighter moves through clear states: **Active → Withdrawn → Fallen → Revived → Eternal.** Fighters still alive when the battle ends become **Eternal**; those at zero lives remain **Fallen**.

These outcomes are written permanently into the NFT. Long after the tournament, the artwork and metadata still tell the fighter's story — how many it beat, how many it killed, how far it climbed, and how it ended. The record is the collectible.

---

## 16. Economy & Fund Allocation

At full mint, 10,000 × 0.005 ETH = **50 ETH**:

| Allocation | Share | Amount |
|---|---|---|
| Creator | 70% | 35 ETH |
| Prize pool | 20% | 10 ETH (+ revival fees) |
| Bounty reserve | 10% | 5 ETH |

Each allocation lives in its own bucket. The prize-pool and bounty buckets are locked at the contract level and can only flow to players.

---

## 17. Timeline

1. **Phase 0 — Build:** artwork, smart contract, testnet, audit.
2. **Phase 1 — Mint:** 24 hours, public. Opt-in opens.
3. **Phase 2 — Battle:** 48-hour on-chain arena. Roster locked.
4. **Phase 3 — Claim:** 3-day window for winners to claim.
5. **Future editions:** surplus bounty and unclaimed prizes seed the next Bone Pit pool.

---

## 18. Technical Architecture

- **Standard:** ERC-721 on Ethereum L1, with ERC-2981 royalties and ERC-4906 metadata updates so marketplaces reflect live stats.
- **Automation:** Gelato Network keepers execute matchmaking and duel resolution. A one-time gas deposit per fighter funds this; keepers batch operations for efficiency, and players can top up.
- **Randomness:** future-blockhash, resolved by the keeper within the valid block window.
- **Storage:** artwork on IPFS (pinned); stats and game state fully on-chain; `tokenURI` generated to merge the two.

---

## 19. Risks & Disclaimers

Bone Pit is a game of skill and chance, not an investment product. NFTs are not securities and carry no promise of profit or return. Participation costs ETH; duel outcomes involve randomness; you may lose duels, lives, and your fighter, and you may not win any prize. Smart contracts carry inherent risk despite testing and audit. Nothing here is financial advice. Understand the mechanics and only spend what you can afford to lose.

---

## 20. The Pit

Most NFTs ask you to wait. Bone Pit asks you to fight. Mint a warrior, send it into the arena, and find out what it's made of — on-chain, provably fair, and recorded forever.

**🦴 BONE PIT**
