- JavaScript 89.9%
- Solidity 10.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| components | ||
| ethereum | ||
| pages | ||
| test | ||
| .gitignore | ||
| .prettierrc.yaml | ||
| .tool-versions | ||
| LICENSE | ||
| next.config.js | ||
| package.json | ||
| pnpm-lock.yaml | ||
| README.md | ||
| routes.js | ||
| Screenshot.png | ||
| server.js | ||
Kicksartereum: Kickstarter on Ethereum
Introduction
Kickstarter helps artists, musicians, filmmakers,
designers, and other creators find the resources and support they need to make
their ideas a reality. Potential future customers, 'backers', can contribute to a project to finance the development of a product.
Sounds awesome.
However, a fundamental problem for crowdfunding is how asymmetrical the risks faced by backers and founders are.
After having invested, backers don't get a say on how their money will actually be spent.
Worse: which guarantee do they have that the founder they backed, will actually
deliver what they promised, and not go away which the funds successfully collected from the backers?
Ethereum & smart contracts are a great solution to come around these issues. Indeed, the collecting of funds and spending of collected funds gets automated in a secure and a decentralized way.
The risks previously faced by backers disappear because they get to vote on how funds are spend.
Demo video
Requirements
The smart contract application I deployed on the Ethereum Rinkeby test network fulfills the following:
- A founder can create a new campaign. He/she sets the minimum contribution amount for future backers.
- Anyone can back a created campaign, provided they contribute at least the minimum amount set by the founder.
- The smart contract controls the funds. Neither the founder nor the backers are able to take out or spend funds collected by the campaign
- Only the founder can create payment requests. He requests the backers to agree on how to spend the campaign's funds. He specifies the payment's recipient.
- Backers can approve (1 time each) payment requests
- The founder can finalize a payment request that has been approved by a majority of backers. This automatically executes the payment (transfers amount to recipient)
Getting started
- Clone or download this repository
- Install dependencies:
/kicksartereum $ npm i - Run client application:
$ npm run dev - Access at localhost:3000
Development
Compile
/kicksartereum/ethereum$ node compile
Deploy
- Set environment variables required for deployment. Create a
.envfile in/ethereumwith the following lines:
INFURA_KEY=<your infura project id>
MNEMONIC=<your metammask mnemonic>
- Deploy contract:
/kicksartereum/ethereum$ node deploy - Edit
ethereum/factory.jsand update the address (line 7)
Tests
npm test
Resources
- Metamask: 'brings Ethereum to your browser.''
- web3.js: Ethereum JavaScript API.
- React.js: 'a JavaScript library for building user interfaces'
- Next.js
- Semantic-ui: 'development framework that helps create beautiful, responsive layouts using human-friendly HTML.' Official React integration.
- Mocha: 'the fun, simple, flexible, JavaScript framework.'
- Ganache: 'Quickly fire up a personal Ethereum blockchain which you can use to run tests, execute commands, and inspect state while controlling how the chain operates.'
- Heroku
