Replies: 5 comments 30 replies
-
All of the changes look good to me. Two points:
|
Beta Was this translation helpful? Give feedback.
-
I believe documentation can be very helpful in understanding the intended use of the protocol, a solution to the issue of documentation being updated during an audit can be solved by taking a snapshot of the docs at the start of the audit. Comments however aren't necessarily written in a way to explain the exact intended use of the protocol, they can be helpful on understanding the lines of code they are attached to and still that does not mean It was written for auditors to understand the protocol. While documents are written for everyone to understand the protocol and get an idea on the intended use. I believe both documentations and comments should be taken into account, auditors cannot rely solely on comments when a lot of protocols lack proper comments in their code. With the lack of comments or the ambiguity of them, getting the proper context about the protocols intended use will be problematic just from the comments. So in my opinion the current hierarchy of truth works fine but a good improvement could be the addition of a snapshot of the documents from the start of the auditing contest and treating it as the truth.
Relying on common sense in the case of outdated comments will create more problems. Common sense will not be common sense for everyone. Public statements (the current protocol opinion) should not be treated as the truth and shouldn't be used to validate or invalidate findings, it should only be there to provide context for auditors.
Fully agree with this part. |
Beta Was this translation helpful? Give feedback.
-
All the changes look good to me but I'd like to ask for clarification regarding this part of the updated guidelines:
My question is, what is the limit that can define a known issue? The acknowledgment of the root cause or the acknowledgment of the impact it may provoke? I'll go through two examples to explain this: Example 1: Let's imagine a protocol that has a mechanism that, when used in a specific scenario, it accidentally sends all user's funds to the address zero. The code comments explicitly state that the use of this mechanism may have some risk, but they don't acknowledge that the risk may be losing all the user's funds. Would that issue be considered a KNOWN ISSUE or not? In other words, an issue can be considered a KNOWN ISSUE just because the comments confirm that the mechanism is acknowledged? Or do the comments need to acknowledge the full risk that the mechanism may cause if used? Example 2: We have a protocol that in the README it's stated the following in the known issues section:
Now, if an issue is discovered that when [X] is empty, all users will lose ALL their funds, would that issue be considered a KNOWN ISSUE? The README is acknowledging a possible risk (low) that the root cause ([X] is empty) may provoke, but it's not acknowledging that the same root cause can provoke all users to lose all their funds (critical risk). Would these issues be considered valid or not? I think it may be helpful to clarify these situations in the guidelines to avoid unnecessary discussions between judges and Watsons. |
Beta Was this translation helpful? Give feedback.
-
Why add this? If this is written in the repo, it's how it should behave. This phrase opens the gate to discuss anything. The purpose of the audit is to check if the code works as intended by the protocol team at time X. If it hasn't been updated, it should not fall on Watsons. |
Beta Was this translation helpful? Give feedback.
-
If the clarifications can't change the interpretation of the source of truth, what is being clarified and what are watsons supposed to use the clarification for? For the 'chosen source of truth', is the sponsor choosing, or is the judge choosing which source it applies to based on the hierarchy? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Update hierarchy of truth
Judging Guidelines PR
sherlock-protocol/sherlock-v2-docs#21
Rationale
First, the current interpretation of the hierarchy of truth is ambiguous and provides unnecessary friction between Watsons and Judges.
Second, the current hierarchy of truth values code comments as much as protocol documentation. I believe that protocol documentation shouldn't be taken into account as it's contents can change during the audit.
Anything written in the README or CODE COMMENTS can not be changed during the audit and reflect the intention of the protocol team. However, it's possible that the code contains outdated comments. In that case we should apply common sense to the judgment.
Public statements (the current protocol opinion) is likely to change based on the information at hand, that's why it is only able to serve to clarify the language.
Third, it's unclear how to judge invariants defined by the protocol team. I believe we should move into a direction where issues that disrespect invariants defined by the protocol team are judged valid.
Relevant Issue Discussions
sherlock-audit/2024-02-perpetual-judging#65
sherlock-audit/2024-03-vvv-vesting-staking-judging#148
Beta Was this translation helpful? Give feedback.
All reactions