<!--
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)
-->

# External Entry Points

Every externally callable mutator, by contract and caller class. Anything not listed is a view.

## Structure

| Function | Caller | Notes |
| --- | --- | --- |
| `settle` | Keeper/admin | Settlement; reverts on stale/rolled-back reports |
| `serviceDeposit` | Keeper/admin | Settlement-first; optimistic pricing; subordination floor |
| `processExits` | Keeper/admin | Settlement-first; cash-bounded batch; conservative pricing |
| `fundStrategy` / `requestStrategyReturn` / `claimStrategyReturn` / `rebalanceStrategy` | Keeper/admin | Value-neutrality + balance-observation enforced |
| `requestExit` / `cancelExit` | Class token only | The token authorizes the lender; the Structure sequences |
| `registerStrategy` / `setStrategyActive` / `file(...)` | Structure admin | Reporter rotation settles first, re-baselines neutrally |
| `upgradeToAndCall` | Upgrader (timelocked) | UUPS |

## DistributingClassToken (per class)

| Function | Caller | Notes |
| --- | --- | --- |
| `requestDeposit` / `cancelDeposit` | Lender (owner) | Gate `DEPOSIT` on controller; cancel ungated |
| `requestRedeem` / `cancelRedeem` | Lender (owner/ticket party) | Gate `REDEEM` on owner; lock-in-place; cancel ungated |
| `withdraw` / `redeem` | Controller | Claim against the fill pool; ungated |
| `claimCoupon` | Holder | Ungated; pays funded coupon only |
| `accrue` / `fund` | Keeper | The two coupon layers |
| `serviceDeposit` / `fillExit` | Structure only | Servicing hooks |
| `setGate` | Structure admin | Zero disables |
| `transfer`/`transferFrom` | Holder | Gate `RECEIVE` on recipient; coupon settles both parties; locked shares blocked |
| `upgradeToAndCall` | Upgrader | UUPS |

## DistributingVault4626 (accumulating wrapper)

| Function | Caller | Notes |
| --- | --- | --- |
| `wrap` | Holder of class shares | Gate `WRAP` on receiver; gross pricing; `minShares` floor |
| `requestUnwrap` | Wrapper holder | Gate `REDEEM` on caller; cash-first, rationed; `minCash` floor |
| `claimUnwrap` | **Anyone** | Permissionless poke; pays the bucket's receiver only |
| `cancelUnwrap` | Bucket holder | Routed through the caller's own controller proxy — cannot cross-cancel |
| `setOptimism` / `setGate` | Structure admin | Optimism only cheapens entry; never redeemable |
| `transfer`/`transferFrom` | Holder | Gate `RECEIVE`; ration settles + moves pro-rata |
| `deposit`/`mint`/`withdraw`/`redeem` | — | Revert (`SyncFlowDisabled`); `max*` return 0 |
| `upgradeToAndCall` | Upgrader | UUPS |

## Queues (Fifo / Selective)

`enqueue`, `cancel`, `take` — owner-only (the Structure or master token that owns the queue).
Queues sequence; they never custody assets or price anything.

## Facility / FacilityReporter

| Function | Caller | Notes |
| --- | --- | --- |
| `draw` / `repay` (facility surface) | Keeper | Covenant-checked against the attested borrowing base |
| `acceptAttestation` | Anyone with a validly signed attestation | ECDSA-verified, nonce-monotonic, timestamped |

## Governance

`RiverAccessControls` role management, `RiverGovAuthority` scheduling/execution (timelocked), and
`RiverPause` emergency stop — covered in [Timelock & Authority](/governance).
