Proof of Contribution—Measuring and Ranking Impact In OSS
You may have heard about Proof of Work and Proof of Stake, but what’s Proof of Contribution? The novel ranking algorithm is the tea Protocol’s innovative solution to identifying and evaluating the impact of all open-source software and distributing rewards to registered OSS projects. Proof of Contribution is engineered to enable OSS developers to capture the value that they create.
tea is spearheading the development of Proof of Contribution to establish a decentralized technology framework that rewards impactful OSS projects—even those at the base of the tech stack. Keep reading to get a solid understanding of Proof of Contribution, and how it evaluates the impact of your OSS contributions and drives the tea Protocol rewards distribution system.
What is Proof of Contribution?
Proof of Contribution is an algorithm engineered by tea that continually evaluates and scores every open-source software project based on its influence and value within the OSS ecosystem. tea’s algorithm is inspired by Google PageRank and aims to accurately quantify the impact of each OSS project over time by modeling open-source software as a directed graph.
Proof of Contribution accomplishes several important objectives for the tea Protocol:
- Quantifies the impact of an OSS project based on the project’s orientation within, and utilization by, the software ecosystem over time;
- Assigns each project a dynamic score—referred to as the project’s teaRank; and
- Distributes TEA token rewards to registered projects according to their teaRank.
The Proof of Contribution ranking algorithm is designed to benefit foundational software far removed from the application layer—software that tends to be the most critical but least visible to the public, attracting the least support. Proof of Contribution extends the reward mechanism to ensure that all OSS components of a software project are rewarded for their contributions. Furthermore, open-source software is fraught with a unique set of spam challenges. Proof of Contribution identifies and isolates spam software to ensure that only impactful projects receive fair rewards.
What is teaRank?
teaRank is the measure of impact that an OSS project has on the software ecosystem. teaRank is used to accomplish several important functions:
- Quantify every OSS project’s impact in the software ecosystem
- Determine every project’s eligibility to receive TEA tokens from the tea Protocol
A project’s teaRank is one of its most salient features in the tea Protocol. Proof of Contribution assigns a teaRank to every open-source software project included in a supported package manager, regardless of whether it’s registered with tea.
5 key design elements of Proof of Contribution
Proof of Contribution is the impact measurement algorithm that’s fair, equitable, and spam resistant. Let’s get a deeper understanding of Proof of Contribution by exploring its key design characteristics.
1. Proof of Contribution scores impact
Proof of Contribution measures project impact by modeling open-source software packages, their versions, and their dependencies as nodes and edges in a graph. The algorithm uses probability distribution to assign scores to the nodes—teaRank scores, which represent the likelihood of randomly navigating to a particular node.
Proof of Contribution uses various inputs and anti-spam mechanisms to accurately measure a software project’s impact. To output a teaRank score, the algorithm may consider these aspects of a software project:
- Project influence, using the project’s number of dependents as a proxy
- Project impact over time, using the age of the project as a proxy
2. Proof of Contribution measures cumulative impact
Proof of Contribution evaluates how the impact of every project in the OSS ecosystem changes over time—an analysis that demonstrates which OSS projects consistently deliver substantial value. To measure this, it splits the open-source graph into distinct time periods, or delta (δ).
For each time period, the algorithm calculates the teaRank of each project using information from previous periods to inform the teaRank calculation in the current period. This provides a nuanced and long-term history of a project’s significance, plus incorporates all the versions of a software project when determining its impact.
The number of δ time periods that Proof of Contribution uses for its analysis is an important design choice. Using too few δ intervals may not quantify the full impact of an OSS project, while using too many intervals can significantly disincentivize newly established projects. Using excessive δ intervals also creates a computational burden by requiring the tea Protocol to reconstruct the entire open-source graph δ times to generate teaRank.
3. Proof of Contribution counters tree and width attacks
Proof of Contribution is modeled to resist spam based on two primary frameworks—tree and width attacks. Taking this approach to combat spam is effective because spam techniques for open-source software frequently involve hijacking existing software projects or creating complex dependency networks that contain malicious code.
Let’s examine tree and width attacks:
- Tree attack: Imagine a pyramid of software dependents. A malicious actor creates a long chain of dependent projects to artificially inflate the importance of each project in the chain, aiming to unfairly generate rewards for each software dependency.
- Width attack: Picture a single software project surrounded by many dependent projects. A malicious actor creates a large number of false dependents to artificially inflate the impact of the project at the center.
Proof of Contribution combats tree attacks in part by quantifying the longest dependency path that a software project traces to a project with no dependents—known as its tree limit. The algorithm defends against width attacks in part by calculating a software project’s width limit, or its total number of software dependents. Proof of Contribution consistently monitors tree and width limits over δ time intervals to identify—and potentially flag as spam—any abrupt changes to a software project’s position in the OSS ecosystem.
Proof of Contribution also defends against tree attacks by using the advanced notation Kappa, or κ, to throttle the influence of open-source software projects. κ is a measure of self influence, which is derived from Proof of Contribution’s use of self edges—edges from nodes (OSS projects) to themselves. Kappa ranges in value from 0 to 1.
Let’s examine the most important features of κ:
- Constricts the flow of rank from software projects to their dependents
- Aims to distribute value in a balanced way by containing the impact of software projects deep in the tech stack
- Normalizes edge weights among different projects to a sum of 1−κ, limiting the extent to which any single project can affect another's ranking
4. Proof of Contribution balances influence throttling with impact measurement
The Proof of Contribution algorithm incorporates δ and κ to output teaRank scores that are fair and accurate—although overly relying on one metric or the other can produce unwanted results. Proof of Contribution aims to balance influence throttling (κ) with time-based impact measurement (δ) to accomplish two objectives simultaneously:
- Fairly represent the impact of every OSS project over time; and
- Create a welcoming environment for new, potentially disruptive projects.
Assigning too much computational authority to κ can skew the distribution of rewards heavily toward established open-source software projects—while relying too heavily on δ may stifle innovation by disfavoring OSS projects that are just emerging. The Proof of Contribution algorithm is calibrated to avoid these pitfalls while simultaneously operating in a resource-efficient way.
The initial values of δ and κ have been defined by conducting extensive data analysis but can be adjusted. Starting during tea’s testnet phase, tea developers will closely monitor the performance of teaRank and potentially recommend adjustments to δ or κ to the teaDAO.
5. Proof of Contribution uses thresholds and limits
Proof of Contribution uses a combination of thresholds and limits to further boost its resistance to spam. The algorithm’s threshold and limit mechanisms are focused around project teaRank scores.
- teaRank score threshold: The tea Protocol uses Proof of Contribution to calculate and distribute teaRank rewards only to protocol-registered OSS projects with teaRank scores above a governance-defined threshold.
- teaRank score limit: Proof of Contribution applies edge weights and uses self edges to establish upper bounds on the teaRank score that a software project can obtain.
Software projects registered with the tea Protocol benefit from Proof of Contribution’s use of thresholds and limits, which ensure that TEA tokens are distributed fairly among only OSS projects with substantial impact. The teaRank score threshold deters spammers, while the teaRank score limit constricts the ability of spam projects to earn undeserved rewards. Using thresholds and limits also aids in spam detection.
Proof of Contribution aims to set the teaRank score threshold to the precise level that eliminates the distribution of token rewards to malicious actors while minimizing the instances of legitimate, impactful packages with teaRank scores below that threshold. The algorithm aims to set the teaRank score limit to a level that simultaneously rewards long-standing, impactful OSS projects and welcomes important new projects to the OSS ecosystem.
Proof of Contribution is Google PageRank for OSS
Proof of Contribution builds upon the design of Google's PageRank algorithm to create a ranking algorithm suited to the needs of OSS. Let’s learn more about Google PageRank before comparing it to Proof of Contribution for open-source software:
- Google PageRank is a probability distribution algorithm that assigns scores to nodes (web pages) in a graph (the internet)
- A PageRank score represents the likelihood of arriving at a particular node (web page) by randomly navigating the graph (internet)
- Google PageRank quantifies the impact of each node (web page) based on the quantity and quality of edges (links) to it
The PageRank algorithm has been modified over time to better discern the web’s topology and identify fraudulent links between web pages, enabling various spam attacks to be mitigated. That’s great for internet users—although the precise strategies employed by PageRank to combat spam are less effective when applied to OSS.
Proof of Contribution modifies the Google PageRank algorithm to best serve the unique needs of the OSS ecosystem, by using κ and δ, which ensure that impactful projects are fairly rewarded and spam projects are identified and addressed at scale.
The future of Proof of Contribution
Proof of Contribution is aiming to boost the sustainability of the software supply chain by addressing how OSS impact is measured and rewarded. While Proof of Contribution is being established centrally at first to ensure proper spam protection and fair value attribution, the development and maintenance of Proof of Contribution will be progressively decentralized.
The impact metrics used by Proof of Contribution will also be calibrated over time for more nuanced evaluations. Future versions of the algorithm may incorporate more varied types of contributions and dependencies, addressing both code and non-code factors. Spam detection and resistance will remain as a central focus for the design of the algorithm.
Proof of Contribution is not just an algorithm—it also represents a vision of an OSS landscape that is more equitable and community driven. The continuous refinement of Proof of Contribution aims to benefit all, from individual developers to the entire software ecosystem.