2. About affiliate hierarchy - backdrop-contrib/uc_affiliate2 GitHub Wiki

UC Affiliate v2 allows vertical structures of affiliates with multiple levels, where affiliates on top get paid a commission whenever an affiliate they recruited (or an affiliate below the affiliate they recruited, etc.) makes a sale.

To set this up, first an affiliate must direct a "virgin" visitor interested in becoming an affiliate to the site or a page in the site, by using their path (e.g. https://example.com/affiliate/[UID] where UID is the user id of the affiliate doing the recruiting).

It is a good idea for the site administrator to create a page (for example) that explains the process of becoming an affiliate, so the user doing the recruiting could use a link such as https://example.com/affiliate/[UID]/how-to-become-an-affiliate. Once the "virgin" visitor visits that page, UC Affiliate v2 will link their browser to the referring affiliate. They can then create an account, or apply for one.

Then, the administrator must change the role of the new user to a role that can act as an affiliate. Once this is done, the new user will be able to direct customers to the site using their own path. All commissions earned by the new user will also generate a commission for the original referrer affiliate (using the commission structure at admin/store/settings/affiliate/commissions or the one created for a specific product).

Alternatively, the admin can set up the site to automatically assign the affiliate role to all new users after creating an account.

Drupal 7 has a helpful contrib module called "Apply for Role" that allows visitors and users to apply to be an affiliate. This module has not yet been ported to Backdrop.