-

@ PABLOF7z
2025-03-09 15:16:08
I think that's the task of a dedicated nutsack wallet tbh and mostly should just be automated, i.e. the amount of token events in which a mint's balance is spread is pretty much irrelevant to the user, so it's just a matter of convenience for the app and size limits of the relays.
(there is no fee implications like utxo management in bitcoin)
For example, my code tends to merge tokens when it makes sense, so if I spend proofs of a bunch of tokens I'll end merging the unspent proofs into one token.
If, for example, I redeem a nutzap or I deposit cashu into a wallet I just create a new token event.
My first implementation of this I was very eagerly creating new tokens and avoiding merging too many which fragmented the state quite a bit, now that I'm doing the "merge whenever multiple tokens are spent together" it feels like it's on autopilot.