<!--
Sitemap:
- [Welcome to River](/index)
- [Asset-Backed Finance Primer](/concepts/finance-primer)
- [River for Lenders](/lenders/introduction)
- [Depositing](/lenders/depositing)
- [Earning: the Coupon](/lenders/earning)
- [The Accumulating Wrapper](/lenders/wrapper)
- [Withdrawals & Exits](/lenders/withdrawals)
- [Losses & Impairments](/lenders/losses)
- [FAQ](/lenders/faq)
- [Integrate with River](/integrate/get-started)
- [Wrapper Integration](/integrate/wrapper)
- [Class Token Integration](/integrate/class-token)
- [Contract Addresses](/integrate/addresses)
- [Protocol Architecture](/architecture)
- [Actors: Roles & Permissions](/technical/actors)
- [Proxies & Upgradeability](/technical/proxies)
- [Strategies & Reporters](/technical/strategies)
- [Glossary](/concepts/glossary)
- [Dual NAV & Exchange Rates](/accounting/dual-nav)
- [Settlement & Conservation](/accounting/settlement)
- [The Coupon Ledger](/accounting/coupon-ledger)
- [Wrapper Accounting](/accounting/wrapper)
- [Accounting Examples](/accounting/examples)
- [The Tiered Waterfall](/waterfall/)
- [Waterfall Scenarios](/waterfall/scenarios)
- [Security Model](/security)
- [Protocol Invariants](/technical/invariants)
- [List of Assumptions](/technical/assumptions)
- [External Entry Points](/technical/entry-points)
- [Governance](/governance)
- [Contract Reference](/reference/contracts)
- [River Engineering Standards](/reference/engineering-standards)
-->

# Strategies & Reporters

## The split: custody vs valuation

A **strategy** is a capital destination (idle yield, a credit facility). A **reporter** prices it.
The `Structure` never trusts either alone:

* Strategies move assets but their movements must reconcile against **observed balance changes**
  and reported value, exactly.
* Reporters state values but cannot move assets, and their reports are checked for staleness and
  version rollbacks at every read.

```mermaid
flowchart LR
    ST[["Structure<br/>cash + class NAV"]] -- "fund / requestReturn / claim" --> S["Strategy<br/>(Facility, idle)"]
    RP["Reporter"] -. "metrics(strategy, mode)" .-> ST
    S -. priced by .-> RP
```

## Strategy movements (all keeper-called, all bounded)

| Call | Moves | Enforced |
| --- | --- | --- |
| `fundStrategy(id, max, data)` | Cash → strategy | Settlement first; reported value must rise exactly by the accepted assets; observed outflow must match |
| `requestStrategyReturn` | Nothing (opens a request) | No asset movement allowed during the call |
| `claimStrategyReturn` | Strategy → cash | Reported value must fall exactly by the returned assets; observed inflow must match; `minAssets` floor |
| `rebalanceStrategy` | Nothing net | Internal reallocation must be exactly value-neutral |

Every movement re-baselines the strategy's checkpoint so mechanical capital shifts are never
mistaken for performance. Inactive strategies can still settle and return capital — wind-downs are
never trapped.

## Reporter metrics

Reporters normalize each strategy into the values settlement needs, per pricing mode:

| Metric | Meaning | Settles |
| --- | --- | --- |
| `proRataValue` | Value shared by dollar NAV (idle yield) | Pro-rata across classes |
| `waterfallValue` | Credit value (deployed principal + performance) | Through the waterfall |
| `impairment` | Expected-loss mark | Conservative mode only; junior-first as a loss signal |
| `version`, `flags` | Freshness controls | Stale flag or version rollback ⇒ settlement reverts |

## The Facility

The flagship strategy: a borrowing-base credit facility. The keeper draws and repays within
covenants (advance rate against attested eligible collateral); the `FacilityReporter` accepts
**signed attestations** — nonce-monotonic, timestamped, ECDSA-verified marks of expected loss,
realized loss, and collateral — that become the facility's reported value. A compromised keeper
can refresh attestations it has; it cannot forge marks without the signer key, and it cannot draw
past the borrowing base.

## Rotating a reporter

`file("reporter", …)` settles at the old reporter first (no pending performance stranded), swaps,
then re-baselines at zero delta — the rotation must be value-neutral or it reverts. Valuation
methodology can evolve; it can never smuggle a gain or loss.
