Two Levels of Affiliates

I'm looking to offer affiliate payout on my main site, with prosites installed and I would like owners of sites to be able to offer affiliate payout to people who refer members.

Can this be done?