I would like to ask a question because this isn't explained in detail in the fedimint documentation and i am currently too lazy to read the code itself.
So there it is said that that you give ecash amount that is somewhat higher than the amount of the lightning invoice amount. (This is supposed to allow the gateway to make the actual fees in the network as well as get some sats for the service.) the ecash notes are locked so that they can only be unlocked with the payment preimage which can only be obtained by paying the invoice.
So i have a few things that are not clear to me:
- Do your wallet just put the ecash notes somewhere (where it is visible to the gateway), hoping that someone will see them and pay the invoice? Or does your wallet contact the gateway somewhat directly?
- Are lightning gateways appointed by the fedimint or every participant can anonymously become a lightning gateway?
- Since the wallet software should guess how much additional money is needed for the gateway to pay the invoice, how does it determine the amount? Does it have a fixed amount? Does it make multiple attempts with increasing fees?
- if there are multiple lightning gateways is it possible to have some kind of race condition where multiple gateways attempt to pay the same invoice?