Crowdfunding Dapp with Ethereum Solidity

Rishav Shekhar
3 min readOct 15, 2020

A lot of us might have been in a situation wherein we had a brilliant idea, may it be of a product or an event, but just didn’t have the funds to bring it to life. This is where crowdfunding comes in.

Crowdfunding platforms such as Kickstarter and Ulule have emerged over the last years as the place to go to get the funding necessary to make projects come true — be it a business start-up, a creative work or a social activity. Many individuals chip in and as a crowd they contribute money to help artists produce their records, graphic novels, video games; or to allow geeks to produce a tool to transform bananas in a piano, or a set of tools to make robots with drinking straws. More: a project founder might ask for, say, fifty thousand dollars to produce a wheeled plastic cooler, and receive support for thirteen million, 260 times as much.

What is behind crowdfunding’s success? Is simply asking for help enough to tap into the reservoir of altruism present on the Internet? Well, it is not so easy. Only about half of all crowdfunding campaigns actually get funded, and the extent of funding varies considerably across projects. Many dismally fail.

In this tutorial, we’ll be building a simple decentralized crowdfunding platform using Ethereum.

Tools

  1. Solidity
  2. Remix
  3. Metamask
  4. Ganache

Prerequisites

  1. Getting Started with Metamask
  2. Compile and Deploy Using Remix IDE
  3. Introduction to Smart Contracts and Solidity

Why Make a Crowdfunding App?

Great ideas need effort and funding. You can ask for donations or solicitations, but donors would of course prefer giving to projects where they have some sort of certainty that the project is actually going somewhere.

This is where crowdfunding comes in, an ideal setup where you can specify your goal, and a deadline for reaching it. If you miss your goal, the donations are returned, therefore reducing the risk for donors.

The existing platforms are all great, but in every completed project or in every donation sent, the platform takes a certain percent (margin) which could, at times, be too high for the project starters. What’s more, is that we heavily depend on them as the third-party that connects us to the donors. Should they fail, then we’re also in trouble.

With a decentralized setup, we can have a trustless platform and therefore the only fees everyone will pay are just the gas fees.

This is also one of the apps that are good to build early on, because you can definitely learn a lot by doing so.

Creating the Smart Contract

We’ll be using Solidity, one of the programming languages used for creating smart contracts, specifically for Ethereum-based ones.

In Remix, create a new file named Crowdfunding.sol and add the following code:

Output

Future Prospects

It doesn’t seem user-friendly to use Remix to interact with the contract, so we’ll try to make a simple web application in coming future.

--

--