I'm pretty sure I understand your questions, and the way you phrased them in the 2nd paragraph is easier to answer.
The short answer: The algorithm author is paid on the basis of all (any) profits generated by their algorithm less costs attributable to their algorithm.
The long answer:
First, I want to clarify how we consider leverage when choosing algorithms for an allocation. When an algorithm has a starting capital of $1 million, and it buys $3 million in stock, that's a leverage of 3.0 (the calculation gets more complex when the algorithm is both long and short, but you get what what I mean). That 3.0 leverage algorithm is perfectly legal for the contest, but currently we wouldn't give it an allocation in that form. If that algorithm with leverage 3.0 does well in our selection process, currently we will ask the author to modify the algorithm's capital usage to be 1.0, and it is then tested further.
Now, that means that we're working with a portfolio of algorithms that individually don't typically increase the amount of leverage used. We can increase the leverage "on the back end" and give each algorithm starting notional capital allocation.
Now, imagine this hypothetical and simplistic example: We're have $20 million in cash to invest. We lever it to $100 million (5X). We have 25 algorithms. On the first of the year, we allocate each one of them a notional capital of $4million. At the end of the year, imagine that each one of them was up 5% ($200,000). From that $200,000, we would deduct costs including appropriate financing costs charged to obtain the leverage. The algorithm author would be paid their share of the resulting profit. This is a simplistic example and the details are spelled out in the license agreement we execute with the author.
Disclaimer
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.