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.