cashubtc / nuts

Cashu protocol specifications https://cashubtc.github.io/nuts/
MIT License
152 stars 52 forks source link

NUT-08: mint fee return any overpaid amount #146

Open thesimplekid opened 4 months ago

thesimplekid commented 4 months ago

Change NUT08 to reflect that should return any over paid amount on a melt even if it is greater then the fee_reserve this avoids wallets having to swap before a melt to get the correct amount.

ngutech21 commented 3 months ago

Just one thing to consider: This is changing the existing behavior of a mint. So I think it would be a good idea to signal this change to the wallet by adding a flag to the info-endpoint like supports_overpaying: true or something like that. So the wallet knows exactly how the mint will react. Otherwise it will be hard for a wallet to figure out what the current behavior of the mint is. The mint is signaling that it supports NUT-08 but not how it will treat an overpayment.

thesimplekid commented 3 months ago

Just one thing to consider: This is changing the existing behavior of a mint.

I don't think is actually changing the behavior of the mint and this is how nutshell implements it already @callebtc could you confirm?

thesimplekid commented 3 months ago

@elnosh @lescuer97 @ngutech21 Can you check and confirm your mint implementations follow this?