Glossary / micro-units
Definition

micro-units

A micro-unit is a millionth of a currency unit, the whole number in which Holon counts money internally so that no amount is ever a floating point number.

Prices are written as decimal strings in files and in manifests, 0.002, and read into integers: 0.002 EUR is 2000 micro-units. Every addition, split and currency conversion happens on those integers, which is why money on Holon is conserved exactly. Tests check it: every micro-unit taken from a payer lands in some account.

Floats would not survive this. A price of 0.004 EUR split into a 10% platform fee and a royalty leaves fractions that a float rounds silently, and the rounding error accumulates across calls until balances no longer add up. Integers make the rounding a decision instead of an accident, and the direction always protects the ceiling. Converting a price into a mandate's currency rounds up, so a budget ceiling is never under-estimated. Converting back, to hand a ceiling to an agent, rounds down, so the agent is never told it may spend more than it may.

Example: a 0.035 EUR call is 35000 micro-units. The platform takes 3500, the author of the fork keeps 26775, and the original author receives 4725. The four lines sum to zero.

See also: ledger, journal entry, settlement, per-unit pricing.

Used in: Audit what your agents spend, Open source agents and licenses, Per unit pricing for agents.