Source: src/RiskManager.sol
Responsibility
RiskManager enforces deposit/redeem guardrails for a fund. Both queues route every user request through Fund.checkDeposit / Fund.checkRedeem, which the Fund proxies here; a violated limit reverts the whole request.
All value comparisons are made in the fee base asset: a deposit of asset X is first converted to shares at X’s last accepted price, then valued at the base asset’s price (value = amount × 1e18 / assetPrice × basePrice / 1e18). The valuation context comes from Fund.getRiskContext.
Every limit is optional — a zero value disables that check. If no valuation-based check is enabled, price lookups are skipped entirely (so deposits work even without prices, e.g. the very first batch).
Checks run at request time against
lastAcceptedPrice; the batch settles at the next accepted price. Admin functions authorize against the Fund’s access control.
Function reference
Validation
Estimates
Both are estimates only — actual settlement uses the next accepted report’s price.
Admin setters
All roles are checked on the Fund. A value of0 disables the corresponding check.
Views
tvlCap, maxBatchDepositCap, maxBatchRedeemCap, minDepositAmount, minRedeemAmount, maxDrawdownBps, isEmergencyPaused, merkleRoot, fund() — all public state.