Repository alongside the Certora workshop on ERC4626 at TrustX @ Istanbul 2023.
- Familiarize yourself with the ERC4626 specification and take a look at the (buggy) implementation of ERC4626 under
src
. - To get to know CVL take a look at the example specification under
certora/specs/Example.spec
. - Sign-up for Certora Free Tier
- Install the Certora prover following all steps from our official Documentation).
- Note: It's important to also set the CERTORAKEY evnrionemnt variable.
- Run the specification by executing
certoraRun certora/conf/Example.conf
from within this folder. Follow the link returned and wait for the verification to be completed. Alternatively, open the pre-computed results. - Inspect the results and make yourself familiar with the output. Why does the rule
assetAndShareMonotonicity
fail for methodredeem
? Can you spot the mistake in the rule? - Think about properties of ERC4626 and note them down in https://docs.google.com/document/d/116HDhYT8pJMD9DOdrS8NdWdvTnOdsIcEQK9AjnxpdnY/edit
- Open the file
certora/specs/Tutorial.spec
. - The file contains three rule signatures that need to be implemented. Take a look at the comment and write the specifications.
- Run Certora by executing
certoraRun certora/conf/Tutorial.conf
and iterate. - The solutions are found in branch
solutions
. - On branch
solutions
there is aProperties.md
file that lists basic properties for ERC4626. Enhance your CVL specifications to also cover those properties. Which ones can you prove?