Oddbean new post about | logout
 About nostr-based Cashu wallets: what if the relay disappears? Do I lose my ecash?

No, once the ecash is in your wallet, it stays there. Even if the relay disappears, the ecash is stored on your device. Relays help you receive ecash and sync across devices. Only payments you haven't received yet (while you were offline) can potentially disappear if all relays they were published to disappear. 
 nostr:nprofile1qqs04xzt6ldm9qhs0ctw0t58kf4z57umjzmjg6jywu0seadwtqqc75spzpmhxue69uhnzdps9enrw73wd9hszynhwden5te0wp6hyurvv4cxzeewv4eszynhwden5te0wfjkccte9enrw73wd9hsxv8qkt am I getting this right? 
 I believe they are stored as encrypted events on relays.  
 no, your own proofs are stored as encrypted events

the nut zaps are sent unecrypted as pubkey-locked and swapped by the recipient to encrypted events 
 Where are the encrypted events stored? 
 relays 
 so the wallet event specifies that wallet's relays

token events are stored on those relays

nut zaps are published on relays following the outbox model, since it's a message from sender to receiver

so imagine this:

you create Wallet A, you designate that wallets relays to be wss://umbrel.local -- only you have access to read/write on that relay

I send you a nut zap -- I check your outbox relays, which are some publcly accessible relays

I publish the nut zap there, pubkey-locked, unencrypted

once you swap it, you encrypt the new token and save it on wss://umbrel.local 
 With this process, what info is an external "attacker" able to get from looking at the relays where the tokens are being posted?
Only who is receiving those ecash? Other info about the "payment"? 
 That’s what I thought. ✅ No local device or client storage at all. In effect, the relay(s) become a blind custodian(s). 
 yeah, I think what calle is getting at is that the local device can cache the proofs locally too 
 Yes, does it store them in the browser's local storage? Highlighter could show you your balance before you even connect to the relays.  
 yeah, I mean, since they are just nostr events it leverages the same cache adapter I'm using for the rest of the thing, so the balance could definitely show before you're even connected to the relays -- right now I have the wallet configured to skip the cache -- but it shouldn't 🤝

once I remove that explicit "bypass the cache" the balance will load from the same REQ even offline

you'll be even able to do private zaps offline with this thing 
 The use case I am exploring is someone who has zero physical security. They could have their phone confiscated at any moment or have to use someone else’s device. Local storage is great, but a risk in this context. That’s why storing everything as events in relays is so attractive. 
 I’m exploring this approach for my custodial system. Better to store encrypted events (nuts) on someone else’s relay than have in my own database. More difficult to be strongarmed. 
 yeah, the ecash would still be on your device; but I'm adding the idea of "health checks"

so if my wallet is configured to store the tokens in 3 relays and one of them goes offline, or is not returning the tokens it should have, the wallet will either warn the user or automatically rotate one of the relays out and republish all the unspent tokens to the new relay 
 Even all the relays disappear, the sender s can always reedem it and send It through other ways.. 🎩 
 What encourages relays to share data with One-Another?

What encourages people to push data to multiple relays?
 
 relays don't share data  
 But we want redundancy right? 
 not that kind of redundancy  
 But if the relay disappeared would the possibility to send it as LN be gone? 
 nope, that works over https with the Cashu mint 
 So you say if the relay is closed down, I connect to a new relay I still be able to send my cashu tokens as LN to a LN wallet? I thought the relay funds and minted cashu tokens was tied to the relay and transfered between relays through LN. 
 Cashu works independent of nostr. Even if nostr goes down, you can get your sats out by talking to the mint. 
 Oh, yea, I get that.. 
I misunderstood the discussion.

I was wondering if the MINT disappear, then my tokens is useless? Or am I wrong here as well?

If the Mint I have tokens on goes down, stops being alive. My tokens is gone and I can't send them somewhere via LN? 
 Yes, it's custodial. 
 Do you know if someone is working on implementing the communication between the client and the ecash mint using #nostr relays instead of https?

Something like nostr:nprofile1qqszm52qe2qdkc4u7dma0klx3532jka2g8geck6fwxncyp90wktq2xspp4mhxue69uhkummn9ekx7mqprpmhxue69uhhwetvvdhk6efwdehhxarj9emkjmn9qy28wumn8ghj7un9d3shjtnyv9kh2uewd9hsy47788 does to communicate a client and a wallet.

🫂 
 yes we are working on a solution that is more general and will be useful for other applications as well  
 Nice!!
So a ecash mint could be 'pure nostr', being just a npub, with no need to publish a HTTPS endpoint.

+ Ecash client and mint talking through nostr.
+ Nostr Social client and ecash client talking through nostr ( nostr:nprofile1qqszm52qe2qdkc4u7dma0klx3532jka2g8geck6fwxncyp90wktq2xspp4mhxue69uhkummn9ekx7mqprpmhxue69uhhwetvvdhk6efwdehhxarj9emkjmn9qy28wumn8ghj7un9d3shjtnyv9kh2uewd9hsy47788 model).
+ Nostr client becoming an ecash client with 'nostr ecash' ( nostr:nprofile1qqs04xzt6ldm9qhs0ctw0t58kf4z57umjzmjg6jywu0seadwtqqc75spzpmhxue69uhnzdps9enrw73wd9hszynhwden5te0wp6hyurvv4cxzeewv4eszynhwden5te0wfjkccte9enrw73wd9hsxv8qkt work) 🤯
+ Sending (public) zaps through nostr.
+ Sending (private) P2P payments through nostr.
+ ...

Looking forward for the future!!
Nostrify the world! 💪

Thanks for your work!
🫂 
 Only real when shared. 
nostr:nevent1qqstvr9s0j4gaqnhlwtwkqnnn7e2ad5mvfwaqrumpdgchr2wafmfscqpzpmhxue69uhkummnw3ezumt0d5hsygzsm98u9kzcp35zkpc62shck8335gqtq5yt4w26xwl0pp2a72qavvpsgqqqqqqsmx980m 
 Reckless 🧡