1/5
--- ### Overview of MathMasters SOL Codebase Security Review In this session, we conducted a thorough security review of the `MathMasters.sol` codebase. Our goal was to ensure the integrity and security of the codebase, beginning with the basic understanding that custom errors were introduced in Solidity version 0.8.4, not 0.8.3. This initial realization underscores the importance of understanding compiler versions and their features. ### Key Learnings and Functions Analyzed #### 1. **Understanding Solidity Versions** - Highlighted the crucial role of compiler knowledge in securing codebases. #### 2. **Analysis of MathMasters SOL Functions** - **MulWad**: Functionality involves multiplication followed by rounding down. - **MulwadUp**: Similar to MulWad but implements rounding up. - **Square Root**: Explored various testing approaches, including fuzzing and formal verification. ### Insights into Assembly and Memory Management We delved deep into assembly language to understand how operations at the lower level are executed within Solidity. Key points covered included: - Usage of the free memory pointer and the hazards of overwriting it. - Understanding and interpreting error codes from contract reverts. - Memory and storage inspections using the Foundry debugger. ### Advanced Testing Techniques #### 1. **Formal Verification with Certora** - Introduced Certora's approach to formal verification, discussing rules and invariants which are critical for establishing reliable smart contracts. #### 2. **Modular Verification for Square Root Function** - Developed a test harness to compare two halves of the function to ensure correctness, which was crucial in identifying and fixing a subtle bug. We hope you've enjoyed this course so far, we'll see you on the next occasion, kep learning and Happy Coding!
A comprehensive guide to Formal Verification - Let's dive deep into the world of Formal Verification with a detailed overview of the process. We'll learn how to identify potential vulnerabilities and bugs in Solidity code and verify that the code is functioning as intended.
Previous lesson
Previous
Next lesson
Next
Give us feedback
Course Overview
About the course
Assembly
Writing smart contracts using Huff and Yul
Ethereum Virtual Machine OPCodes
Formal verification testing
Smart contract invariant testing
Halmos, Certora, Kontrol
Security researcher
$49,999 - $120,000 (avg. salary)
Smart Contract Auditor
$100,000 - $200,000 (avg. salary)
Guest lecturers:
Josselin Feist
Head of Blockchain at Trail of Bits
Last updated on January 17, 2025
Solidity Developer
Assembly and Formal VerificationDuration: 30min
Duration: 4h 38min
Duration: 3h 57min
Duration: 1h 56min
Course Overview
About the course
Assembly
Writing smart contracts using Huff and Yul
Ethereum Virtual Machine OPCodes
Formal verification testing
Smart contract invariant testing
Halmos, Certora, Kontrol
Security researcher
$49,999 - $120,000 (avg. salary)
Smart Contract Auditor
$100,000 - $200,000 (avg. salary)
Guest lecturers:
Josselin Feist
Head of Blockchain at Trail of Bits
Last updated on January 17, 2025
Testimonials
Read what our students have to say about this course.
Chainlink
Chainlink
Gustavo Gonzalez
Solutions Engineer at OpenZeppelin
Francesco Andreoli
Lead Devrel at Metamask
Albert Hu
DeForm Founding Engineer
Radek
Senior Developer Advocate at Ceramic
Boidushya
WalletConnect
Idris
Developer Relations Engineer at Axelar