Are you a VIP, a Very Important Philanthropist ?

Upcoming challenges and overview of the smart contract

Vincent Le Gallic
Jun 14, 2017 · 4 min read
Image for post
Image for post

Since the presentation of Charitychain a few weeks ago on Medium, I have many positive feedback. I am now very motivated to launch the first version of the service in the coming months. Here is a small reminder of the concept :

Image for post
Image for post
The first fundraising platform on which fundraisers must give first
  1. The campaign author deposits 50% of the campaign goal.
  2. Contributors try to unblock the initial donation by collecting 50% of the goal.
  3. If they succeed, 100% of the funds go to the NGO, otherwise, everyone is refunded

To successfully launch this service, the following are the main challenges to be addressed in the coming months:

  • Find a major NGO partner to create a movement around a important cause
  • Find a VIP (Very Important Philanthropist) ready to make a high enough initial donation to challenge his community
  • Be technically reliable

Find a partner

Before opening the service to everyone, creating exclusivity seems to me a good idea because in any case, the service will not have an interplanetary success as soon as it is launched. There is nothing worse than a page that would list 3 campaigns in chess … Our goal is to find a courageous NGO partner that understands the extraordinary potential of the blockchain in charity. And cases of concrete use of this technology already exist !

Find a VIP

The initial deposit must be large enough, it must make people want to make a move to unlock the amount. If the initial amount is large and the cause is federative, the campaign will be supported and shared. Again, there are many examples of personalities making use of their notoriety to support humanitarian causes …

“We can use the strength of social networks not to influence but to inspire others”

Be technically reliable

There is an incredible community around Ethereum! I exchanged with several developers these last weeks and Blockchain is a subject as complex as exciting! The campaign smart contract is not finished but it will look like the version below. This version already respects some standards (Pull Payment, Fail as early as possible, Order your function code, State Machine, …) But there is still work (Factory, stopInEmergency, …)

Here is a short (self) review of the code with the recommendations listed in this article.

With the function modifiers atStage(expectedStage), validContribution(), validRefund(), i think that this recommendation is implemented.

The idea is to isolate each external call into its own transaction that can be initiated by the recipient of the call. Payments are isolated in payoutToBeneficiary() and withdrawRefundContribution() functions because this external calls can fail.

With the modifier functions, this seems ok.

The types of variable used, the absence of loop and asynchronous payments… These techniques should protect the contract from platform limits.

In progress in Solidity with Truffle Framework.

Not yet implemented.

For now the limit (fundingCap) is hard coded to 10 times the initial goal, but I’m not convinced by this idea, it is a point to improve but the mechanism is ready and if the gap is reached, the contract will reject any direct payments (function modifier validContribution()).

I read the code of several open source crowdfunding projects and I tried to gather the ideas that seemed to me the simplest and logical ones. The “state machine” pattern greatly improves the readability of the code. The function modifiers simplify the code and increase the reusability of the conditions check. I will try to keep functions simple and short so that the smart contract stays easy to understand.

Not yet implemented, but the contract will inherit from another contract like Ownable.sol.

If you have any questions or ideas to improve Charitychain, please do not hesitate! If you liked this post, hit the ♡ and Stay tuned with the newsletter , No spam, just some good news!

This new article is also an opportunity to thank those who spontaneously spoke of Charitychain as Crypt0 in this video or Griff Green on giveth.io Slack, very nice, thank you! Follow their project, they do an awesome job to develop really useful things.

I attended some interesting Meetups in Paris organized by the association Asseth (which I joined recently) I also had the chance to code with very good developers during a Workshop on security of smart contract at Hacker House Paris, a very good experience too! And thanks Romain Menetrier for reviews and ideas to improve Charitychain.

charitychain

Inspire your friends by doing an outstanding action.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store