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 at a locked commission and, in return, credits energy capacity to you (1 − commission of the infused amount; the commission share 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. Lower commission = more capacity to you; spreading across reactors = more bonus; staking also strengthens the guild’s reactor. 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 (while connected) no unlimited fixed routing
dynamic yes yes no unlimited flexible/managed routing
automated yes no yes (with source capacity) one per source energy sales (recommended)
provider-agreement system system system system-created auto-made when agreements open — never create manually

Only the controller can delete/transfer an allocation (--controller [owner-id] on create, defaults to the creating player; allocation-transfer -- [allocation-id] [new-controller-owner-id] to hand it to another player 1-N or a guild 0-N). Allocations sourced from a guild or a guild-owned substation 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):
    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 (max reach), guild-market (members at/above a rank — grant via permission-guild-rank-set [provider-id] [guild-id] 262144 [rank]), or closed-market (explicit PermProviderOpen only); 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. Inbound agreements are detached, not closed: the consumer keeps paying until they 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):
    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 -- [substation-id] [allocation-id]
    
  4. Adjust as needed: agreement-capacity-increase|decrease, agreement-duration-increase; agreement-close [agreement-id] (may penalize).

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 locks at infusion. 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