In this app your salary will be basically the comission of the total revenue generated by hosts and sub-agents in your agency, and the comission rate will depend upon how big the revenue is generated in your agency.
TOTAL REVENUE OF AGENCY = ( REVENUE OF HOSTS + REVENUE OF SUB-AGENT )
and your commission ratio will be determined each week on the basis of the total revenue of agency but the formula for salary from hosts is different and from sub-agents is different.
SALARY FROM HOST = ( COMMISSION RATIO * REVENUE OF HOSTS )
Example - you have 20 hosts whose revenue is 1000$ and you have 2 sub-agents whose revenue is 500$. hence, the total revenue of you agency becomes 1500$ ( 1000$ + 500$ ) then you are eligible for a commission rate of 15%, hence your salary will be ( 0.15 * 1500 ) = 225 $
SALARY FROM SUB-AGENT = ( YOUR COMMISSION RATIO - SUB-AGENT's COMMISION RATIO ) * SUB-AGENT's REVENUE
this will be iteratively calculated for each sub-agent i.e. this formula will be applied for each sub-agent and the sum will be your salary from sub-agent.
Example - lets say you have 2 sub-agents, first have a weekly revenue of 150$ (5% commission) and another have an weekly revenue of 500$ (10% commission) and your commission rate is 15%. now - salary from first sub-agent will be ( 15% - 5% ) * 150 = 15$ and the salary from second sub-agent will be ( 15% - 10% ) * 500 = 25$ so salary from sub-agent will become 35$.