# Concepts — IPFS & Collector

Key concepts for the Indigo Protocol IPFS storage and collector fee distribution systems.

## IPFS (InterPlanetary File System)

IPFS is a distributed, peer-to-peer storage network. In the Indigo Protocol context, IPFS is used to store text content that can be referenced on-chain via content identifiers (CIDs).

### Content Identifiers (CIDs)

A CID is a unique hash derived from the content itself. This means:
- The same content always produces the same CID
- Content cannot be modified once stored (immutability)
- Anyone with the CID can verify the content's integrity

CIDs typically follow one of two formats:
- **CIDv0:** Starts with `Qm` (e.g., `QmX7b2K9fN3pRtA8vYz1wE4cD6hG5jL0...`)
- **CIDv1:** Starts with `bafy` (e.g., `bafybeigdyrzt5sfp7udm7hu76uh7y26nf3...`)

### Use Cases in Indigo

- **Governance proposals:** Store proposal descriptions for immutable on-chain reference
- **Position snapshots:** Archive CDP or staking position data for auditing
- **Protocol documentation:** Store versioned protocol parameter documentation
- **Metadata storage:** Attach immutable metadata to on-chain transactions

## Collector

The collector is a protocol component that accumulates fees generated by various Indigo Protocol operations.

### Fee Sources

Protocol fees flow into the collector from:
- **CDP operations:** Opening, closing, minting, and burning CDPs generate protocol fees
- **Liquidations:** Fees collected during CDP liquidation events
- **Redemptions:** Fees from iAsset redemption operations
- **Interest accrual:** Interest payments on CDP positions

### Collector UTXOs

Fees accumulate in collector UTXOs on the Cardano blockchain. Each UTXO represents a discrete bundle of collected fees and may contain:
- **ADA:** The native Cardano currency
- **iAssets:** Synthetic assets (iUSD, iBTC, iETH, iSOL)
- **INDY:** The Indigo governance token

### Fee Distribution

Accumulated collector fees are periodically distributed to protocol participants:
- **INDY stakers:** Receive a share of protocol fees proportional to their staked INDY
- **Stability pool providers:** Receive fees for providing liquidity to stability pools
- Distribution is triggered by protocol governance or automated processes

### Querying the Collector

The `get_collector_utxos` tool allows inspection of:
- Total accumulated fees across all collector UTXOs
- Individual UTXO composition (which assets and amounts)
- Number of UTXOs awaiting distribution
- Distribution readiness based on accumulated totals
