Pages:
Author

Topic: mutltisig for txns that are not currently valid, but may become valid? - page 2. (Read 2178 times)

legendary
Activity: 1526
Merit: 1134
nLockTime was designed to operate in conjunction with sequence numbers, which let you replace timelocked transactions that were already broadcast (a better phrase might be "update").

A long time ago tx replacement was disabled after a series of bugs were found in the Bitcoin code, and there was a desire to reduce the programs surface area by disabling unused features. So we need to re-activate it at some point after building confidence that it's safe.
legendary
Activity: 1050
Merit: 1003
Based on this post, nLockTime won't really do much at all.
https://bitcointalksearch.org/topic/m.1274478
Once the txn is broadcast neither party can spend coins out from under it regardless of whether nLocktime is enabled or not.

Is there a plan to change this so that you can generically "spend coins out from under" an nLockTime txn, unilaterally invalidating it. This seems like a good idea to me.

Otherwise, I can't understand what the point of nLocktime is.




legendary
Activity: 1022
Merit: 1033
There is no "valid until" feature in transaction, but there is "not valid till" feature. It is called nLockTime: before nLockTime happens, transaction isn't considered final (locked) and thus cannot go into block. nLockTime can be specified either in wallclock time, or it can be specified as block number.

As you can see, this feature is frequently used to implement contracts: https://en.bitcoin.it/wiki/Contracts

You can simply use nLockTime somewhere in future and no party will haven an advantage in multisig/coin swap transaction: both can back out before nLockTime by spending their output.

It is less than perfect because it is prone to all sorts of race conditions, it is just that no party has a priority in that race.
legendary
Activity: 1050
Merit: 1003
[tl;dr simple financial trading doesn't work well via simple multisig/"atomic coin swapping". I describe a theoretical fix for that. Not sure if it can implemented. What do you think?]

In financial trading, there is a problem with regret. Prices move, making one party happy and the other party sad. Standard multisig requires that one person move first. The second person has no obligation to sign his end of a partially-signed txn. This allows the second person to back out of all non-profitable txns. Rationally, no-one should offer to go first. Alternatively, the person needs compensation to motivate them. (essentially they are selling an option to the person going second, not just making a regular trade)

Could we allow both parties to back out of trades up to a certain time frame. If so, then only mutually agreeable trades would be concluded.

Specifically, is the following arrangement possible? (I'm going to go start with the second broadcast txn, and then work backwards to a pair of initially broadcast txns.)

A and B want to do the following multisig txn in block t. At time t-1, they sign the following txn. (It doesn't matter who signs first here. A and B are indifferent about that.)

1 BTC from A to B
10 coloredUSD from B to A
This is valid in only blocks t or earlier. Outputs in this txn may not be spent until block t+2, except in the case below.

They also want to have an opportunity to reverse this txn up to time t+1. At time t-2, before they produce the real txn, they sign half of the following "anti-txn".  (Again, it doesn't matter who signs first here. A and B are indifferent about that.)

10 coloredUSD from A to B
1 BTC from B to A
This is valid in only blocks t+1 or earlier.

There are two versions of this txn, so either party can back out at any time before t+1.

The "anti-txn" would only be valid if it is submitted after the actual txn enters a block.

[sorry if this has been covered before, it is difficult to keep track of everything. To sum up the gist of this, if BTC prices are stable, then txn will go through. If BTC prices fluctuate between t-1 and t+1, then the txn will be reversed and prices will need to be renegotiated in a new txn. We keep renegotiating until a mutually agreeable trade can be completed. Txn fees prevent us from renegotiating over trivial issues.]
Pages:
Jump to: