To Danny Hamilton: Your patience is commendable. I hope you realize how dead-set I am on understanding this. Indeed my suggestions might sound a little ludicrous at this point, but hopefully I can get to where I able to describe them in terms that are understandable. Also, if you want to post an address I'll tip you for your time.
What you've explained so far is interesting.
They [users and thieves] are forced to spend the unspent transaction outputs in the blockchain that have a script that requires an ECDSA signature from the private key that is mathematically associated with your address.
I understand that Bitcoin uses an interpreted scripting system to determine whether an output's criteria have been satisfied.
AND
Scripting provides the flexibility to change the parameters of what's needed to spend transferred Bitcoins.
AND usually,
Most Bitcoin outputs encumber the newly transferred coins with a single ECDSA private key
I know that multi-sig transactions encumber the output with additional constraints (like m of n private keys needed to spend)
I think it's significant that users as well as thieves are forced to use these same constraints. In effect it means a user might encumber his own coins in a way that is to his advantage.
So before we think about designing constraints, What basic properties are we focused on here?
1.) The coins can be spent, but the pending transaction is broadcast and a specified amount of time (or confirmations) must pass before the coins actually leave your wallet.
2.) Sending the transaction again overrides the first, and again renews the pending withdrawal time.
3.) A failsafe address is added that allows the coins to immediately be spent to it. (very important)
I would find such constraints useful for several reasons: Transaction mistakes happen all the time by human-error. This allows users a window of time to change something before it becomes irreversible if they messed up a detail (like the amount, miner fee, or destination)
If a thief obtains the private key to an address and attempts to import/spend the coins, they too are subject to the same constraints that make withdrawals pending for the amount of time the owner originally specified. Any attempt to spend the coins will notify the owner, and by scripting design he can send to a failsafe address (which should be set up to have a private key stored elsewhere). A whole chain of such addresses set up so that the job of hacking 1 wallet becomes the job of hacking many.
Unlike multi-sig, which just makes hacking many private keys necessary, "pending withdrawals + failsafe" allows the owner to be notified that his private key has been obtained if the thief ever attempts to spend his coins. The coins are still his, and he can act accordingly.
It's literally like saying to a thief: "You can steal the key to my vault, but if you try to spend the money there I will know about it and can cancel it. Also, I can immediately send all the money to another vault I control that you don't have the key to"
Some similar (but not identical) functionalities already exist in the protocol like time locking contracts. The difference is that time locking just specifies a time until the coins become spendable in advance. Whereas we want to specify a time that the coins must wait to become spendable the moment that they are spent, in advance.
They would all refuse to relay transactions that attempt to spend the new output at the new address much like they refuse to relay transactions that spend "coinbase" outputs until they are sufficiently aged. That doesn't seem like it would work, by the time it has just a few confirmations, it is already embedded in the blockchain.
Well I admit that's where it gets murky to me. The problem is that we have to convince other nodes to reject a transaction that prematurely tries to send the full amount. That's what a thief with a modified wallet would try to do. But the thief can't change the output scripts because they're already set up. So we need script that's very smartly designed to begin with, we could try to design it so that it can't prematurely send the full amount, it needs to wait in a wallet first. The scripting should be flexible so that a variety of time frames can be inputted during creation. (I'm using 144 as an arbitrary number).
Perhaps the coins with these scripts would broadcast a kind of "intention to send" or "transaction start" in blockchain record. The intention then sticks with each successive block as pending until the requirements are met and it can finally be confirmed as sent. This kind of transaction first has to plant its foot somewhere, because the script requires:
- if the "intention to send" is > 144 blocks prior in the blockchain. Send = true and the coins will relay a transaction
- If it can't find its "intention to send" (never existed), or if it is < 144 blocks prior (still pending) then send = false and it creates a new point to start over again.
Because nodes have an awareness of which block they are currently viewing, it should surely be possible to create a script which is able to find a previous starting point in the blockchain and compare it to the number of blocks that have passed since, either sending or pending the transaction based on the result. (For these purposes, I mean to say pending = the coins stay in the wallet, waiting to be sent)
Ideally if we set it up correctly, attempting to spend the transaction again to a different address or different amount would broadcast another intention, overriding the first.
How is your wallet going to rewrite the blockchain without re-mining all the blocks since the transaction got its first confirmation?
We shouldn't have to re-write the blockchain. Starting a delayed wtihdrawal transaction keeps the coins in your wallet, but it absolutely has to broadcast a kind of transaction. Some solutions are more elegant than others.
- Maybe it sends a tiny amount first, (I don't think this is feasible)
- maybe the output scripts specify that it first must send the coins to another kind of intermediary address that you also control, and then it will either spend the coins to the ultimate destination or return them to an address you control based on which script has been satisfied.
- maybe the blocks are changed to be capable of storing these kinds of "intention to send" reference points that must exist before coins can ultimately be spent based on the requirements of these output scripts.
- maybe the transaction has outputs that specify that it simply must confirm much more slowly, able to become purposefully double-spent in the meantime (I also do not like this idea)
- or maybe its a case where all miners/clients/wallets update after a hard fork to be capable of recognizing/relaying/accepting these kinds of transactions which broadcast an intention first and a confirmation later.
Dabs
brings up the point of what happens when both a user and hacker control coins and can cancel each others transactions
1. coastermonger has 100 BTC in his "slow" wallet.
2. hacker compromises computer/wallet and gets private key.
3. hacker sends 100 BTC to another wallet.
4. coins are in "waiting" period for 72 hours.
5. coastermonger is alerted, cancels the transaction.
6. hacker notices that the transaction has been cancelled.
7. hacker sends 100 BTC to another wallet again, with a different transaction.
8. coins are in "waiting" period for 72 hours.
9. coastermonger is alerted, cancels the transaction.
...
That's what the failsafe address is for. We need a script that will say [require all these delays OR allow them to be sent to X address immediately and make sure the owner can provide the ECDSA with the private key] The failsafe address is another that is under the control of the owner and should be elsewhere so that the thief has to hack THAT failsafe address as well to get at the coins. A whole chain of such addresses could be set up. The thief would have to hack or know the private key for not just for "m of n," but for each and every one in reverse order so that they can attempt to irreversibly spend the coins without notifying you. That's the apparent magnitude of this idea. As of now when your bitcoins are stolen, the first time you learn about it is when it's too late. This changes it so that you're notified if your coins are stolen and you have the opportunity to act.
So you are creating a situation where transactions are reversible for 144 blocks? So I can pay you for merchandise, and almost a day later I can send those bitcoins back to myself even though I don't know your private key? And this sounds like a good idea to you?
Absolutely not. Indeed it sounds like a terrible idea, I don't think transactions should be reversible. I'm trying to create a situation where everyone's node basically understands that my transaction can't be sent until a specified amount of time has passed since its origin. Properly implemented, these scripts would not allow double spending because each new request replaces the last. It would not allow chargebacks because once the pending transaction is finalized it cannot be re-spent or refunded. The blockchain would record the coins as having a new owner.
There is another matter to address, in that no one should be able to send Bitcoins with these kind of constraints to an unwitting victim. Transactions that attempt to create coins with these encumbrances should be rejected by default for most every user. They should only be accepted willingly, most likely under a circumstance when a person is turning their own coins into "delayed withdrawal coins" for themselves.
So just a quick recap: I'm imagining a scenario where sometimes we can send coins which require extra output scripts to satisfy. These kinds of encumbrances are similar to but different than existing ones used in contracts. Why would they be useful? Because in the case that your private key is compromised, what would normally become a catastrophic loss becomes a case where the thief cannot spend your coins without notifying you, the coins take time to leave your wallet, and you (and the thief) are able to immediately transfer the coins to another wallet under your control. This may also be a voluntary encumbrance that users enact to protect themselves from sending a transaction with human errors like: the wrong amount, the wrong miner fee, the wrong destination.
The irreversible nature of of bitcoin transactions is an absolutely huge advantage over other currencies, but we should also have the option to sometimes say "not just yet"