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

# Using the Assertions Book

> Learn how to use the Assertions Book as a catalog of assertion patterns and a set of exploit case studies

The Assertions Book has two jobs:

* **Reference**: a catalog of reusable assertion patterns you can adapt to your own protocol
* **Explanation**: case studies that explain how real exploits worked and why specific assertions would have blocked them

Use this section when you want examples and inspiration. If you want a guided path for writing and deploying assertions, start in the [Credible Layer docs](../credible/credible-introduction).

Each entry shows code snippets of assertions accompanied by minimal interfaces for the protocols they protect.

Full examples and mock protocol code are available in [credible-std](https://github.com/phylaxsystems/credible-std/tree/master/examples/assertions-book).

## How to Use This Book

<CardGroup cols={2}>
  <Card title="Browse Assertion Patterns" icon="book-open" href="./assertions/use-cases-index">
    Use the reference catalog when you already know the type of risk you want to cover.
  </Card>

  <Card title="Study Real Exploits" icon="bug" href="./previous-hacks/prev-hacks-index">
    Use the case studies when you want to understand why an exploit worked and what assertion would have stopped it.
  </Card>

  <Card title="See Full Protocol Suites" icon="sitemap" href="./assertions/aave-v3-suite">
    Review deeper examples that show how assertion coverage can be shaped for a real protocol.
  </Card>

  <Card title="Start Building" icon="rocket" href="../credible/pcl-quickstart">
    Leave the book and follow a tutorial when you want to build your own assertion from scratch.
  </Card>
</CardGroup>

If you have questions or issues, please reach out on telegram [@phylax\_credible\_layer](https://t.me/phylax_credible_layer).

If you think an assertion is missing, please don't hesitate to open a PR or reach out. We love digging into new hacks and use cases and writing assertions for them!

## Book Structure

This book is organized into three sections:

### Part 1: Protocol Case Studies

Explanation pages that show how comprehensive assertion coverage can be designed for real systems.

**[View real world protocol suites →](./assertions/aave-v3-suite)**

### Part 2: Previous Hacks

Explanation pages that analyze real-world DeFi hacks and show how assertions could have prevented them.

**[View the previous hacks analysis →](./previous-hacks/)**

### Part 3: Assertion Patterns

Reference pages that catalog reusable assertion patterns by security category.

**[View the complete use cases catalog →](./assertions/)**

All sections include assertion code examples, explanations of the vulnerability or pattern being addressed, and minimal protocol interfaces for context.
