Skip to main content
Try out the RareSkills ZK AI Tutor!

Smart Contract Security

Browse all Smart Contract Security articles.

5 min read

Testing msg.sender and msg.value in CVL

In this chapter, we introduce the env variable in CVL, which enables us to make rules for functions that depend on msg.sender, msg.value, and other…

Last updated onNov 12, 2026
Read Article

7 min read

Understanding the Spec File in Certora CVL

In the last chapter, we saw that to perform formal verification using Certora Prover, we need to provide the Prover with the following key items.

Last updated onNov 12, 2026
Read Article

7 min read

Testing Revert Call In Certora

In this chapter, we will learn how to use method tags (@withrevert and @norevert) and the special variable lastReverted in CVL to verify expected reverts…

Last updated onNov 12, 2026
Read Article

8 min read

Introduction to Parametric Rules

Until now, in previous chapters, we have written rules to verify the behavior of specific methods and their impact on a contract’s state.

Last updated onNov 12, 2026
Read Article

13 min read

Certora Require, Assert, and Satisfy

In the previous chapter, we learned that a specification is a piece of code written in CVL that describes the expected behavior of a smart contract.

Last updated onNov 12, 2026
Read Article

4 min read

Formally verifying Initializable.sol

This article describes how Certora formally verified the Initializable.sol OpenZeppelin contract.

Last updated onNov 12, 2026
Read Article

6 min read

Formally Verifying a Counter

In the previous chapter, we learned the theoretical side of formal verification, including what it is and how it works.

Last updated onNov 12, 2026
Read Article

4 min read

Formally Verifying Nonces.Sol in OpenZeppelin

Nonces, which stands for "number used once" are used in digital signature schemes to prevent replay attacks.

Last updated onNov 12, 2026
Read Article

9 min read

Conditional Statements in CVL and Formally Verifying Parts of Solady and Solmate

Some contract behaviors (properties) are inherently conditional, and using constructs like if/else in CVL is one way to capture conditional behavior…

Last updated onNov 12, 2026
Read Article

6 min read

Formally Verifying Ownable.sol

Ownable is an abstract contract that provides owner-based access control.

Last updated onNov 12, 2026
Read Article

6 min read

Formally Verifying Address Balance

In the previous chapter, we covered how to reason about environment-dependent functions in CVL by focusing on msg.sender in non-payable contexts.

Last updated onNov 12, 2026
Read Article

7 min read

Init_if_needed in Anchor and the Reinitialization Attack

In previous tutorials, we've had to initialize an account in a separate transaction before we can write data to it.

Last updated onNov 12, 2026
Read Article