Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NUT-XX: Token non-adjacent form (NAF) #187

Closed
wants to merge 2 commits into from

Conversation

ok300
Copy link
Contributor

@ok300 ok300 commented Nov 7, 2024

This PR proposes a way to build a more compact token. For a table comparing it to the common token representation (powers of two), see https://gist.github.com/ok300/c94caa4b21807307bb21ab0dade38508 .

For easier reading: https://github.com/ok300/nuts/blob/ok300-token-naf/xx.md


I'm not sure if this belongs as a new NUT, or as an addendum to NUT-02 "Keysets and fees", or as something else entirely. Arguments I considered:

  • why it should be a NUT: because a mint that supports it will indicate it in its Mint Info response, which lets wallets know it supports more compact tokens without requiring wallets to fetch its keysets
  • why it should be an addendum to NUT-02: to make mints and wallets aware of this more compact way of using keysets, since NUT-02 is focused on keysets

Please let me know if there is a better place for this, or if you find any issue with the reasoning in it.

@prusnak
Copy link
Collaborator

prusnak commented Nov 7, 2024

I don't get this proposal.

What is stopping me from swapping 4 sats for [4, -4, 4] and then swapping [4, 4] for [8] and discarding [-4]?

@ok300
Copy link
Contributor Author

ok300 commented Nov 7, 2024

Didn't think of that, good catch. Yes, bad idea.

@ok300 ok300 closed this Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants