Expand description
Escrow + settlement — the money side, gated on verification, and incapable of moving funds itself.
An Escrow is a small state machine over the agreed price. It is funded
(Offered → Held), then settled (Held → ReleasedToProvider | RefundedToRequester)
only by a verification verdict. On Verified it emits a
MicropaymentInstruction addressed to the provider; on Rejected it emits a
refund and no provider payment. Emitting an instruction is not the same as
executing it: the actual transfer is performed by the separate
crate::ilp_dispatcher rail, under human authorisation. Nothing here touches a
wallet, a connector, or the network.
The money arithmetic (fair-price cap, energy viability) reuses
crate::modalities::value_flow — the single source of truth — rather than
re-implementing it.
Structs§
- Escrow
- An escrow for one paid job.
Enums§
- Escrow
State - Escrow lifecycle. A job is paid only by passing left-to-right through
Verified. - Settlement
Outcome - What settlement produced. A
Paycarries an instruction for the existing ILP rail; aRefundcarries nothing payable.
Functions§
- energy_
viable - The solar-excess viability gate: a paid job should only be dispatched to an
energy-supplier node if the value returned justifies the energy spent — E-ROI at or
above
min_ratio. Below the floor the job is net-extractive and must be refused. Reuseseroi_viable(the thermodynamic cost cap). - price_
paid_ job - Fair price for a paid job: the audited production (energy) cost plus a capped
ROI margin (the extraction guard), via
commons_cost. The price never exceedsproduction_cost × (1 + max_roi%).