Bitcoin Forum

Bitcoin => Project Development => Topic started by: s2 on August 03, 2014, 01:14:43 PM



Title: Bitcoin share payouts
Post by: s2 on August 03, 2014, 01:14:43 PM
Does anyone know of any script that's already written to handle share dividends?

What I'm looking at (*and correct me if this is insane) is having a single address X that people can anonymously send btc to.
Every period it looks at how much btc X has received.  From this it pays out a dividend to all src addresses where the funds came from.
E.g.
If Person A sends 0.1 BTC to X  and Person B sends 0.4 BTC to X, X now has a total balance of 0.5 BTC.

On payday there is a dividend of say 0.2BTC to pay out based on people's investment...  I want to send (0.1 / 0.5) x 0.2 = 0.04 BTC to Person A's original source address and (0.4/0.5) x 0.2 = 0.16 BTC to Person B's address.

As I understand it this should be entirely possible from just analysing the blockchain so Person A or B doesn't need to 'register' or anything, merely send btc to the address to become an investor.
I can't believe this is a new idea so curious if anyone has already written this script per chance?  I've got controls in mind to prevent the obvious ponzi scam it would lend itself too but seems a nice way to raise investment for my bitcoin project.