What is Nostr?
calle ๐Ÿ‘๏ธโšก๐Ÿ‘๏ธ
npub12rvโ€ฆ85vg
2024-02-29 08:33:16

calle ๐Ÿ‘๏ธโšก๐Ÿ‘๏ธ on Nostr: Distribution of Cashu token set sizes necessary to make a random payment between 1 ...

Distribution of Cashu token set sizes necessary to make a random payment between 1 sat and 1M sat by thunderbiscuit (npub1thuโ€ฆa79l)

We're interested in the number of tokens necessary for several reasons. First, we need to transmit tokens and the payload size is important for a medium like QR codes or other low-bandwidth media.

Second, Cashu is going to have fees, one way or the other. Fees are going to scale with the number of inputs and outputs of an ecash transaction (that's what directly translates to cost). For a fee of 0.1 sat per input or output, roughly 50% of transactions in this range will need 10 inputs, and to keep things simple, will produce 10 outputs, which translates to a fee of 2 sat.

Active field of research and discussion.

Distribution for random payment between 1-1M sats:



If you're willing to overpay by a maximum of 16 sats, you can minimize the number of tokens necessary and the distribution changes accordingly. This can increase transmission speed (less data) but is probably not going to be offset by a savings in fee (16 sat overpayment vs ~1 sat fee savings):

Author Public Key
npub12rv5lskctqxxs2c8rf2zlzc7xx3qpvzs3w4etgemauy9thegr43sf485vg