ID: guild-token-lifecycle Category: Economic
PermTokenTransferPermGuildTokenMint / PermGuildTokenBurn)Guild tokens are trust-based. Guilds control mint, redeem policy, and confiscate-and-burn. Convert is the open market path; mint/redeem remain guild-privileged.
Guild webapp (session cookie): GET /api/guild-bank for every guild’s collateral, supply, and ratio; GET /api/inventory/denom/uguild.{guild-id}/page/1 for holders. See api/webapp/analytics.md.
Chain fallback (authoritative if the indexer lags):
structsd query structs guild-bank-collateral-address [guild-id]
structsd query bank balances [collateral-address]
structsd query bank denom-owners uguild.[guild-id]
structsd tx structs guild-bank-mint TX_FLAGS -- [alpha-amount] [token-amount]
Ratio is captured at action time. Signer’s guild is implicit.
Anyone with PermTokenTransfer can buy an existing guild token at the live collateral ratio. Convert-in fee stays in that guild’s collateral. min-amount-token is the required slippage floor:
structsd tx structs guild-bank-convert TX_FLAGS -- [guild-id] [alpha-amount] [min-amount-token]
Atomic source redeem then target convert. Both guilds keep their fees:
structsd tx structs guild-bank-convert-token TX_FLAGS -- [amount]uguild.[source-id] [target-guild-id] [min-amount-token]
Payout is floor(amount * collateral / supply) and must clear min-amount-alpha:
structsd tx structs guild-bank-redeem TX_FLAGS -- [amount]uguild.[guild-id] [min-amount-alpha]
uguild.* may only go to a registered player, the structs module account, or an indexed provider pool. IBC and unregistered addresses reject with recipient_not_eligible. Prefer player-send between registered players.
structsd tx structs guild-bank-confiscate-and-burn TX_FLAGS -- [amount]uguild.[guild-id] [address]
Audited forever. Damages reputation.
| Risk | Result | Prevention |
|---|---|---|
| Over-minting | Thin collateral, convert/redeem slip | Watch collateral vs supply before mint |
| Slippage miss | Convert rejected | Set min-amount-token from the live ratio |
| Send to IBC / raw address | recipient_not_eligible |
Send only to registered players or provider pools |
| Confiscate-and-burn | Holder balance gone, reputation hit | Rank revocation is usually enough |
TX_FLAGS per conventions.md. Canonical economics: knowledge/economy/guild-banking.md.