Balance module
The selected treasury converts held Statements and makes working BALANCE available to the Core.
State reads
balanceToken() → addressviewBALANCE token held by this module.
selected() → boolviewWhether this module is selected by the active Core and has not migrated.
conversionReady() → boolviewWhether the module can convert a held Statement now.
transfersReady() → boolviewWhether ordinary BALANCE transfers are open.
available() → uint256viewWorking BALANCE available for the Core's Credit purchases; zero unless selected, payments enabled, and transfers open.
working() → uint256viewCustody less the separate reserve and recorded unpaid transfers.
conversionToClaimBps() → uint16viewShare of each Statement conversion receipt reserved outside working funds, in basis points.
Core calls
redeem(uint256 statementId) → uint256Core onlyConvert a Statement transferred by the Core, measure the BALANCE received, and keep it in the module.
May revert: ConversionOff, NotHeld, RedeemedBelowRating
pay(address to, uint256 amount)Core onlyPay from available working funds. Undelivered amounts are recorded as owed; the Core checks a seller's receipt.
May revert: InsufficientAvailable
Events
StatementConverted(statementId, received, allocated, contributionBps, claimReserve)A held Statement was converted and its received BALANCE was accounted for.
PaymentAccrued(to, amount)A Core payment was recorded as owed after an incomplete transfer.
SwitchesSet(conversionEnabled, workingPaymentsEnabled, ccRedemptionEnabled)The module's movement switches changed.