Purpose: AI-readable reference for Structs energy agreements, pricing dynamics, supply/demand, and entity relationships. How energy flows between players.
Energy is ephemeral and per-block — produced from Alpha Matter via conversion structs, consumed by structs and operations. Energy generated in a block but not consumed in that block is permanently lost. There is no “energy balance” to accumulate. Idle capacity is waste, not safety margin. Guild substations should run at full utilization.
Pure Structs gameplay transactions are free — they run on a dedicated free-gas meter and are charged no ualpha fee (see transactions). So a player does not need to hold a fee balance to play. Note this is distinct from energy: you must be online (powered) and hold charge to act, but no energy is spent as a per-transaction gas fee.
Energy agreements create self-enforcing subscriptions between providers (sellers) and consumers (buyers). Energy is shared across a player’s structs via substation connections.
| Entity | ID Format | Role |
|---|---|---|
| Provider | 10-{index} |
Offers energy capacity; owned by player; linked to substation |
| Agreement | 11-{index} |
Binds provider to consumer; defines capacity, duration, rate |
| Allocation | 6-{index} |
Distributes energy from source to destination |
Provider → Agreement → Consumer (Player)
↓
Allocation: sourceId (Provider/Reactor) → destinationId (Player/Struct)
provider-create. Provider exposes capacity from substation.agreement-open. Links provider to consumer; specifies capacity, blocks, rate.controller is a PlayerId (not an address).| Factor | Effect |
|---|---|
| Alpha Matter scarcity | Higher energy cost; producers charge more |
| Raid activity | Supply shocks when reactors/providers go offline |
| Guild coordination | Members may subsidize each other via agreements |
| Struct count | More structs = higher demand; power grid strain |
Pricing dynamics: Energy agreements use rateAmount/rateDenom (Alpha Matter per unit). Market-clearing depends on provider availability, consumer willingness to pay, and cancellation penalties.
| Facility | Rate | Risk | When to Use |
|---|---|---|---|
| Reactor | 1g = 1 kW | Low | Baseline; redundancy |
| Field Generator | 1g = 2 kW | High | Efficiency when risk acceptable |
| Continental Power Plant | 1g = 5 kW | High | High output, high risk |
| World Engine | 1g = 10 kW | High | Maximum efficiency; single point of failure |
See struct-types.md for build costs and power requirements.
Reactors charge a commission on infusions. When a player infuses ualpha into a reactor, the generated power is split:
power * (1 - commission) — added directly to the player’s capacity (no manual allocation needed)power * commission — increases the reactor’s capacityThis automatic capacity increase makes reactor infusion the fastest and simplest way for a player to gain capacity. Check a reactor’s commission rate before infusing: structsd query structs reactor [id].
Staking pays capacity, not a yield. The return on infusing a reactor is the energy capacity credited above — there is no delegator reward stream, APR, or passive token income. Income is realized only indirectly, by selling that capacity as energy through a provider.
For step-by-step energy management workflows, see the structs-energy skill.
Providers define (per database schema):
| Field | Purpose |
|---|---|
| rateAmount / rateDenom | Price per unit capacity |
| capacityMinimum / capacityMaximum | Offer range |
| durationMinimum / durationMaximum | Agreement length |
| accessPolicy | Who can subscribe |
| providerCancellationPenalty / consumerCancellationPenalty | Early exit cost |
| Need | Endpoint |
|---|---|
| Provider by ID | GET /structs/provider/{id} |
| Agreements by provider | GET /structs/agreement_by_provider/{providerId} |
| Allocations by source | GET /structs/allocation_by_source/{sourceId} |
| Allocations by destination | GET /structs/allocation_by_destination/{destinationId} |
| Concept | Purpose |
|---|---|
| Infusion | Record of energy production – who put Alpha Matter into which conversion struct |
| Allocation | Routing of energy capacity from source to Substations |
Allocation types:
| Type | Behavior | Updatable | Deletable | Limit |
|---|---|---|---|---|
static |
Fixed capacity amount | No | No (while connected) | Unlimited |
dynamic |
Can be manually updated | Yes | Yes | Unlimited |
automated |
Auto-grows with source capacity | Yes | No | One per source |
provider-agreement |
System-created when agreements open | System | System | System |
For energy commerce, use automated – it scales with your capacity as you infuse more alpha.
When a buyer opens an agreement (agreement-open [provider-id] [capacity] [duration]):
capacity * rate * duration upfront in the rate denomination (e.g., uguild.0-1) — the entire amount is debited in full at open, not metered per block
rate_denomtrap: the debit is in the provider’s denom, not alpha. If the provider prices in a guild token, a buyer holding onlyualphais rejected at broadcast (insufficient-funds error keyedagreement_open). Check the provider’srateDenomand acquire that denom before opening.
- System auto-creates a
provider-agreementallocation – energy flows to the buyer immediately- Revenue drips from collateral to the provider’s earnings address proportionally as blocks pass
- Provider can withdraw accumulated earnings at any time via
provider-withdraw-balance- On expiry (endBlock reached), the allocation is released and remaining collateral converts to earnings
OPEN -> ACTIVE (blocks pass, revenue accrues) -> EXPIRED (capacity released)
-> or CLOSED early (penalties apply)
agreement-open – buyer initiatesagreement-close – either party can close early (cancellation penalties may apply)agreement-capacity-increase/decrease – modify mid-agreementagreement-duration-increase – extend the agreementUsing guild tokens (uguild.X-Y) as the rate denomination is strategically significant:
guild-bank-mint) or traded| Property | Meaning |
|---|---|
| automatic | Executes on-chain without manual intervention |
| penaltyProtection | On-chain penalty enforcement for violations |
| persistent | Long-term, survives across sessions |
| selfEnforcing | Terms enforced by blockchain, no trust required |
Provider selection criteria: rate, price, available capacity, penaltyProtection, reputation.
capacity (from infusions) is allocatable — capacitySecondary (substation-provided) cannot be allocated out. See power.md.schemas/entities.md — Provider, Agreement, Allocation definitionsapi/queries/provider.md, api/queries/agreement.md, api/queries/allocation.md