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:
  1. 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?
  2. Are lightning gateways appointed by the fedimint or every participant can anonymously become a lightning gateway?
  3. 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?
  4. 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?
  1. It either contacts the gateway directly with the locked ecash or goes through the federation to contact the gateway, I forget.
  2. Anyone can be one
  3. Fixed
  4. No. It's even fine for the invoice to be split across multiple gateways in an mpp payment.
These are excellent questions that I think Kody Lowe or Jodom can solve. They're both maintainers of the protocol