GithubHelp home page GithubHelp logo

blockdevsasia / bondeddonations Goto Github PK

View Code? Open in Web Editor NEW

This project forked from eoi-digital-hongkong-manila/bondeddonations

0.0 4.0 0.0 1.27 MB

Dynamically bonded donation curves - a refactored approach that will be merged into Khana before 2019

License: MIT License

HTML 5.52% CSS 0.33% JavaScript 94.15%

bondeddonations's Introduction

Bonded Donations

An experiment in applying dynamic token bonding curves to charitable giving

For more information on Bonded Donations, see the medium article

For more information on dynamic token bonding curves, see the medium article

What are Bonded Donations?

We utilise the design of dynamic token bonding curves to incentivise and increase viral growth of donations to charities.

TL;DR: A donation system where you receive tokens that grow in value, as more donations are made. Depending on what you value, you may 'exit' and sell the tokens at certain times, or hold onto them and continue to help grow the number of donors to the charitable cause.

How?

When Alice makes a donation to Charity A, 90% of her donation goes to Charity A while 10% goes into a contract to back the bonding curve. Tokens are then minted (10 tokens for every 1 ETH) for Alice.

Alice now has a few choices:

  1. Sell the tokens she just received back to the bonding curve (essentially taking back some of her donation). This is not an optimal choice for Alice.

  2. Ask her friends to also donate to the charity. As her friends start to donate, the funds backing the curve will increase, which also increases the value of each token in the dynamic bonding curve.

    • As a bonus, for every charity token that is awarded to a new donor, the same amount of tokens is also created and split among the current token holders (i.e. all of the previous donors).
    • In Alice's case, she has been rewarded for both being an early donor and for convincing her friend, Bob, to also donate.

In the second option, her selfish goal is to increase the value backing the curve, so her tokens can be liquidated for a larger original price. Her charitable goal is to increase the money being donated to Charity A. Both the selfish and charitable goal support the same outcome.

Potential attacks:

  • Hoarding a large potion of the supply to dump the tokens (and liquidate the curve): In this case it isn't really an attack, since to hoard a large portion of the supply you will need to donate a massive amount to the charity. This is the intention of bonded donations, so the outcome is positive. At the same time, early donors will receive tokens from the bonus pool, increasing the amount of tokens they hold.

Potential improvements:

  • Creating a stronger referral mechanism where you can earn a larger portion of the bonus pool for direct referrals.

To do:

  • Create bonus pool function
  • Deploy to a test net

Experimental Stack

  • Truffle 5 beta
  • Web3.js 1.0 beta

Set up

  1. Ensure you have truffle 5 beta installed
npm uninstall -g truffle
npm install -g truffle@beta
  1. Go to client directory and npm install
  2. In the client directory, do npm run start
  3. Run something like Ganache and migrate contracts to your local network

If you need to go back to truffle 4, simply:

npm uninstall -g truffle
npm install -g truffle

bondeddonations's People

Contributors

mrdavey avatar kivanov82 avatar

Watchers

James Cloos avatar Caspar Oostendorp avatar Amadeo Brands avatar Chris avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.