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.
_______________________________________________
bitcoin-dev mailing list
bitcoin-dev@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev