Hugo Fund Formation Platform14 Jun, 03:53 CET

MFN Engine

Most Favoured Nation eligibility calculation: rule layers, query-time evaluation, and mutation signals.

The Most Favoured Nation engine determines which clauses each LP is eligible to elect into their side letter. It runs as a pure in-memory calculation over a pre-loaded data bundle.

Rule layers

Rules are applied in order. Each layer narrows or overrides the eligibility determined by the previous layer.

#LayerDescription
1 Basic rule Fund-wide comparator gates. Dimensions: amount (commitment size), date (admission date), closing (closing sequence). Logic operator: AND or OR. If the basic rule says "OFF" on all dimensions, MFN is universal.
2 General rules Per investor-category include/exclude. E.g. "Exclude sovereign wealth funds from fee-waiver clauses."
3 Individual rules Per commitment include/exclude overrides. E.g. "Exclude LP X from clause Y with rationale Z."
4 Clause exclusions Per-clause carve-outs at fund-wide, category, or commitment scope.

Query-time evaluation

MFN eligibility is calculated when a page or API request needs eligibility results. Mutation handlers no longer diff eligibility before and after each write.

Current flow
  1. Load the fund's MFN rule and clause bundle
  2. Run calculateMfnFromData for the relevant LP vehicle
  3. Render eligibility from the result
  4. Record rule mutations separately with recordFundSignal

The signal stream records that an MFN rule changed. It does not try to persist every derived eligibility flip.

Performance

The engine cost is paid by readers that need MFN results, not by every MFN-shaped mutation. Signal writes are one append to fund_signals after the database mutation succeeds.

Caching

The MFN bundle is cached per fund for 60 seconds. Activity logging invalidates the bundle cache for MFN-shaped mutations that pass through logActivityBg.

Ctrl+K to open · ↑↓ navigate · Enter go · Esc close
Copied