# Lilith Platform Bug Bounty Program

## Program Overview

The Lilith Platform Bug Bounty Program rewards security researchers who discover and responsibly disclose vulnerabilities in our smart contracts.

**Platform:** Immunefi (recommended for DeFi)
**Status:** [DRAFT - Pre-launch]

---

## Scope

### In-Scope Contracts

| Contract | Network | Address |
|----------|---------|---------|
| AccessToken | Mainnet | 0x... |
| ContentLicenseNFT | Mainnet | 0x... |
| CreatorRoyalties | Mainnet | 0x... |
| IdentityReputation | Mainnet | 0x... |

### In-Scope Vulnerability Types

- Theft of funds
- Permanent freezing of funds
- Unauthorized access control
- Governance manipulation
- Flash loan vulnerabilities
- Price oracle manipulation
- Reentrancy attacks
- Denial of service (economic)
- Storage collision in upgrades

### Out of Scope

- Test networks (Sepolia, Goerli)
- Frontend applications
- Off-chain infrastructure
- Third-party contracts (OpenZeppelin, etc.)
- Known issues documented in KNOWN_ISSUES.md
- Issues requiring admin key compromise
- Theoretical issues without proof of concept

---

## Rewards

### Payout Structure

| Severity | Impact | Reward Range |
|----------|--------|--------------|
| Critical | Direct theft of funds, complete system compromise | $50,000 - $100,000 |
| High | Significant fund loss risk, access control bypass | $10,000 - $50,000 |
| Medium | Limited fund impact, logic errors | $2,500 - $10,000 |
| Low | Minor issues, gas griefing | $500 - $2,500 |

### Severity Classification

**Critical:**
- Theft of principal from any user
- Permanent freezing of all funds
- Complete governance takeover
- Upgrade to malicious implementation

**High:**
- Theft of yield/rewards
- Temporary freezing of funds
- Unauthorized role assumption
- Partial governance manipulation

**Medium:**
- Incorrect fee calculations
- Logic errors with limited impact
- Gas griefing attacks
- Access control edge cases

**Low:**
- Gas optimizations (>10% savings)
- Best practice violations
- Non-critical documentation errors
- Minor UI/UX issues in contract interaction

---

## Rules

### Eligibility

- Must be first to report the issue
- Must provide sufficient detail to reproduce
- Must follow responsible disclosure
- Must not exploit the vulnerability
- Must not be sanctioned individual/entity

### Responsible Disclosure

1. **Report immediately** upon discovery
2. **Do not exploit** on mainnet
3. **Do not publicize** before fix deployed
4. **Allow 90 days** for remediation
5. **Coordinate disclosure** with Lilith team

### Disqualifying Actions

- Exploitation on mainnet
- Unauthorized data access
- Denial of service attacks
- Social engineering of staff
- Public disclosure before fix
- Automated scanning causing disruption

---

## Submission Process

### Step 1: Submit Report

Submit via Immunefi with:
1. Vulnerability description
2. Attack vector
3. Proof of concept (testnet only)
4. Impact assessment
5. Suggested fix (optional)

### Step 2: Initial Triage

- **Response time:** 24 hours
- **Severity assessment:** 48 hours
- **Status update:** Weekly minimum

### Step 3: Verification

- Reproduce on testnet
- Confirm severity
- Develop fix
- Test remediation

### Step 4: Payment

- Upon confirmed fix deployment
- Wire transfer or crypto (ETH/USDC)
- Tax documentation required (>$600)

---

## Program Timeline

| Phase | Duration | Scope |
|-------|----------|-------|
| Private Bounty | 2 weeks pre-launch | Invited researchers |
| Public Bounty | Launch onwards | All researchers |
| Ongoing | Indefinite | Continuous |

### Private Bounty Phase

- Invite 10-15 trusted researchers
- Higher rewards (1.5x public rates)
- Extended response window
- Pre-launch vulnerability discovery

### Public Bounty Phase

- Open to all researchers
- Standard reward rates
- Standard response times
- Continuous operation

---

## Contact

**Security Contact:** security@lilith.io
**PGP Key:** [Available on website]
**Immunefi Profile:** [Link to be added]

---

## Hall of Fame

Researchers who help secure the Lilith Platform:

| Researcher | Finding | Reward | Date |
|------------|---------|--------|------|
| *To be populated* | | | |

---

## Legal

### Safe Harbor

Lilith Platform commits to not pursue legal action against researchers who:
- Follow responsible disclosure
- Act in good faith
- Avoid privacy violations
- Avoid disruption to users

### No Liability

- Program rewards are discretionary
- Lilith reserves right to modify terms
- Payment conditional on compliance
- Disputes subject to arbitration

---

## FAQ

**Q: Can I test on mainnet?**
A: No. All testing must be on Sepolia testnet.

**Q: What if I find a Critical during private bounty?**
A: Report immediately. We may pause launch to address.

**Q: Are governance attacks in scope?**
A: Yes, but admin key compromise is out of scope.

**Q: Can I report issues in OpenZeppelin?**
A: Report to OpenZeppelin directly. Lilith-specific usage issues are in scope.

**Q: How are duplicate reports handled?**
A: First valid report receives full reward. Duplicates receive no reward.

**Q: What about issues in paused state?**
A: Vulnerabilities only exploitable when paused are Low severity.

---

## Version History

| Version | Date | Changes |
|---------|------|---------|
| 0.1 | [DATE] | Initial draft |

---

*This document will be published on launch with actual contract addresses.*
