i heard routing is the hard problem with meshnets. is there a way to incentivize routing with an ecash stamp attached to a message? 🤔

the stamp could be initially locked to an HTLC where the preimage is included in the message itself so only the recipient can claim it. that's the easy part, this can be done today.

i wonder if it's possible to add an onion encryption layer to the ecash stamp for each message hop and share the decryption key with the mint. when the recipient gets the message they send the onion encrypted ecash to the mint, who unpeels all the layers, confirms the unlocking script and splits the token evenly between all the message carriers and the recipient with p2pk locking conditions.

i might be missing something but it seems possible. the tricky part seems to be sharing your decryption key privately with the mint beforehand. you don't want the ecash unlocking to require any interactivity. maybe some kind of schnorr sig linearity tricks like with PTLC...

food for thought

Reply to this note

Please Login to reply.

Discussion

maybe use something like an HMAC where your npub is concatenated with the hash of the onion messages and hashed. that way it's deterministic, unpredictable, and associated to a known (to the mint) identity

me rn