Ranked curve model
Last updated
Was this helpful?
Code4rena's ranked curve is used to calculate rank-based award distributions, including:
Historically, Gas reports and Dark Horse bonuses
If two or more wardens (or teams) have tied ranks, they split the total awards for the ranks they would otherwise occupy — i.e. if two wardens tie for 2nd place, they split the total awards for 2nd and 3rd place. Or if three wardens tie for 3rd, they split the total awards for 3rd place.
QA reports are ranked and graded as described here:
1st place (score: 5)
2nd place (score: 4)
3rd place (score: 3)
grade-a and grade-b (score: 0, except in rare cases -- see below)
grade-c (score: 0)
In most cases, only 1st, 2nd, and 3rd place reports are eligible for awards. See "If there are no valid HM findings" below for an exception.
Reports (referred to as findings in the code) are sorted in descending order based on their scores. Findings without a score are treated as having a score of 0.
For each report, a point value is calculated using the formula qaAndGasConstant^(2 - idx), where qaAndGasConstant is defined in the qaAndGasRanking code (see example below), and idx is the index of the report in the sorted array. This means the highest-scored report gets the highest point value, decreasing exponentially for subsequent reports.
Pie - The total value of the pie is the sum of all point values.
Mapping score to points - unique score is mapped to an array of point values associated with findings that have that score.
Slice for each score - sum the points for each score to determine the slice size for each score.
Split - number of reports sharing the same score
13
Q-01
Q
"1st place"
3552.6315789473683
207
Q-02
Q
"2nd place"
2368.4210526315787
42
Q-03
Q
"3rd place"
1578.9473684210525
4
Q-08
Q
4.75
1
1
3
1578.9473684210525
28
Q-16
Q
4.75
2
3.75
5
2960.5263157894738
113
Q-19
Q
4.75
2
3.75
5
2960.5263157894738
Last updated
Was this helpful?
Was this helpful?
{
number: 4,
risk: 'q',
labels: '["QA (Quality Assurance)","Q-08","3rd place"]'
},
{
number: 28,
risk: 'q',
labels: '["QA (Quality Assurance)","Q-16","1st place"]'
},
{
number: 113,
risk: 'q',
labels: '["QA (Quality Assurance)","Q-19","1st place"]'
}