Blog

365 days - 89 audits - Conclusion

I just checked my stats and in the last 365 days I have written 89 audit reports (combined team and solo).

With that experience, I've developed a keen sense for structuring issues in a way that not only highlights their significance but also offers clear, actionable insights. It's a continuous learning process, and even now, I find myself fine-tuning my approach to make each report more effective than the last.

So, how does the ideal issue in an audit report look like? Let’s break it down

1. Issue Description: Root Cause and Effect

The heart of any audit report is the issue description. It’s crucial to start by identifying the root cause of the issue, I pretty much like to develop different root-cause niches (Lack of storage update, Lack of validation,..).

This is not just about what the issue is, but why it exists in the first place. Understanding the underlying factors that led to a problem is key to preventing similar issues in the future.

Then, we move to the effect. Here, it's essential to articulate the impact of the issue. How does it affect the smart contract's functionality, security, or efficiency? Is it a minor glitch, or does it pose a significant threat to the contract's integrity? The effect portion of the description sets the stage for the severity assessment that follows.

2. Severity: Assessing the risk level

The severity of an issue is a critical aspect of any audit report. It’s a measure of the issue's impact on the contract's overall security and functionality. Severity can range from low, indicating minor concerns, to critical, which flags issues that can compromise the entire contract. This classification helps prioritize fixes, with higher severity issues demanding immediate attention.

I personally use:
- Informational
- Low
- Medium
- High

3. Detailed Issue Explanation

This section is where the technical details come into play. It should include:

Context: Where does the issue occur within the contract? Providing context helps developers understand where they need to focus their attention.

Detailed Analysis: Why does this issue occur? This involves a deep dive into the technical aspects, explaining the cause of the issue in detail. It’s a blend of technical expertise and clarity.

Result of the Issue: What happens as a result of this issue? This is about connecting the technical explanation to practical outcomes. Often an issue can have more than one negative result.

Proof of Concept (PoC):

Whether coded or written, a PoC is invaluable. It demonstrates the issue in a controlled environment, making it easier to grasp the problem and test solutions.

4. Recommendation

Finally, no audit report is complete without recommendations. This section should offer concrete steps to address the issue. It’s not just about fixing the problem at hand but also about enhancing the overall security and efficiency of the contract. Recommendations should be clear, actionable, and tailored to the specific issue and context of the contract. If you are not short in time, you can directly use sample code as recommendation.

In summary, the best audit reports are those that provide a clear, comprehensive, and actionable overview of each issue. They combine technical depth with clarity, ensuring that developers are not only aware of the problems but also equipped to fix them. Remember, an audit report is more than a list of problems; it’s a roadmap to a more secure and robust smart contract.