public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Andrew Melnychuk Oseen <amo.personal@protonmail•com>
To: "bitcoin-dev@lists•linuxfoundation.org"
	<bitcoin-dev@lists•linuxfoundation.org>
Subject: [bitcoin-dev] Relative txout amounts with a Merkleized Sum Tree and explicit miner fee.
Date: Fri, 18 Nov 2022 21:11:54 +0000	[thread overview]
Message-ID: <zKbMpqEqH6Z4p1GE2rlsOky1fMPBsEFGaeNk8WIcbez__-fR3ahnYEWOgExHC8KXAYCqtt4gMa7WBXkNSqL6fO9sjsvyu9AZRPQIQADqthg=@protonmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2244 bytes --]

Can output amounts be mapped to a tap branch? For the goal of secure partial spends of a single UTXO? Looking for feedback on this idea. I got it from Taro.

Merkel_tree_root_tweak = tagged_hash(“root” || left_hash || right_hash)

Tree_branch = tagged_hash(“branch” || left_hash || right_hash ) || right_output_sum + left_relative_output_amount

Tree_leaf = tagged_hash("leaf" || script ) || relative_output_amount

Transaction Validation:

There would be one output with an amount that is negative.

The negative amount would flag this transaction as relative amount spends.

The miner fee would be the absolute of the output amount.

The witness would include the txout amount.

Txout is less than other inputs that referencing this output.

Questions:

Would this require a hard fork?

Would the sum be required in the asset tree?. The sum at the root would be implicitly 1.0. How big can a taproot tree get before it is too cumbersome?

Could multiple taproot trees be put inside a tweak?

Am I missing anything vital?

Possible Benefits

Perhaps slightly increase privacy of output amounts?

Reduced growth rate of UTXO’s. This scheme would be consuming N inputs and producing 1 output.

Drawbacks

I think this would disable the ability for output change addresses to be the same as inputs as the spending amounts are absolute.

Transaction Example

Inputs : [1.5,.3,.1]

TapTree:

Branch sum :1

Change Address : .5

Branch sum: .5

AlicePubKey: .2

Branch sum: .3

BobPub and BobHash: .1

Branch sum: .2

CaroPub and DavePub and CarolDaveHash : .1

ErinPub and CarolDaveHash and after 10days : .1

Outputs: [-.0.001]

Alice spending example

Alice sends to new address : .1 * (sum of Inputs + outputs) = 0.18999

Alice New Change Address = .1 * (sum of Inputs + outputs) = 0.18999

Application

I think something like this would provide away to onboard a lot of lightning channels with a single UTXO output. An exchange could schedule open lightning channels at certain time intervals, perhaps every 10 minutes. Ideally, people would provide pubkeys and payment, to be placed in a tap leaf. Similar to selling seats for an aircraft flight.

Thanks for reading

Andrew

Sent with [Proton Mail](https://proton.me/) secure email.

[-- Attachment #2: Type: text/html, Size: 15445 bytes --]

             reply	other threads:[~2022-11-18 21:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-18 21:11 Andrew Melnychuk Oseen [this message]
2022-11-21 23:52 ` ZmnSCPxj
2022-11-26  0:12   ` Rijndael

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='zKbMpqEqH6Z4p1GE2rlsOky1fMPBsEFGaeNk8WIcbez__-fR3ahnYEWOgExHC8KXAYCqtt4gMa7WBXkNSqL6fO9sjsvyu9AZRPQIQADqthg=@protonmail.com' \
    --to=amo.personal@protonmail$(echo .)com \
    --cc=bitcoin-dev@lists$(echo .)linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox