Concord vs. Nostr Relay Infrastructure

What Concord asks of a Nostr relay: why NIP-17 inbox relays are incompatible, what happens when relays prune or expire events, how invites work, and other consequences of its key-derived design.

cloud fodder

July 26, 2026 · 9 min read

Concord runs on Nostr relays, in this article we will explore what Concord asks of a relay, what happens when a relay prunes or expires events, invites and other interesting attributes of the protocol.

1. What Concord asks of a relay#

Conflicts with NIP17 relays#

Concord does not co-exist with a typical NIP17 inbox relay, and the specs actually conflict for the following reasons:

Concord reverses NIP-59. A normal giftwrap (kind 1059) has a random one-time author and the real recipient in the p tag. Concord flips both: the author is the shared stream key, and the p tag is a per-message random key that is not the recipient's and that no reader needs to hold (CORD-01; the sender's client may optionally retain it to delete its own wrap by p tag). Members read a channel by author, {"kinds":[1059],"authors":["<stream pubkey>"]}, never by p tag. That is what lets a whole group share one address.

This means a relay that follows NIP-17's read rule cannot serve a Concord community. NIP-17 says relays SHOULD only serve a kind 1059 to the pubkey p-tagged on it, enforced via NIP-42 AUTH. Under that rule nobody can read a Concord stream: the p tag is a fresh random value per message, so there is no stable recipient to AUTH as, and a reader would need to AUTH across thousands of distinct p tags to follow one stream. DM-privacy "inbox" relays therefore do not work, which is what the spec's "communities must choose relays accordingly" refers to.

Relay Requirements#

What works is 'wide-open' public relay, one which can fend only fend for itself by expiring or TBD when under certain flood attacks on the relay or group itself: one that answers an authors filter for 1059s and returns matches to whoever subscribed. Since such a relay is open and does not gate reads, anyone can pull the 1059s from it, including in bulk by kind alone ({"kinds":[1059]}) with no stream address needed; the events can also be clustered by author, since a pubkey signing many 1059s is a stream rather than a one-off DM. What the key-derived address (CORD-02 §4) provides is narrower: the mapping from a named community to its stream addresses is not publicly computable, so an outsider cannot single out one known community's traffic by address. It does not keep the ciphertext from being collected. What anyone pulls is ciphertext, and decryption needs the key. Because there is no forward secrecy within an epoch (§5), a key that leaks later decrypts whatever ciphertext was collected; and since relay-side deletion is best-effort (§3) and members keep offline copies, removal from a relay is not an erasure guarantee. Confidentiality here is a property of the key, not of the relay.

The other expectation is that a community's relays retain durable 1059s rather than pruning them aggressively, since roles, bans, channel definitions and the guestbook all ride on them. Ephemeral events (typing, voice presence) are kind 21059 and are meant to be dropped.

2. Expiry and pruning#

Concord stream events cannot opt into NIP-40 expiry: the no-outer-tags rule (CORD-02 App. B) leaves no room for an expiration tag, so expiry only happens as a relay's blanket policy, not per event. (A Direct Invite is normal NIP-59 and may carry expiry, which suits a one-shot handoff.)

What expiry costs depends on the event type:

In short, chat and authority state tolerate expiry because durability rests on relay redundancy, offline caches and rebroadcast, and compaction makes old editions expected to age out. The two that depend most on relays retaining them are an unfetched rekey blob and the dissolution tombstone.

3. Deletion by any member#

Classic behavior not only used by NIP17 relays, but also almost all nostr relays circa NIP-09 will honor deletes.

Every member holds the shared stream key can publish to a relay that honors NIP-09 deletion by author. Any member can delete any message by signing a deletion as the stream author.

Preventing Deletion#

A relay that rejects sender-side giftwrap deletion prevents it. CORD-01 asks clients to use at least one relay configured this way. Members still delete their own content the normal way, a giftwrapped kind-5 published into the stream that honest clients honor.

4. Invites: who can invite whom#

Any keyholder can invite anyone, because membership is key possession (CORD-02 §7: "possession of the keys is membership; the invite is simply how they're handed over"). There is no admission event and no gatekeeper, so an invite is just a way to hand over keys.

Keys change hands three ways:

So CREATE_INVITE gates only the official, revocable, listed link, not who can let people in. A community can restrict who mints branded links but cannot stop a member cloning their own keys; a leak is a social matter that a Refounding resolves by rotating out whoever was not re-authorized.

Two related points. An invite cannot fake the community: community_id is a self-certifying hash of the owner's key (CORD-02 §1), and clients reject any bundle whose owner/owner_salt do not reproduce it, so the worst a hostile inviter can do is join. And attribution is only a courtesy: a joiner may echo who invited them, but that tag is joiner-signed and can be omitted or faked, so there is no reliable invite log.

5. Other relevant properties#

Spam flood vectors and rate limits (client and relay)#

Additional considerations#

#concord#nostr#privacy#relays
3

Written by

captain of a sailing vessel building relay.tools electron microscopic time preference capable email: cloudfodder@relay.tools

cloudfodder@relay.tools

Comments3

codonaft

Thanks for clarifying all this. Looking at the CORD-01 > To prevent participants from deleting each other's giftwraps, relays should reject giftwrap deletions by author. This matches NIP-59, which already requires relays to allow deletion by the p-tagged user: giftwraps are owned by the recipient, not the sender. ... Users delete their content in a stream by sending giftwrapped kind 5 deletion events to it. They can also delete their own giftwraps by p tag (on NIP-59-supporting relays) if the client saved the ephemeral key. I'm thinking it's becoming so confusing to relay devs, so we definitely need a relay testing tool (for CI in particular) for gift wraps to be able to verify that relays actually properly process authentication and authorization of event removals.
Open in a Nostr client