365 days - 89 audits - conclusion

May 28
10
min of reading

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

With that experience, I've developed a keensense for structuring issues in a way that not only highlights theirsignificance but also offers clear, actionable insights. It's a continuouslearning process, and even now, I find myself fine-tuning my approach to makeeach report more effective than the last.

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

1. Issue Description: Root Cause and Effect

The heart of any audit report is the issuedescription. 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 storageupdate, Lack of validation,..).

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

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

2. Severity: Assessing the risk level

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

I personally use:

- Informational

- Low

- Medium

- High

3. Detailed Issue Explanation

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

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

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

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

Proof of Concept (PoC):

Whether coded or written, a PoC isinvaluable. It demonstrates the issue in a controlled environment, making iteasier to grasp the problem and test solutions.

4. Recommendation

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

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

Read the original article

Related articles