> ## Documentation Index
> Fetch the complete documentation index at: https://cyfrin.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Welcome to BattleChain

> The pre-mainnet stress testing environment for smart contracts

BattleChain is an incentivized pre-mainnet environment where protocols can stress test their smart contracts with real funds before deploying to production.

## Get Started

<CardGroup cols={3}>
  <Card title="Deploy Your First Contract" icon="rocket" href="/quickstart/deploy-first-contract">
    Protocol? Start here.
  </Card>

  <Card title="Execute Your First Attack" icon="crosshairs" href="/quickstart/execute-first-attack">
    Whitehat? Start here.
  </Card>

  <Card title="Review Your First Request" icon="clipboard-check" href="/quickstart/review-first-request">
    DAO member? Start here.
  </Card>
</CardGroup>

## How It Works

```
Deploy → Request Attack Mode → DAO Approves → Stress Test → Promote to Production
```

1. Protocol deploys contracts via `BattleChainDeployer`
2. Protocol creates a Safe Harbor agreement defining bounty terms
3. Protocol requests attack mode via `AttackRegistry`
4. DAO reviews and approves the request
5. Whitehats attack the contracts legally
6. Protocol promotes to production when confident

## Learn More

<CardGroup cols={2}>
  <Card title="What is BattleChain?" icon="circle-question" href="/explanation/what-is-battlechain">
    Understand the problem BattleChain solves
  </Card>

  <Card title="Contract Lifecycle" icon="diagram-project" href="/explanation/contract-lifecycle">
    Learn about contract states and transitions
  </Card>

  <Card title="Safe Harbor Protection" icon="shield" href="/explanation/safe-harbor">
    Understand legal protections for whitehats
  </Card>

  <Card title="Best Practices" icon="star" href="/explanation/best-practices">
    Guidelines for protocols, whitehats, and the DAO
  </Card>
</CardGroup>
