In this document, we describe how we can optimize (i.e., minimize) the fees a Cashu wallet has to pay the mint for making a Lightinig payment with an unpredictable network fee. We do this with the introduction of so-called blank outputs which are blinded messages with an undetermined value.
In Lightning, we usually don't know the network fees required for paying an invoice in advance. In many Lightning node implementations and user-facing applications, a maxium fee reserve is defined before an invoice payment is attempted to limit the maximum fee risk of a payment.
This makes it challenging to design an ecash protocol that can handle Lightning payments with variable (and thus unpredictable) fees since the ecash for a payment plus potential Lightning network fees need to be provided upfront before the payment is attempted. Since ecash is not divisible, returning ecash for overpaid fees is impractical. Therefore, in Cashu, what we do right now is to simply provide the fee reserve in a