The basis of crowdfunding platforms like Kickstarter and Indiegogo is the same – they operate as the third party who collects funds from backers and then releases money to the project creator when the threshold is met. With Bitcoin, the need for a third party is removed and the process can be handled by the technology.
Here’s how it would work:
- Alice, an entrepreneur, decides to fundraise for the launch of her new product. She announces that the good will be produced if she can raise 100 BTC, and opens up contributions to anyone. She also creates a new address.
- Everyone who wants to contribute creates a new transaction that spends whatever amount they are pledging to the address Alice provided. They don’t broadcast the transaction. There are a few key differences from a regular transaction: A) Contributors can’t have any change. If they don’t have an address with an output of the right amount, they can create a new one by spending money to one of their own addresses. B) The input script signature is signed with SIGHASH_ALL | SIGHASH_ANYONECANPAY. C) The output value is set to 100 BTC, which is the funding threshold set by Alice.
- The transaction is uploaded to Alice’s server, which saves it to disk. It keeps a count of how many bitcoins have been pledged.
- When the funding threshold is met, the server merges the individual transactions into a single new one with only one output. That output is then spendable to the address Alice created, and the inputs are collected from the contributors. Earlier, the transaction was not valid and couldn’t be completed, because the inputs did not match the output. When total contributions reach the 100 BTC threshold, inputs match outputs, and the transaction becomes valid.
- The final transaction is broadcast to the network, sending the contributions to Alice’s address.
The Bitcoin protocol has several properties which make it perfect for crowdfunding and render the above steps possible.
- The fact that the transaction is not valid if inputs do not match output means that Alice cannot spend the bitcoins she receives until the threshold is met. This ensures that contributors can send her a pledge safely, knowing that it can only be spent when the total project is funded.
- SIGHASH_ALL means that every part of the transaction is signed with the exception of the input scripts. This is important as it allows the inputs to change (as occurs every time a new contribution is added) without breaking the transaction. If the outputs change, however, the transaction does break. SIGHASH_ANYONECANPAY is an additional modifier that means the signature only covers the input it’s found in – the other inputs are not signed and thus can be anything.
**One thing to be aware of is that the transaction isn’t actually spent until the total threshold is met, so contributors have to be careful not to forget about it and accidentally spend the same transaction twice.