Affiliating programs to attract more users
Affiliate programs are one of the most widely used methods to attract more users. The program pays a person who helps bring in business. This can also be hardcoded into a smart contract to provide a referral bonus based on various factors.
In this recipe, you will learn how to create an affiliate program that rewards a person for bringing in new business. The referral bonus provided will be a percentage of the coins or tokens involved in the transaction. The logic stays as part of the smart contract to bring trust and transparency to the system.
Getting ready
You need to have a working installation of Ethereum (geth
, Parity
, ganache
, and so on) or the Remix IDE to test this recipe. The contract inherits the investable lottery contract created in the previous recipe. It is recommended to step through that before continuing with this recipe.
The contracts given are for illustration purposes only and cannot be used in real-world systems. It is also recommended...