> For the complete documentation index, see [llms.txt](https://docs.firelight.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.firelight.finance/protocol-architecture.md).

# Protocol Architecture

This section documents the protocol's components: the on-chain contracts, the off-chain services, and the liquidation pipeline that executes payouts.

### What you'll find here

* [On-Chain Components](https://docs.firelight.finance/protocol-architecture/on-chain-components.md) covers the smart contracts stakers, program operators, and the Risk Consortium interact with directly.
* [Off-Chain Components](https://docs.firelight.finance/protocol-architecture/off-chain-components.md) covers the services that monitor risk, match orders, and drive liquidation execution.
* [Claims Liquidation](https://docs.firelight.finance/protocol-architecture/claims-liquidation.md) walks through the payout waterfall, liquidation sizing, and post-payout recovery.

{% hint style="info" %}
A deeper technical treatment of the vault contract surface is maintained separately and will be added once finalized. The MVP-relevant vault model is described in [Core Concepts → Vault Architecture](https://docs.firelight.finance/core-concepts/vault-architecture.md).
{% endhint %}

### How the pieces fit together

Firelight separates responsibilities between contracts and supporting services:

* **Contracts** handle things that must be transparent, immutable, or atomic: capacity publication, coverage issuance, the on-chain incident record, vote tallying, slashing instructions, and fund movements.
* **Supporting services** handle things that depend on large data inputs or rapidly changing conditions: real-time risk monitoring, premium pricing, order matching at period boundaries, execution sizing for liquidation, and custody-policy enforcement.

This separation is designed so that anyone reading on-chain state can verify outcomes (coverage active, incidents validated, payouts executed) even though some supporting computations happen elsewhere. Supporting services publish their outputs on-chain where they are material (for example, the Cover Registry's capacity and rates).

### Trust assumptions

| Component                 | Trust assumption                                                                                                                                                                                                                                              |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Smart contracts           | Deployed on Flare mainnet with verified source. The vault, CoverNFT, CoverOrderAllocator, IncidentManager and VaultRewardDistributor are upgradeable proxies. Upgrades are restricted to a protocol multisig. Audit coverage is listed in Audits and Security |
| Cover Registry parameters | Produced off-chain, written on-chain. Trust in the off-chain monitoring/pricing services and the authorities that can update the registry                                                                                                                     |
| Matching engine           | Runs off-chain. Output is visible on-chain (which orders matched at what amounts and premium)                                                                                                                                                                 |
| First-Loss Buffer         | Custodial wallet held by the Network                                                                                                                                                                                                                          |
| Liquidation service       | Runs off-chain with on-chain settlement. Slashed collateral routes into a permissioned execution pipeline                                                                                                                                                     |
| Risk Consortium           | Independent of the Network and commercial counterparties. Conflicts declared on-chain. 3-of-5 quorum enforced                                                                                                                                                 |
| Firelight Network         | Holds treasury and engages service providers. Does not direct consortium votes or end-user payouts                                                                                                                                                            |

Where on-chain verification is practical, the protocol uses it. Where it is not (for example, complex risk monitoring), off-chain outputs are signed and written to the relevant contracts.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.firelight.finance/protocol-architecture.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
