skycoin / teller

Skycoin exchange service
15 stars 30 forks source link

Affiliate code system #166

Open gz-c opened 6 years ago

gz-c commented 6 years ago

An affiliate code system allows people who refer buyers to receive a portion of the coins sold.
They will not receive a portion of the coins taken in (BTC, ETH etc) because this makes the system much more complex (will need user accounts, a hot wallet or manual processing of withdrawals, etc).

Requirements:

A webpage "Affiliate Portal" allows a user to do the following:

On the affiliate portal backend,

Using only the skycoin address for this is simpler, but has other limitations. It does not work as a username or password, since addresses become public on the blockchain. Therefore the user can't do things such as check their pending rewards (if we send rewards on a time interval). Instead we will try to send their rewards immediately. Sending immediately has problems too, because some rewards may be too small to send. So, a compromise will need to be found, unless we want to implement a full user system.

In the teller service, add a new component for sending affiliate payouts:

Affiliate reward calculation:

There is a problem with this; if the affiliate reward is too small it can't be sent. Instead, this might be changed to calculate cumulative affiliate rewards on a fixed time interval, and if the cumulative reward is above a threshold, then send it.

gz-c commented 6 years ago

Spaco is developing this: https://github.com/spaco/affiliate