Skip to content
STRUCTS.AICODEX
structstestnet-111 structsd v0.23.0 ✓ facts and rules verified 2026-11-27

Commerce skill: energy, banks, transfers

Commerce is how Alpha Matter compounds into economic power. The core loop: refine Alpha → infuse a reactor (capacity) → route it through an allocation to a substation → sell it through a provider → buyers pay in tokens via agreements → reinvest. Layered on top are guild Central Bank tokens (mint/redeem) and direct transfers. Where structs-energy is “power my own structs”, this skill is “make Alpha and energy earn.”

Conventions (TX_FLAGS, -- rule, charge bar, one-tx-at-a-time, ualpha denom suffix, the vault) are in conventions.md. Every command here is Tier 1 or Tier 2 — default to interactive.

Every spend in this skill is paid from a vault, not from your signing key. Agreement collateral, reactor stake, Central Bank mint/redeem/convert and rank purchases all debit the player vault (or a guild vault you control). Fund the vault first (structsd tx bank send [key] [vault-address] [amount]ualpha; address from structsd query structs vault [owner-id]). Earnings likewise land in vaults: refined Alpha, redeemed Alpha, minted guild tokens. The one exception is provider-withdraw-balance, which pays to the bank address you name.

When to use it

Decisions

Sell or hold? Surplus capacity earns nothing idle. If you have headroom beyond your own structs, sell it. Price in guild tokens (1uguild.0-N) to create demand for your guild’s currency, or in ualpha for direct value.

Buyer-side: shop before you commit. Opening an agreement debits the entire cost in full, immediately, at open — rate × capacity × duration, moved from the paying vault into the collateral pool (x/structs/keeper/msg_server_agreement_open.go). It is not metered per block. Closing early can incur a penalty. Compare providers on rateAmount, capacityMaximum, durationMaximum, and penalties before opening. Pick a duration whose expiry height is not already full: at most 256 agreements may expire at one height, and a full bucket rejects the open with expiration_height_full — nudge the duration by a block or two and retry.

The rate_denom trap. The cost is charged in the provider’s rate_denom, not in alpha. A provider that prices in a guild token (uguild.0-N) requires your vault to hold that token — a buyer holding only ualpha is rejected at broadcast (insufficient-funds error keyed agreement_open; read rawLog for the exact denom). Check the provider’s rateDenom and acquire that denom (mint guild tokens / trade) before opening.

Reactor staking economics — you are buying capacity, not a yield. Infusing a reactor stakes your Alpha behind a validator and, in return, credits energy capacity to you (96% of the infused amount; the fixed 4% commission, the same on every reactor, becomes the reactor’s own capacity), plus a diversity bonus of up to 50% for stake spread evenly across ten or more reactors. There is no delegator reward stream, no APR, no passive income — the payoff is the capacity itself. Income is indirect: you turn that capacity into revenue only by selling it as energy through a provider. Commission is the same 4% everywhere, so choose reactors for cap headroom and spread: spreading across reactors = more bonus. Infusing your guild’s reactor raises your capacity (plus the reactor’s 4%), not the guild’s; guild power comes from guild-vault stake. It’s reversible only via a defusion cooldown — don’t stake Alpha you’ll need short-term. A jailed validator zeros the infusion ratio until it is unjailed and bonded again, and a reactor already holding 30% of bonded stake refuses new stake once the cap is active (reactor-stake-share). See structs-energy for the diversity table and cap, and energy — reactor infusion for the 96/4 split.

The energy flywheel (advanced default): mine → refine → infuse guild reactor → automated allocation grows substation capacity → sell via provider for guild tokens → redeem/reinvest. Each turn compounds. Decisions live in knowledge/economy/valuation, trading, and playbooks/phases/late-game.

Allocation types (the routing primitive)

Type Updatable Deletable Auto-grows Limit Use
static no no (a guild admin can delete a guild-sourced one) no unlimited fixed routing
dynamic yes yes no unlimited flexible/managed routing
automated no (sizes itself to the whole source) no (a guild admin can delete a guild-sourced one) yes (with source capacity) one per source, and the source must have no other load energy sales (recommended)
provider-agreement system system system system-created auto-made when agreements open — never create manually

Who can change an allocation. Only a dynamic allocation’s power can be updated, by whoever holds PermSourceAllocation on the source. Delete needs PermSourceAllocation on the source or PermDelete on the allocation. Transfer (allocation-transfer -- [allocation-id] [new-controller-owner-id], to a player 1-N or a guild 0-N) needs PermAdmin on the allocation. The controller (--controller [owner-id] on create, defaulting to the creating player) connects and redirects the allocation; power changes still belong to the source holder. Allocations sourced from a guild or a guild-owned object default to guild control.

Procedure — sell energy (provider pipeline)

  1. Have capacity — infuse a reactor first (structs-energy).
  2. Automated allocation (auto-grows as you infuse more; the [power] argument is ignored, and the source must have no existing allocation load):
    structsd tx structs allocation-create --allocation-type automated TX_FLAGS -- [your-player-id] [power]
    
  3. Substation (distribution node):
    structsd tx structs substation-create TX_FLAGS -- [your-player-id] [allocation-id]
    
  4. Provider (your storefront):
    structsd tx structs provider-create TX_FLAGS -- [substation-id] [rate] [access-policy] [provider-penalty] [consumer-penalty] [cap-min] [cap-max] [dur-min] [dur-max]
    

    Pricing/policy heuristics: rate 1uguild.0-N (drives guild-token demand) or a ualpha rate; access-policy open-market (any registered player), guild-market (anyone holding PermProviderOpen on the provider, by any path: owner, direct grant, or a rank grant via permission-guild-rank-set [provider-id] [guild-id] 262144 [rank]), or closed-market (refuses everyone, owner included: a pause switch, not an allow-list); penalties 0 initially to lower friction; cap/dur ranges wide (e.g. 1000–1000000000 / 100–1000000). Add --owner-id [guild-id] to create the provider as the guild (needs PermSourceAllocation on the guild); otherwise you own it.

  5. Monitor & withdraw: structsd query structs provider [id]; provider-withdraw-balance TX_FLAGS -- [provider-id] [destination-address]. Earnings drip from the provider’s collateral (escrow) to its earnings address as blocks pass.

Deleting the substation under a provider: substation-delete is bounded work — the substation flips to deletion_pending, refuses new connections, and the grid unwinds it over several blocks. Agreements sourced from that substation are destroyed and settled as a premature close (each consumer gets their remaining collateral plus the provider penalty). Only agreements delivering into a deleted substation (the consumer’s receiving station) are detached rather than closed, and those keep billing until the consumer runs agreement-close. Warn consumers before you delete.

Procedure — buy energy (agreement)

  1. Find a provider: structsd query structs provider-all (or your guild’s). Compare rate/capacity/duration/penalties.
  2. Open (paid upfront from your vault; auto-creates a provider-agreement allocation with no destination, so no power arrives until step 3):
    structsd tx structs agreement-open TX_FLAGS -- [provider-id] [duration-in-blocks] [capacity]
    

    --owner-id [guild-id] opens it on the guild’s behalf, paying from the guild vault (needs PermTokenTransfer on the guild).

  3. Connect the allocation to your substation:
    structsd tx structs substation-allocation-connect TX_FLAGS -- [allocation-id] [substation-id]
    
  4. Adjust as needed: agreement-capacity-increase|decrease (no payment; the remaining duration is rescaled by old ÷ new capacity), agreement-duration-increase (paid); agreement-close [agreement-id] (refunds remaining collateral minus the consumer penalty). Only the consumer can close an agreement; a provider’s only lever is provider-delete, which ends all of its agreements.

Procedure — reactor staking

structsd tx structs reactor-infuse TX_FLAGS -- [validator-address] [amount]ualpha

Validator address is structsvaloper1... (from structsd query structs reactor [id], validator field) — not the reactor ID. The stake comes from your player vault; --delegator-address [registered-address] stakes from a signing key instead, --owner-id [guild-id] stakes from a guild vault (needs PermTokenInfuse on the guild). Commission is a fixed 4% on every reactor. Check reactor-stake-share [reactor-id] for cap headroom first. Unstake: reactor-defuse -- [validator-address] [amount]ualpha (cooldown; Alpha returns to the account it came from); reactor-cancel-defusion -- [validator-address] [amount]ualpha [creation-height] to re-stake during cooldown; reactor-begin-migration -- [src-val] [dest-val] [amount]ualpha to move stake (verify the destination — no undo; the destination’s cap applies). After an unjail, reactor-restart [reactor-address] resyncs energy output from live staking if hooks did not.

Procedure — guild Central Bank & transfers

Commands reference

Action Command
Allocation create / update / delete / transfer structsd tx structs allocation-create --allocation-type [t] TX_FLAGS -- [source-id] [power] (+ allocation-update/allocation-delete -- [allocation-id] ...; allocation-transfer -- [allocation-id] [new-controller-owner-id])
Substation create structsd tx structs substation-create TX_FLAGS -- [owner-id] [allocation-id]
Provider create / delete / withdraw structsd tx structs provider-create [--owner-id guild] \| provider-delete \| provider-withdraw-balance TX_FLAGS -- ...
Agreement open / close / adjust structsd tx structs agreement-open [--owner-id guild] \| agreement-close \| agreement-capacity-increase \| ... TX_FLAGS -- ...
Reactor infuse / defuse / migrate / restart structsd tx structs reactor-infuse \| reactor-defuse TX_FLAGS -- [validator-addr] [amount]ualpha; reactor-begin-migration -- [src-val] [dest-val] [amount]ualpha; reactor-restart -- [reactor-addr] (--delegator-address / --owner-id select the funding account)
Bank mint / redeem structsd tx structs guild-bank-mint TX_FLAGS -- [alpha-amount] [token-amount] (add --guild-id to name another guild) / guild-bank-redeem TX_FLAGS -- [amount]uguild.[id] [min-amount-alpha]
Bank convert / convert-token structsd tx structs guild-bank-convert TX_FLAGS -- [guild-id] [alpha-amount] [min-amount-token] / guild-bank-convert-token TX_FLAGS -- [amount]uguild.[src] [target-guild-id] [min-amount-token]
Vault → vault transfer structsd tx structs vault-send TX_FLAGS -- [owner-id] [recipient-owner-id] [amount]
Address transfer (key or vault as from) structsd tx structs player-send TX_FLAGS -- [from-address] [to-address] [amount]
Rank purchase structsd tx structs guild-rank-purchase TX_FLAGS -- [guild-id] [target-rank] [max-price] [expected-rank]
Query provider / agreement / reactor / vault structsd query structs provider \| agreement \| reactor \| vault [id]
Query reactor cap / diversity structsd query structs reactor-stake-share [reactor-id] / owner-reactor-diversity [owner-id]

TX_FLAGS per conventions.md. Requires structsd on PATH and a signing key.

Verification

Errors

See also