i've been studying the AT protocol to investigate how you would build a NIP-60-like cashu wallet. I noticed that they have a very cool mechanism to ensure data consistency when you have multiple clients that want to write the same record. typical problem for when building cashu wallets that use NIP-60, because multiple wallets might produce race conditions when they operate on the same ecash.
they call this swapRecord and swapCommit. the gist is that the PDS (equivalent of nostr relay here) allows you to write to certain records only if you know the event you're overwriting. this might be useful feature for replaceable events in nostr: if a relay enforced that you have to know the event ID of the record you're overwriting, we could rule out concurrent writes on the same record that can rekt your wallet.
they call this swapRecord and swapCommit. the gist is that the PDS (equivalent of nostr relay here) allows you to write to certain records only if you know the event you're overwriting. this might be useful feature for replaceable events in nostr: if a relay enforced that you have to know the event ID of the record you're overwriting, we could rule out concurrent writes on the same record that can rekt your wallet.