Settlement
Factories do not run forever. Midgard has explicit settlement rules for every end state.
Natural closure
Section titled “Natural closure”A factory should close once its effective burn has consumed its stake.
Anyone can call the keeper-safe close check. If the factory is actually ready to close, Midgard:
- caps accounting at natural closure time
- refunds any remaining stake
- mints any remaining available inflation
- routes funds to the owner if there is no active leverage loan
Why closure is capped
Section titled “Why closure is capped”Settlement math uses the smaller of:
- actual elapsed time
- the factory’s natural closure time
This prevents a dead factory from continuing to accrue value on paper just because nobody settled it immediately.
Invalidation
Section titled “Invalidation”Factories are tied to PonziLand parcels.
If the land backing is no longer valid for that owner, the factory can be invalidated permissionlessly.
That path is not meant to be an owner exit hatch. It is a cleanup path for when the external right that justified the factory no longer exists.
Liquidation path
Section titled “Liquidation path”If a factory has an active leverage loan and falls below the vault’s health threshold, the vault can liquidate it.
On liquidation:
- the factory is destroyed
- the land mapping is cleared
- the entire released factory value is routed to the vault
- the loan is marked liquidated
Creditor-first settlement
Section titled “Creditor-first settlement”Whenever a factory with an active loan is closed or invalidated, Midgard settles the loan out of proceeds first.
In practice:
- the vault is paid before the owner
- interest is settled before principal
- any shortfall is written off at final close if the proceeds are not enough
That makes the close path explicitly creditor-first.
Pending challenges after closure
Section titled “Pending challenges after closure”Pending challenges can outlive the factory itself.
If such a challenge later settles:
- a winning challenger still gets paid
- a losing challenge releases the reserved amount back to the correct side
The reserved amount goes:
- to the vault if the factory had already been liquidated
- to the factory owner if the factory ended through normal closure or invalidation
This keeps challenge accounting coherent even if the factory is gone before the challenge is completed.
What users should understand
Section titled “What users should understand”Midgard’s settlement rules are intentionally simple:
- live factory while it is productive
- close it when it is naturally done
- invalidate it if the land backing breaks
- liquidate it if leverage goes bad
That makes the final cash flows legible instead of leaving them to offchain interpretation.