Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

Allow amount of 0 to mean "transfer all remaining runes" #11

Closed
Psifour opened this issue Sep 27, 2023 · 7 comments · Fixed by ordinals/ord#2531
Closed

Allow amount of 0 to mean "transfer all remaining runes" #11

Psifour opened this issue Sep 27, 2023 · 7 comments · Fixed by ordinals/ord#2531

Comments

@Psifour
Copy link

Psifour commented Sep 27, 2023

"Decide whether or not an amount of 0 in a transfer should be a shorthand for all remaining runes."

@summraznboi
Copy link

Not sure if this is necessary, since all remaining runes gets transferred to first non-OP_RETURN output already; no need for duplicate ways to do the same thing.

@Psifour
Copy link
Author

Psifour commented Sep 27, 2023

Imagine a case where a UTXO holds X BOB and Y JANE. This would allow easily specifying to move all of the JANE tokens to a specific output instead of the default behavior of sending all of both BOB and JANE to the first non-OP_RETURN output.

This lends itself to removing a specific token (in full) from a UTXO that may have required more bytes to move otherwise (large values and/or decimal places).

@summraznboi
Copy link

I agree with the benefits of being able to target just a specific rune token using 0, my thought is though in case there is a bug in some indexer implementation that accidentally misses setting the assignment value, I’d rather it be a noop than accidentally sending out the whole balance.

Basically in this case I vote robustness over byte savings in this particular instance. Let me know if I am being too paranoid, but this is financial data, so the simpler and harder to create bugs due to branching logic the better (especially in assignment logic).

@hantuzun
Copy link

I like this feature as it makes it easier to construct transactions (for clients) and it'd also save a few bytes in some transactions.

@summraznboi
Copy link

Actually, in light of the proposal by @casey in #20, I am in favor of using 0 for all runes for a rune token in inputs. This allows for a token issuer to chain transactions from the issuance transaction for easy tiered airdrop support.

@casey casey changed the title TODO: Define 0 Value Behavior Allow amount of 0 to mean "transfer all remaining runes" Oct 10, 2023
@casey
Copy link
Owner

casey commented Oct 13, 2023

@summraznboi Can you elaborate a little? I don't think I understand what you're describing.

@summraznboi
Copy link

I am just referring to the fact that the issuance transaction can be immediately chained with with follow up transaction that does the split as described in #20. That way you can immediately deploy with “fair mint” right out the bat. However, this only really works if the issuance is guaranteed to succeed, which isn’t the case with required unique symbol, so the same would apply, but the fair trade transaction will have to come afterward after 6 blocks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants