Bitcoin Forum
October 17, 2018, 10:01:05 PM *
News: Make sure you are not using versions of Bitcoin Core other than 0.17.0 [Torrent], 0.16.3, 0.15.2, or 0.14.3. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: EthPledge: Smart contract for matching charity donations  (Read 16 times)
mrsoliditydev
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
March 31, 2018, 09:37:34 AM
 #1

I'd like to get some feedback on a small project http://ethpledge.com I've been working on the last few days. This is a smart contract and website where Ethereum users can pledge to donate a certain amount to an address (ideally a charity of some sort), which gets sent only if others match that amount. Upon creating a pledge to donate a certain amount to some address, the user sends that Ether to the EthPledge smart contract, and if others donate to that pledge too up to that amount of Ether it all gets sent to the charity address. You can also pledge to donate several times what others do (eg. you could put up 10 Ether, and say that if others donate only 2 Ether it'll all get sent to the charity address).

It is fairly common for companies to do giving pledges like this ("we'll match anything employees donate to this charity") and having something like this on the Ethereum blockchain makes it 100% transparent and by going through a smart contract can guarantee someone holds up their end of the bargain. There is at least one major international charity with an Ethereum address for donations, Heifer International (https://www.heifer.org/what-you-can-do/give/digital-currency.html) and I've created the first pledge on the website to donate 0.1 Ether to them: see http://www.ethpledge.com/id/0 Smiley (look at it while connected to the mainnet).

Should you create a pledge and then cancel it, you'll get a refund of your pledge amount in line with how much others have donated - if you cancel the pledge when 10% of the donation target has been reached, for example, 10% of your pledge amount (along with the donations) will be sent to the charity address, and 90% of the pledge amount you put up will be returned to you.

The verified contract code is at https://etherscan.io/address/0x10ec03b714a2660581040c1a0329d88e381ca603 and I've also uploaded the code for the website/UI at https://github.com/wanshun123/EthPledge if that's of interest to anyone.

Feedback and criticism very much welcome.

Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!