State Channels
State channels are æternity's layer-2 scaling mechanism: a private, two-party ledger that settles on chain only at its endpoints. Superhero does not use them. Posts, tips, trades and votes are individual on-chain transactions; chat runs on Nostr relays and video calls on Jitsi.
How a channel works
Opening is an on-chain transaction. Both participants lock funds into the channel and agree on an initial state, each authenticating it with a signature. From then on they exchange updates directly with each other (a transfer, a contract call, any agreed change), each co-signed by both parties and given a round number. None of it touches the chain, so none of it costs a fee or waits for a block.
Closing is on chain again. In the happy path the participants co-sign a final state and
settle mutually. If one party disappears or misbehaves, the other can close unilaterally with
channel_solo_close_tx, publishing the state they claim is current. If a party publishes an
old state, the counterparty answers with channel_slash_tx, supplying a co-signed state with a
higher round number, and channel_settle then pays out. The honest party always holds a newer
co-signed state than a cheater can produce, so cheating is unprofitable.
The economics: two on-chain transactions, amortised over as many off-chain updates as the participants make. A channel used for two updates is worse than doing it on chain; a channel used for ten thousand is dramatically better.
Superhero and channels
Channels fit two-party, high-frequency interaction. A public social feed is neither: a post has to be visible to everyone, and trading against a bonding curve is inherently many-party. The closest thing in Superhero to "off chain" is delegated posting, where a user signs a message and a relayer pays for the transaction, but every post still lands on chain individually.
If you need state channels on æternity, they are fully supported at the protocol and SDK level. You would be building on the chain, not on Superhero.
Related
- Why æternity: the chain features Superhero does use.
- Chat: the off-chain system Superhero ships.
- Delegated posting: off-chain signatures with on-chain settlement.
- State channel transactions (opens in a new tab): the on-chain transaction types.
- Channels in the protocol spec (opens in a new tab): the normative on-chain and off-chain specifications.