Mike locked his
original thread unfortunately, so I thought it would be good to continue the discussion about assurance contracts here. Specifically, how to make them work, as well as other possible mechanisms. Regardless of what happens with the blocksize it's important in the long term: without the block limit we can expect transaction fees to fall to the marginal costs of a transaction, which means the fees aren't paying for any security at all, on the other hand, with a small blocksize limit, as I've been arguing for, you still run the risk that off-chain transaction systems get 'too good' and so few transactions actually happen on-chain that security still isn't being paid for. Mitigating both issues is the fact that we've got until about 2033 until the inflation subsidy decreases to even 1% - if keeping Bitcoin secure costs a few % of the value of the Bitcoin market cap every year in the long run, maybe Bitcoin is just too expensive?
An assurance contract, also known as a provision point mechanism, is a game theoretic mechanism and a financial technology that facilitates the voluntary creation of public goods and club goods in the face of the free rider problem.[3]
The free rider problem is that there may be actions that would benefit a large group of people, but once the action is taken, there is no way to exclude those who did not pay for the action from the benefits. In Bitcoin the problem is that mining is costly and benefits everyone who owns Bitcoins and/or performs transactions. A mining assurance contract needs to be constructed in such a way that participants agree that if some large amount of funds are commited, those funds will go to mining in some way, with the amount set to be large enough for a sufficiently high percentage of the economic activity of Bitcoin must have participated to avoid the free rider problem.
Bitcoin already supports assurance contracts as a transaction type[4] - for a mining assurance contract the transaction output would be set to either an anyone can spend output, or an address owned by a specific miner. However as-is they have a serious problem: a miner can always collect the funds pledged to date by simply adding a sufficient amount of their own funds to the outstanding contract, and mining that transaction themselves, thus turning the contract into a simple donation.[5] (modulo the small chance of the block being orphaned; if the chance is large, the assurance contract is not encouraging orderly mining) The problem can be mitigated somewhat by forcing donators to reveal their identity in a provable way, but then high participation is difficult to achieve.
With nLockTime a transaction can be created where the miner who will actually collect it is unknown in advance. As the deadline approaches, if the contract is not fully funded, participants double-spend their pledged transaction outputs to invalidate the contract. However this mechanism has the problem that anyone can make the contract fail, even if it is fully funded. That problem can be solved if Bitcoin's scripting language is extended to allow for transaction outputs that can only be spent by transactions following certain forms - the outputs would be locked to the contract until some time after the contract expires.
Funding network securityI wrote the above in the Wiki, and I think with the nLockTime + transaction templates fixes it's a workable approach that truly acts as a proper assurance contract, so technically speaking I think the idea works. Economicly and socially? I'm not really sure - at that point implementing proof-of-stake or even just signatures on blocks by trusted third parties might happen instead. It's hard to know, but what's important is the option is there.
I also really like Gregory Maxwell's Transaction checkpoints:
Each transaction (or signature?) should contain a block index and 32 (?) least significant bits of the block hash. The transaction's fees are only valid (or only their full value?) if they are mined in a chain they agree with. This would let people making bitcoin transactions 'vote with their wallets' on the identity of the chain they consider important. This isn't a viable POW replacement, but would greatly reduce the economic benefit of mining moderate depth forks, esp as fees begin to dominate the block reward. "You don't get (all) of my fee payment if you are mining a chain I don't like!"
- Nodes would typical checkpoint a few blocks in the past from their current height to avoid overstating their opinion unnecessarily.
- Deep checkpoints could be automatically triggered by observing a critical mass of coins-day-destroyed confirming them— creating a PoS-ish system, though this is subject to the 'nothing at stake' problem of PoS, and is probably very dangerous. (e.g. isolation risk for newly bootsrapping nodes)
User:Gmaxwell/alt ideasEssentially they're acting as a really fine-grained way of saying which version of Bitcoin history you support, and thus which version of Bitcoin history your transaction fees can go to. If the blockchain is re-orged deeply enough that the version of history now does not agree with what you agreed with, the miner who did that doesn't get your fees at all. He proposed it in the context of my
Discourage fee sniping with nLockTime pull-request, it's essentially a much, much stronger version of it, albeit one that requires a hard-fork.
What's interesting is you can combine transaction checkpoints and assurance contracts to create a contract that miners can only collect if they follow the wishes of the people funding the contract. The way it would work is you would first commit some funds to a transaction that can only be spent by an assurance contract for some amount of time. Next you find a contract you agree with, including what transaction checkpoint the contract will have, and quickly (within 2-6 blocks) add your inputs to the contract transaction. If enough people commit, it goes through. If not, you can find another contract, or wait until your locked transaction ouput expire and send the money back to your wallet.
Now if the chain gets re-orged, the rules are that the new block can't collect the fees from the checkpointed transactions. Gregory Maxwell suggesting adding those fees to a pool given to all miners over time, but I think perhaps simpler, and easier to construct short proofs of, would be to just add a new rule that turns those fees into a transaction output that can be spent subject to some conditions. This could be done directly as a scriptPubKey/txout:
<32-bit partial block hash> IS_HASH_IN_CHAIN? IF
ELSE OP_CHECKSIG ENDIF
The overhead here might be too much given a limited blocksize, and again I'm not sure that socially or economically the idea works, but technically speaking I think it's feasible. Thoughts? I'll add the transaction checkpoints stuff, with and without assurance contracts, to the Funding Network Security wiki page as yet another future possibility if the idea withstands scrutiny.