Inspiration
Anyone who has delved into web3 and crypto knows that communities are the heart and soul of every promising project. In the spirit of decentralization, being able to crowdsource funds is vital to support decentralized projects. While platforms like Kickstarter and Indiegogo have their place, we want to offer a solution that operates completely trustlessly with open-source smart contracts that can be verified by anyone. While there are some projects that exist like this on Ethereum, the gas fees make donations, especially small ones, extremely prohibitive. Donations are heavily discouraged by the fact that every transactions comes with tens or hundreds of dollar in gas fees. By utilizing a promising innovation, ZK-rollups, we were able to create a platform that has essentially zero fees.
We're proud that we built a fully-functional application that is powered by ZK-rollups, providing users with a permissionless and decentralized crowdfunding application on Ethereum with essentially zero fees.
What it does
The main goal of our project is to allow this mechanism without absurd gas fees. In traditional finance, fees are (mostly) a thing of the past with products like Robinhood and others that make fees very low or gone all together. Unfortunately, the same is not true for Ethereum, where gas fees can often cause even simple transactions to cost tens or hundreds of dollars. For a crowdfunding platform, this is detrimental. By definition, crowdfunding relies on have many donations the community, oftentimes with each donation being small but have a large quantity. The current state of gas fees makes small donations prohibitive as there's a good chance your fee will be greater than the entire donation.
We used ZK-rollups to implement this. Layer 2 offerings can provide transactions with gas fees near 0, which is a massive improvement over Layer 1 Ethereum.
There are many reasons why you would still want this platform to be built on Ethereum, however. While other Layer 1s like Solana and Algorand do provide low fees, they do not have the vast number of users and established ecosystem that Ethereum boasts. For a crowdfunding platform, it is imperative that you can reach the most number of potential supporter - you wouldn't want to lose out of large swaths of eyes just because they aren't familiar with the chain you chose!
To illustrate the low gas fees that we were able to accomplish, a funding transaction typically costs around 0.0000000006 ETH on the testnet, or far below 1 cent USD. This makes crowdfunding accessible as you can be confident that your entire donation is going towards your project of choice, without any middleman taking anything away.
How we built it
We were set on building using cutting-edge ZK-rollup technologies, since that is what we wanted to learn about. Read the below sections to hear about our experiences!
Challenges we ran into
The first (and most interesting!) challenge we ran into was figuring out how to use zero-knowledge proofs to achieve our goal of a low/no-fee crowdfunding platform on Ethereum. In fact, this challenge was part of the reason why we chose to pursue the zk-track to begin with - we wanted to learn more about this promising technology and dive deep into the space. After learning about the mathematics backing zk-proofs using the wonderful resources provided by LionHack as well as online sources, we explored the current existing solutions for development.
First was Starkware's offerings, StarkNet and StarkEx. A priori, we thought we would use one of these since STARK-based validity proofs seem to be the most widely-used ZK-rollup solution at the moment, especially with dYdX's partnership with Starkware. After further exploration, we found that Starkware currently offers two solutions: StarkEx, a ZK-Rollup SaaS product], and StarkNet, a general purpose ZK-rollup solution. StarkEx is what dYdX uses, but it turns out you have to partner with Starkware in order to use it (it's more a tailor-made solution for your product). StarkNet is what we'd be looking for. StarkNet definitely looks promising, but it's important to note that contracts are written in their own programming language, Cairo.
The other main solution we looked into was zkSync. While zkSync doesn't appear to have any major projects currently on their platform like Starkware, they seem to be making great progress and have excellent developer support. One key draw of zkSync is its EVM-compatibility. Unlike StarkNet's use of an in-house programming language for smart contracts, zkSync support smart contracts written in Solidity. We thought this was a huge draw for developers and would be crucial in growing the platform thanks to easy onboarding for existing Solidity developers. zkSync is still in active development but has launched their zkSync 2.0 alpha testnet, which meant we would have no issues developing for it.
Lastly, we also looked at a few other solutions, such as Polygon Zero. Most of these were far too early to develop on however. Polygon Zero for example, while seemingly very promising and exciting, is still in development and has yet to launch. However, considering all these upcoming solutions we explored, we're very bullish on the future of ZK-rollups on Ethereum.
Ultimately, after thinking about all these considerations, we decided to move forward with zkSync mainly due to it's EVM-compatibility (especially for such a short hackathon, we thought it be best to spend our time on the most important parts rather than learning a new language). Exploring the different ZK-rollup solutions that currently exist and are soon-to-exist was a large part of our project, and we're glad we got to learn so much!
Accomplishments that we're proud of
We're most proud of being able to actually develop and deploy a full-stack web3 application that is powered by ZK-rollups. Especially considering how early all the existing ZK-rollup solutions currently are, we're proud that we were to execute on the vision we had in mind. The moment where we actually executed a transaction that funded our contract with a gas fee that was < 1 cent was an incredible feeling.
What we learned
We learned an incredible amount about ZK-rollup technologies, both about the underlying mathematics that powers it, as well as the practical development process. Exploring all the current offerings was a great way for us to survey the current state of the ZK-ecosystem and what the future may hold. On top of all that, we met lots of incredible builders and speakers which enriched our understanding of the entire web3 ecosystem as a whole!
What's next for zk-crowdfunding
We hope to take this beyond the hackathon and polish the code to make it a viable project. zkSync is still currently in alpha, but we're excited to follow along with their progress and provide developer feedback as they continue to grow. We're also excited for the future of zero-knowledge technologies broadly, and hope that many of the solutions we explored will be able to launch a viable product.
Thank you!
Thank you to the entire LionHack team and all the sponsors for running such a wonderful event. We're grateful to have had the opportunity to be part of the bleeding edge of such an exciting field!
Built With
- ethereum
- metamask
- solidity
- vue.js
- zksync
Log in or sign up for Devpost to join the conversation.