sidestr
sidestr is a specification for Bitcoin sidechains whose only network is Nostr. A chain is a signed JSON document; its transactions travel as Nostr events; its tip is announced as a Nostr event; and every reader, a browser tab included, validates the whole chain itself with the same kernel that validates Bitcoin. There is no P2P layer, no token and no new consensus on the parent.
Overview
sidestr provides:
- A chain as a document - id, parent chain, the challenge that seals blocks, the peg address, the rules it opts into
- Pegs both ways - a peg-in is a parent transaction with a marker; a peg-out is a burn the peg holders pay on the parent
- Nostr as the wire - transactions (kind 23500), tip announcements (kind 33333), a faucet, signer rounds
- Validation in the page - explorer and wallet replay every block; nothing is trusted from a mirror
- Rules a chain can opt into - assets and pools, the desk, checkpoints, an EVM
How It Works
The chain document
A chain is one JSON file: its id (sidestr:<name>), the parent it pegs to, the challenge a block must satisfy (one key at level 1, a k-of-n taproot script at level 2), the peg address on the parent, the genesis pegs, and an optional list of rules. Anyone can publish one; anyone can run it.
Blocks and levels
At level 1 one signer seals blocks and pays peg-outs from its parent wallet. At level 2 a set of signers agree on each block over the relays (proposal, partial signatures, sealed block as Nostr events) and pay peg-outs through a PSBT round, so no single signer holds the peg.
Transactions over Nostr
A wallet signs a transaction and publishes it as a kind 23500 event tagged with the chain id; producers follow the relays and include what validates. The transaction authorises itself, so the event's key is a throwaway: a wallet needs no identity to spend.
Discovery
After every block the signer publishes a tip announcement (kind 33333, d = chain id, t = sidestr) naming its mirrors and carrying the last headers. An explorer or wallet given only a chain id finds the mirror from the relays, checks that the mirror's document is signed by the announcer, and judges the mirror against the announced tip.
Pegs
A peg-in pays the chain's peg address on the parent with an OP_RETURN marker naming the chain and the destination script; the chain claims it after six parent confirmations as a coinbase output. A peg-out burns coins on the chain to OP_RETURN pegout:<parent script>; the peg holders pay it on the parent with a marker naming the burn.
Rules a chain can opt into
- Assets and pools - fungible assets and constant-product pools as consensus rules, not contracts; a swap that does not satisfy the pool equation is an invalid block
- The desk - a chain that buys locked mining rewards for sats now, against a pre-signed maturity transaction
- Checkpoints - the chain's tip written into the parent every N blocks
- An EVM - Ethereum transactions carried inside chain transactions and run by every validator, with the state root committed in the coinbase; one sat is one gwei, and a JSON-RPC lets MetaMask and Remix in
Why Nostr
- Identity - a Nostr key is a chain address on every sidestr chain and an Ethereum account on the EVM ones
- Transport - relays already exist and already carry signed events; a chain needs nothing else
- Discovery - a chain is found by its id from any relay; a directory is a query, not a registry
- Agents - a
did:nostragent has a key, so it has money and can make a chain of its own for one job
Resources
- Specification and proposals
- Explorer and wallet, open with
?chain=<chain id> - Directory of chains, with a market, a DAO, an IDE and a first contract
- Source