> For the complete documentation index, see [llms.txt](https://dualguard.gitbook.io/dualguard/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dualguard.gitbook.io/dualguard/security-reviews/guards/scoring-system.md).

# Scoring System

Coming up with a scoring system that takes into account the specialisation of security researchers in a certain language, protocol category or project was not trivial.

We believe that a Guard who performed well in contests for Lending Protocols in Rust and in contests for NFT Marketplaces in Solidity should be able to perform well in Lending Protocols in Solidity and in NFT Marketplaces in Rust.

Guards have a score for each protocol category, each language and each fork origin. That score starts at 10.

For each score, the amount of Contest Points available to gain in each contest (to move up the ranks) is determined by the scores of the competing Guards, based on previous DualGuard contests:

Let's assume Bob, Alice and Eve are the only 3 participants in a contest for a cross-chain Liquid Staking Protocol in Solidity. The contest lasts 30 days.

**Let’s assume that, before the start of the contest, these are the participants' scores:**

<table><thead><tr><th width="139.5234375">Guards'</th><th width="184.3359375">Cross-Chain Score</th><th width="177.2734375"># of Contest Days</th></tr></thead><tbody><tr><td>Bob</td><td>50</td><td>7</td></tr><tr><td>Alice</td><td>10</td><td>0</td></tr><tr><td>Eve</td><td>60</td><td>14</td></tr></tbody></table>

<table><thead><tr><th width="139.5234375">Guards</th><th width="184.375">Liquid Staking Score</th><th width="177.2890625"># of Contest Days</th></tr></thead><tbody><tr><td>Bob</td><td>10</td><td>23</td></tr><tr><td>Alice</td><td>100</td><td>14</td></tr><tr><td>Eve</td><td>10</td><td>0</td></tr></tbody></table>

<table><thead><tr><th width="139.5234375">Guards</th><th width="184.4375">Solidity Score</th><th width="177.58984375"># of Contest Days</th></tr></thead><tbody><tr><td>Bob</td><td>50</td><td>30</td></tr><tr><td>Alice</td><td>20</td><td>14</td></tr><tr><td>Eve</td><td>30</td><td>28</td></tr></tbody></table>

**These are the vulnerabilities found in the codebase:**

<table><thead><tr><th width="140.4375">Guards' Valid Findings</th><th width="100.70703125">H1</th><th width="99.55078125">H2</th><th width="100.36328125">M1</th><th width="99.87890625">M2</th><th width="99.58203125">M3</th><th width="99.77734375">L1</th></tr></thead><tbody><tr><td>Bob</td><td>✅</td><td>✅</td><td></td><td>✅</td><td>✅</td><td>✅</td></tr><tr><td>Alice</td><td></td><td>✅</td><td></td><td>✅</td><td></td><td>✅</td></tr><tr><td>Eve</td><td></td><td></td><td>✅</td><td></td><td></td><td></td></tr></tbody></table>

**Here's under what specs they fall:**

<table><thead><tr><th width="140.4375">Guards' Valid Findings</th><th width="100.70703125">H1</th><th width="99.55078125">H2</th><th width="100.36328125">M1</th><th width="99.87890625">M2</th><th width="99.58203125">M3</th><th width="99.77734375">L1</th></tr></thead><tbody><tr><td>Cross-Chain</td><td></td><td></td><td>✅</td><td></td><td></td><td></td></tr><tr><td>Liquid Staking</td><td>✅</td><td>✅</td><td></td><td>✅</td><td>✅</td><td>✅</td></tr><tr><td>Solidity</td><td>✅</td><td>✅</td><td>✅</td><td>✅</td><td>✅</td><td>✅</td></tr></tbody></table>

{% hint style="info" %}
Low Severity issues do not matter for the leaderboard ranking, hence they will not be counted when calculating the new scores.
{% endhint %}

\
**Here are the weights of the Cross-Chain issues:**

<table><thead><tr><th width="140.4375">Guards' Valid Findings</th><th width="82.8515625">M1</th><th width="106.02734375">Total</th></tr></thead><tbody><tr><td>Bob</td><td>0</td><td>0</td></tr><tr><td>Alice</td><td>0</td><td>0</td></tr><tr><td>Eve</td><td>1</td><td>1</td></tr></tbody></table>

**Here are the weights of the Liquid Staking issues:**

<table><thead><tr><th width="140.4375">Guards' Valid Findings</th><th width="100.70703125">H1</th><th width="99.55078125">H2</th><th width="100.36328125">M2</th><th width="99.87890625">M3</th><th width="99.77734375">Total</th></tr></thead><tbody><tr><td>Bob</td><td>5</td><td>2.25</td><td>0.45</td><td>1</td><td>8.7</td></tr><tr><td>Alice</td><td>0</td><td>2.25</td><td>0.45</td><td>0</td><td>2.7</td></tr><tr><td>Eve</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr></tbody></table>

**Here are the weights of the Solidity issues:**

<table><thead><tr><th width="140.4375">Guards' Valid Findings</th><th width="82.8515625">H1</th><th width="83.265625">H2</th><th width="82.61328125">M1</th><th width="83.26171875">M2</th><th width="83.23828125">M3</th><th width="106.02734375">Total</th></tr></thead><tbody><tr><td>Bob</td><td>5</td><td>2.25</td><td>0</td><td>0.45</td><td>1</td><td>8.7</td></tr><tr><td>Alice</td><td>0</td><td>2.25</td><td>0</td><td>0.45</td><td>0</td><td>2.7</td></tr><tr><td>Eve</td><td>0</td><td>0</td><td>1</td><td>0</td><td>0</td><td>1</td></tr></tbody></table>

**The formulas we used to find the values in the tables above are:**

> *Medium Severity Issue Points Weighting = 1 \* (0.9 ^ (IssueSubmissions - 1)) / IssueSubmissions*

> *High Severity Issue Points Weighting = 5 \* (0.9 ^ (IssueSubmissions - 1)) / IssueSubmissions*

**The formula we used to calculate the new scores you see below is the following:**

<kbd>NewScore = PrevScore x (ContestDaysBeforeThisContest / TotalContestDays) + (GuardHMIssuesWeight / SumOfAllGuardsHMIssuesWeight) x SumOfPrevScores x (ContestDaysForThisContest / TotalContestDays)</kbd>

{% hint style="info" %}
On the leaderboard and in your profile section, scores are always rounded up integers.
{% endhint %}

**Here are the new Cross-Chain scores:**

* Bob: <kbd>50 x (7 / 37) + (0 / 1) x 120 x (30 / 37) = 9.46 ⇒ 9</kbd>
* Alice: <kbd>10 x (0 / 30) + (0 / 1) x 120 x (30 / 30) = 0 ⇒ 0</kbd>
* Eve: <kbd>60 x (14 / 47) + (1 / 1) x 120 x (30 / 47) = 94.47 ⇒ 94</kbd>

**Here are the new Liquid Staking scores:**

* Bob: <kbd>10 x (23 / 53) + (8.7 / 11.4) x 120 x (30 / 53) = 56.18 ⇒ 56</kbd>
* Alice: <kbd>100 x (14 / 44) + (2.7 / 11.4) x 120 x (30 / 44) = 51.20 ⇒ 51</kbd>
* Eve: <kbd>10 x (0 / 30) + (0 / 11.4) x 120 x (30 / 30) = 0 ⇒ 0</kbd>

**Here are the new Solidity scores:**

* Bob: <kbd>50 x (30 / 60) + (8.7 / 12.4) x 100 x (30 / 60) = 60.78 ⇒ 61</kbd>
* Alice: <kbd>20 x (14 / 44) + (2.7 / 12.4) x 100 x (30 / 44) = 21.51 ⇒ 22</kbd>
* Eve: <kbd>30 x (28 / 58) + (1 / 12.4) x 100 x (30 / 58) = 18.73 ⇒ 19</kbd>
