The four things that help Code4rena wardens to do their best work are:
A self-contained repository - with working commands that will build (at least) all in-scope contracts, and commands that will run tests producing gas reports for the relevant contracts
<aside> <img src="/icons/info-alternate_purple.svg" alt="/icons/info-alternate_purple.svg" width="40px" /> Please check all code and tests on a fresh clone (using the specific commit that will be audited), and ensure that all tests are running smoothly.
If some tests are expected to fail, and you don’t expect to fix them prior to your audit, please inform staff so we can note that for the auditors.
</aside>
Organized repo & readme, including well-commented code
Video walkthrough, if possible (you can link this from the repo and also pop it into your warden-facing channel in our Discord). Here’s an example.
Your presence in the C4 Discord - easy access for questions via DM or private threads
C4 staff will set up your audit repo using:
…and send it to you for review.
Submit changes to your repo 2 business days before launch: To launch your audit on schedule, your audit repo (including the README
) must be completely set up and shared with us at least 48 business hours (2 business days) before your audit is scheduled to start. This ensures we have time to review it and help you finalize any last-minute details.
Technical review: Your repo will be reviewed by a Code4rena Scout (technical reviewer).
In order to increase the chances of wardens finding all bugs in your code, there are a few technical things your team can do to contribute to the quality of the audit:
Clean code
The easier your code is to understand, the more time and energy wardens can dedicate to finding bugs.
Docs, ideally covering 3 levels:
Marking known issues: It's important that our wardens don't waste their time on known issues and focus their time and energy on finding relevant bugs, therefore it's important that you let us know if there are any known issues in the code, whether you intend to mitigate them or not.
Incomplete code: Our wardens will work under the assumption that this is the final form of the code that's going to be deployed to the blockchain. If you plan on any modification of the code before deployment (except for mitigation of C4's findings), please note this clearly in your README file, so that the wardens will have the correct assumptions about the code.
Tests:
forge
, as it's easier to write and debug.slither .
from the project root works without error, or that expected errors are documented in this README.md
remappings.txt
is provided, so that tools such as VS Code that do not read foundry.toml
can work properlyNext: Marketing and promotion