com.r3corda.contracts / CrowdFund / <init>

# <init>

`CrowdFund()`

This is a basic crowd funding contract. It allows a party to create a funding opportunity, then for others to pledge during the funding period , and then for the party to either accept the funding (if the target has been reached) return the funds to the pledge-makers (if the target has not been reached).

Discussion

This method of modelling a crowdfund is similar to how itd be done in Ethereum. The state is essentially a database in which transactions evolve it over time. The state transition model we are using here though means its possible to do it in a different approach, with some additional (not yet implemented) extensions to the model. In the UTXO model you can do something more like the Lighthouse application (https://www.vinumeris.com/lighthouse) in which the campaign data and peoples pledges are transmitted out of band, with a pledge being a partially signed transaction which is valid only when merged with other transactions. The pledges can then be combined by the project owner at the point at which sufficient amounts of money have been gathered, and this creates a valid transaction that claims the money.

TODO: Prototype this second variant of crowdfunding once the core model has been sufficiently extended. TODO: Experiment with the use of the javax.validation API to simplify the validation logic by annotating state members.

See JIRA bug PD-21 for further discussion and followup.

Author
James Carlyle