├── .gitbook
└── assets
│ ├── Capture.PNG
│ ├── CleanShot 2024-02-07 at 16.07.31@2x.png
│ ├── First Flights (1).png
│ ├── README TEMPLATE (1).md
│ ├── README TEMPLATE (2).md
│ ├── README TEMPLATE.md
│ ├── Screenshot 2023-08-30 at 11.33.30.png
│ ├── Screenshot 2023-08-30 at 11.34.19 (1).png
│ ├── Screenshot 2023-08-30 at 11.34.19.png
│ ├── Untitled-2024-01-31-1203.png
│ ├── image (1) (1) (1).png
│ ├── image (1) (1).png
│ ├── image (1).png
│ ├── image (10).png
│ ├── image (11).png
│ ├── image (12).png
│ ├── image (13).png
│ ├── image (14).png
│ ├── image (15).png
│ ├── image (2) (1) (1).png
│ ├── image (2) (1).png
│ ├── image (2).png
│ ├── image (3) (1) (1).png
│ ├── image (3) (1).png
│ ├── image (3).png
│ ├── image (4) (1).png
│ ├── image (4).png
│ ├── image (5) (1).png
│ ├── image (5).png
│ ├── image (6) (1).png
│ ├── image (6).png
│ ├── image (7) (1).png
│ ├── image (7).png
│ ├── image (8) (1).png
│ ├── image (8).png
│ ├── image (9) (1).png
│ ├── image (9).png
│ ├── image.png
│ └── readme(1).md
├── .gitignore
├── README.md
├── SUMMARY.md
├── create-and-submit-a-first-flight.md
├── faqs.md
├── first-flights.md
├── glossary.md
├── hawks-auditors
├── appeals.md
├── how-does-xp-work.md
├── how-to-create-and-submit-a-poc.md
├── how-to-determine-a-finding-validity.md
├── how-to-evaluate-a-finding-severity.md
├── how-to-write-and-submit-a-finding.md
├── payouts.md
├── quick-start.md
├── the-kick-off-period.md
└── what-is-an-auditing-competition.md
├── judging
├── community-judging-eligibility.md
├── disqualification-criteria.md
├── how-community-judging-works.md
├── payouts-and-rewards.md
└── the-judging-process.md
├── protocol-teams-sponsors
└── the-auditing-process.md
└── tools.md
/.gitbook/assets/Capture.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Cyfrin/codehawks-docs/25f69cb845c4890e65fe6efd7f62e66d0e249d69/.gitbook/assets/Capture.PNG
--------------------------------------------------------------------------------
/.gitbook/assets/CleanShot 2024-02-07 at 16.07.31@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Cyfrin/codehawks-docs/25f69cb845c4890e65fe6efd7f62e66d0e249d69/.gitbook/assets/CleanShot 2024-02-07 at 16.07.31@2x.png
--------------------------------------------------------------------------------
/.gitbook/assets/First Flights (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Cyfrin/codehawks-docs/25f69cb845c4890e65fe6efd7f62e66d0e249d69/.gitbook/assets/First Flights (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/README TEMPLATE (1).md:
--------------------------------------------------------------------------------
1 | # Protocol Name
2 |
3 |
8 |
9 |
10 | ## Contest Details **THESE WILL BE PREPENDED TO THE SUBMITTED README BY THE CYFRIN TEAM**
11 |
12 | - Total Prize Pool:
13 | - HM Awards:
14 | - Low Awards:
15 | - GAS, Informational, or QAs Awards:
16 | - Starts
17 | - Ends
18 |
19 | ## Stats **THESE WILL BE PREPENDED TO THE SUBMITTED README BY THE CYFRIN TEAM**
20 | - nSLOC:
21 | - Complexity Score:
22 | - Dollars per Complexity:
23 | - Dollars per nSLOC:
24 |
25 | ## About the Project
26 |
27 | This section should give auditors a feeling for what the protocol does, it's primary functions and the goals it hopes to achieve. Can include links to project websites or docs
28 |
29 | Example:
30 |
31 | ```
32 | About
33 |
34 | This project is meant to enable smart contract auditors (sellers) and smart contract protocols
35 | looking for audits (buyers) to connect using a credibly neutral option, with optional arbitration.
36 |
37 | [Documentation](www.docs.com)
38 | [Website](www.protocolwebsite.com)
39 | [Twitter](www.twitter.com/handle)
40 | [GitHub](www.GitHub.com/account)
41 | ```
42 |
43 | ## Actors
44 |
45 | Detail which roles are included within your protocol, for example 'owner', 'borrower', 'organizer' etc. Draw clear links and outline the powers each actor should have and expected limitations to those powers. Please clearly detail your expected centralization risks.
46 |
47 | Example:
48 |
49 | ```
50 | Actors:
51 | Buyer: The purchaser of services, in this scenario, a project purchasing an audit.
52 | Seller: The seller of services, in this scenario, an auditor willing to audit a project.
53 | Arbiter: An impartial, trusted actor who can resolve disputes between the Buyer and Seller.
54 | The Arbiter is only compensated the arbiterFee amount if a dispute occurs.
55 | ```
56 |
57 | ## Scope (contracts)
58 |
59 | This section should give auditors a clear understanding of what files and directories are included within the scope of the contest. You can itemize every applicable file, or list particular folders or directories, but please be specific and thorough. This will server as an auditors ultimate reference point for what to focus on. Please include a commit hash
60 |
61 | Example:
62 | ```
63 | All Contracts in `src` are in scope.
64 | ```
65 | ```js
66 | src/
67 | ├── Beedle.sol
68 | ├── Fees.sol
69 | ├── Lender.sol
70 | ├── Staking.sol
71 | ├── interfaces
72 | │ ├── IERC20.sol
73 | │ └── ISwapRouter.sol
74 | └── utils
75 | ├── Errors.sol
76 | ├── Ownable.sol
77 | └── Structs.sol
78 |
79 | ```
80 |
81 | ## Compatibilities
82 |
83 | Please outline specific compatibilities of the protocol ie. blockchains (All EVM Compatible, specific chains). Please also include specific tokens, referencing standard contracts/interfaces when necessary, that are expected to function with the protocol. Include all whitelisted, or blacklisted tokens which are or are not supported. If the protocol is expected to function with **any** chain compatible tokens, please specify this.
84 |
85 | Example:
86 |
87 | ```
88 | Compatibilities:
89 | Blockchains:
90 | - Ethereum/Any EVM
91 | Tokens:
92 | - ETH
93 | - WETH
94 | - Matic
95 | - [ERC720](www.tokenstandard.com)
96 | - [ERC721](www.tokenstandard.com)
97 | ```
98 |
99 | ## Setup
100 |
101 | Please outline specific steps/processes to be followed in order for an auditor to run the project off a local clone of the contest repo. Please again be detailed and thorough, including specific markdowned CLI commands and necessary .env adjustments.
102 |
103 | Please also include steps needed to run appropriate tests included in scope.
104 |
105 | Example:
106 |
107 | Build:
108 | ```bash
109 | forge init
110 |
111 | forge install OpenZeppelin/openzeppelin-contracts
112 |
113 | forge install vectorized/solady
114 |
115 | forge build
116 | ```
117 |
118 | Tests:
119 | ```bash
120 | Forge test
121 | ```
122 |
123 | ## Known Issues
124 |
125 | Please clearly detail **all** currently recognized issues or vulnerabilities within the scope submitted. Please be thorough and precise, following the end of the 48-hour Kick-Off period, these Known Issues will be immutable for the duration of the contest.
126 |
127 | Example:
128 |
129 | `Known Issues:
130 | - Addresses other than the zero address (for example 0xdead) could prevent disputes from being resolved -
131 | Before the buyer deploys a new Escrow, the buyer and seller should agree to the terms for the Escrow. If the
132 | buyer accidentally or maliciously deploys an Escrow with incorrect arbiter details, then the seller could refuse
133 | to provide their services. Given that the buyer is the actor deploying the new Escrow and locking the funds, it's
134 | in their best interest to deploy this correctly.
135 |
136 | - Large arbiter fee results in little/no seller payment - In this scenario, the seller can decide to not perform
137 | the audit. If this is the case, the only way the buyer can receive any of their funds back is by initiating the dispute
138 | process, in which the buyer loses a large portion of their deposited funds to the arbiter. Therefore, the buyer is
139 | disincentivized to deploy a new Escrow in such a way.
140 |
141 | - Tokens with callbacks allow malicious sellers to DOS dispute resolutions - Each supported token will be vetted
142 | to be supported. ERC777 should be discouraged.
143 |
144 | - Buyer never calls confirmReceipt - The terms of the Escrow are agreed upon by the buyer and seller before deploying
145 | it. The onus is on the seller to perform due diligence on the buyer and their off-chain identity/reputation before deciding
146 | to supply the buyer with their services.
147 |
148 | - Salt input when creating an Escrow can be front-run
149 |
150 | - arbiter is a trusted role
151 |
152 | - User error such as buyer calling confirmReceipt too soon
153 |
154 | - Non-tokenAddress funds locked`
155 |
--------------------------------------------------------------------------------
/.gitbook/assets/README TEMPLATE (2).md:
--------------------------------------------------------------------------------
1 | # Protocol Name
2 |
3 |
8 |
9 |
10 | # Contest Details
11 |
12 | ### Prize Pool
13 |
14 | - Total Pool -
15 | - H/M -
16 | - Low -
17 | - Community Judging Pool -
18 |
19 | - Starts: TBD
20 | - Ends: TBD
21 |
22 | ### Stats
23 |
24 | - nSLOC:
25 | - Complexity Score:
26 |
27 | ## About the Project
28 |
29 | This section should give auditors a feeling for what the protocol does, it's primary functions and the goals it hopes to achieve. Can include links to project websites or docs
30 |
31 | Example:
32 |
33 | ```
34 | About
35 |
36 | This project is meant to enable smart contract auditors (sellers) and smart contract protocols
37 | looking for audits (buyers) to connect using a credibly neutral option, with optional arbitration.
38 |
39 | [Documentation](www.docs.com)
40 | [Website](www.protocolwebsite.com)
41 | [Twitter](www.twitter.com/handle)
42 | [GitHub](www.GitHub.com/account)
43 | ```
44 |
45 | ## Actors
46 |
47 | Detail which roles are included within your protocol, for example 'owner', 'borrower', 'organizer' etc. Draw clear links and outline the powers each actor should have and expected limitations to those powers. Please clearly detail your expected centralization risks.
48 |
49 | Example:
50 |
51 | ```
52 | Actors:
53 | Buyer: The purchaser of services, in this scenario, a project purchasing an audit.
54 | Seller: The seller of services, in this scenario, an auditor willing to audit a project.
55 | Arbiter: An impartial, trusted actor who can resolve disputes between the Buyer and Seller.
56 | The Arbiter is only compensated the arbiterFee amount if a dispute occurs.
57 | ```
58 |
59 | ## Scope (contracts)
60 |
61 | This section should give auditors a clear understanding of what files and directories are included within the scope of the contest. You can itemize every applicable file, or list particular folders or directories, but please be specific and thorough. This will server as an auditors ultimate reference point for what to focus on.
62 |
63 | Example:
64 | ```
65 | All Contracts in `src` are in scope.
66 | ```
67 | ```js
68 | src/
69 | ├── Beedle.sol
70 | ├── Fees.sol
71 | ├── Lender.sol
72 | ├── Staking.sol
73 | ├── interfaces
74 | │ ├── IERC20.sol
75 | │ └── ISwapRouter.sol
76 | └── utils
77 | ├── Errors.sol
78 | ├── Ownable.sol
79 | └── Structs.sol
80 |
81 | ```
82 |
83 | ## Compatibilities
84 |
85 | Please outline specific compatibilities of the protocol ie. blockchains (All EVM Compatible, specific chains). Please also include specific tokens, referencing standard contracts/interfaces when necessary, that are expected to function with the protocol. Include all whitelisted, or blacklisted tokens which are or are not supported. If the protocol is expected to function with **any** chain compatible tokens, please specify this.
86 |
87 | Example:
88 |
89 | ```
90 | Compatibilities:
91 | Blockchains:
92 | - Ethereum/Any EVM
93 | Tokens:
94 | - ETH
95 | - WETH
96 | - Matic
97 | - [ERC720](www.tokenstandard.com)
98 | - [ERC721](www.tokenstandard.com)
99 | ```
100 |
101 | Address that will be deploying the contract:
102 | (if unknown, just tell us if it will be an externally owned account, multi-sig wallet, account abstraction based wallet, or other setup)
103 |
104 | ## Setup
105 |
106 | Please outline specific steps/processes to be followed in order for an auditor to run the project off a local clone of the contest repo. Please again be detailed and thorough, including specific markdowned CLI commands and necessary .env adjustments.
107 |
108 | Please also include steps needed to run appropriate tests included in scope.
109 |
110 | Example:
111 |
112 | Build:
113 | ```bash
114 | forge init
115 |
116 | forge install OpenZeppelin/openzeppelin-contracts
117 |
118 | forge install vectorized/solady
119 |
120 | forge build
121 | ```
122 |
123 | Tests:
124 | ```bash
125 | Forge test
126 | ```
127 |
128 | ## Known Issues
129 |
130 | Please clearly detail **all** currently recognized issues or vulnerabilities within the scope submitted. Please be thorough and precise, following the end of the 48-hour Kick-Off period, these Known Issues will be immutable for the duration of the contest.
131 |
132 | Example:
133 |
134 | `Known Issues:
135 | - Addresses other than the zero address (for example 0xdead) could prevent disputes from being resolved -
136 | Before the buyer deploys a new Escrow, the buyer and seller should agree to the terms for the Escrow. If the
137 | buyer accidentally or maliciously deploys an Escrow with incorrect arbiter details, then the seller could refuse
138 | to provide their services. Given that the buyer is the actor deploying the new Escrow and locking the funds, it's
139 | in their best interest to deploy this correctly.
140 |
141 | - Large arbiter fee results in little/no seller payment - In this scenario, the seller can decide to not perform
142 | the audit. If this is the case, the only way the buyer can receive any of their funds back is by initiating the dispute
143 | process, in which the buyer loses a large portion of their deposited funds to the arbiter. Therefore, the buyer is
144 | disincentivized to deploy a new Escrow in such a way.
145 |
146 | - Tokens with callbacks allow malicious sellers to DOS dispute resolutions - Each supported token will be vetted
147 | to be supported. ERC777 should be discouraged.
148 |
149 | - Buyer never calls confirmReceipt - The terms of the Escrow are agreed upon by the buyer and seller before deploying
150 | it. The onus is on the seller to perform due diligence on the buyer and their off-chain identity/reputation before deciding
151 | to supply the buyer with their services.
152 |
153 | - Salt input when creating an Escrow can be front-run
154 |
155 | - arbiter is a trusted role
156 |
157 | - User error such as buyer calling confirmReceipt too soon
158 |
159 | - Non-tokenAddress funds locked`
160 |
--------------------------------------------------------------------------------
/.gitbook/assets/README TEMPLATE.md:
--------------------------------------------------------------------------------
1 | # Protocol Name
2 |
3 |
8 |
9 |
10 | # Contest Details
11 |
12 | ### Prize Pool
13 |
14 | - High - 100xp
15 | - Medium - 20xp
16 | - Low - 2xp
17 |
18 | - Starts: TBD
19 | - Ends: TBD
20 |
21 | ### Stats
22 |
23 | - nSLOC:
24 | - Complexity Score:
25 |
26 | ## About the Project
27 |
28 | This section should give auditors a feeling for what the protocol does, it's primary functions and the goals it hopes to achieve. Can include links to project websites or docs
29 |
30 | Example:
31 |
32 | ```
33 | About
34 |
35 | This project is meant to enable smart contract auditors (sellers) and smart contract protocols
36 | looking for audits (buyers) to connect using a credibly neutral option, with optional arbitration.
37 |
38 | [Documentation](www.docs.com)
39 | [Website](www.protocolwebsite.com)
40 | [Twitter](www.twitter.com/handle)
41 | [GitHub](www.GitHub.com/account)
42 | ```
43 |
44 | ## Actors
45 |
46 | Detail which roles are included within your protocol, for example 'owner', 'borrower', 'organizer' etc. Draw clear links and outline the powers each actor should have and expected limitations to those powers. Please clearly detail your expected centralization risks.
47 |
48 | Example:
49 |
50 | ```
51 | Actors:
52 | Buyer: The purchaser of services, in this scenario, a project purchasing an audit.
53 | Seller: The seller of services, in this scenario, an auditor willing to audit a project.
54 | Arbiter: An impartial, trusted actor who can resolve disputes between the Buyer and Seller.
55 | The Arbiter is only compensated the arbiterFee amount if a dispute occurs.
56 | ```
57 |
58 | ## Scope (contracts)
59 |
60 | This section should give auditors a clear understanding of what files and directories are included within the scope of the contest. You can itemize every applicable file, or list particular folders or directories, but please be specific and thorough. This will server as an auditors ultimate reference point for what to focus on.
61 |
62 | Example:
63 | ```
64 | All Contracts in `src` are in scope.
65 | ```
66 | ```js
67 | src/
68 | ├── Beedle.sol
69 | ├── Fees.sol
70 | ├── Lender.sol
71 | ├── Staking.sol
72 | ├── interfaces
73 | │ ├── IERC20.sol
74 | │ └── ISwapRouter.sol
75 | └── utils
76 | ├── Errors.sol
77 | ├── Ownable.sol
78 | └── Structs.sol
79 |
80 | ```
81 |
82 | ## Compatibilities
83 |
84 | Please outline specific compatibilities of the protocol ie. blockchains (All EVM Compatible, specific chains). Please also include specific tokens, referencing standard contracts/interfaces when necessary, that are expected to function with the protocol. Include all whitelisted, or blacklisted tokens which are or are not supported. If the protocol is expected to function with **any** chain compatible tokens, please specify this.
85 |
86 | Example:
87 |
88 | ```
89 | Compatibilities:
90 | Blockchains:
91 | - Ethereum/Any EVM
92 | Tokens:
93 | - ETH
94 | - WETH
95 | - Matic
96 | - [ERC720](www.tokenstandard.com)
97 | - [ERC721](www.tokenstandard.com)
98 | ```
99 |
100 | ## Setup
101 |
102 | Please outline specific steps/processes to be followed in order for an auditor to run the project off a local clone of the contest repo. Please again be detailed and thorough, including specific markdowned CLI commands and necessary .env adjustments.
103 |
104 | Please also include steps needed to run appropriate tests included in scope.
105 |
106 | Example:
107 |
108 | Build:
109 | ```bash
110 | forge init
111 |
112 | forge install OpenZeppelin/openzeppelin-contracts
113 |
114 | forge install vectorized/solady
115 |
116 | forge build
117 | ```
118 |
119 | Tests:
120 | ```bash
121 | Forge test
122 | ```
123 |
124 | ## Known Issues
125 |
126 | Please clearly detail **all** currently recognized issues or vulnerabilities within the scope submitted. Please be thorough and precise, following the end of the 48-hour Kick-Off period, these Known Issues will be immutable for the duration of the contest.
127 |
128 | Example:
129 |
130 | `Known Issues:
131 | - Addresses other than the zero address (for example 0xdead) could prevent disputes from being resolved -
132 | Before the buyer deploys a new Escrow, the buyer and seller should agree to the terms for the Escrow. If the
133 | buyer accidentally or maliciously deploys an Escrow with incorrect arbiter details, then the seller could refuse
134 | to provide their services. Given that the buyer is the actor deploying the new Escrow and locking the funds, it's
135 | in their best interest to deploy this correctly.
136 |
137 | - Large arbiter fee results in little/no seller payment - In this scenario, the seller can decide to not perform
138 | the audit. If this is the case, the only way the buyer can receive any of their funds back is by initiating the dispute
139 | process, in which the buyer loses a large portion of their deposited funds to the arbiter. Therefore, the buyer is
140 | disincentivized to deploy a new Escrow in such a way.
141 |
142 | - Tokens with callbacks allow malicious sellers to DOS dispute resolutions - Each supported token will be vetted
143 | to be supported. ERC777 should be discouraged.
144 |
145 | - Buyer never calls confirmReceipt - The terms of the Escrow are agreed upon by the buyer and seller before deploying
146 | it. The onus is on the seller to perform due diligence on the buyer and their off-chain identity/reputation before deciding
147 | to supply the buyer with their services.
148 |
149 | - Salt input when creating an Escrow can be front-run
150 |
151 | - arbiter is a trusted role
152 |
153 | - User error such as buyer calling confirmReceipt too soon
154 |
155 | - Non-tokenAddress funds locked`
156 |
--------------------------------------------------------------------------------
/.gitbook/assets/Screenshot 2023-08-30 at 11.33.30.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Cyfrin/codehawks-docs/25f69cb845c4890e65fe6efd7f62e66d0e249d69/.gitbook/assets/Screenshot 2023-08-30 at 11.33.30.png
--------------------------------------------------------------------------------
/.gitbook/assets/Screenshot 2023-08-30 at 11.34.19 (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Cyfrin/codehawks-docs/25f69cb845c4890e65fe6efd7f62e66d0e249d69/.gitbook/assets/Screenshot 2023-08-30 at 11.34.19 (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/Screenshot 2023-08-30 at 11.34.19.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Cyfrin/codehawks-docs/25f69cb845c4890e65fe6efd7f62e66d0e249d69/.gitbook/assets/Screenshot 2023-08-30 at 11.34.19.png
--------------------------------------------------------------------------------
/.gitbook/assets/Untitled-2024-01-31-1203.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Cyfrin/codehawks-docs/25f69cb845c4890e65fe6efd7f62e66d0e249d69/.gitbook/assets/Untitled-2024-01-31-1203.png
--------------------------------------------------------------------------------
/.gitbook/assets/image (1) (1) (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Cyfrin/codehawks-docs/25f69cb845c4890e65fe6efd7f62e66d0e249d69/.gitbook/assets/image (1) (1) (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (1) (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Cyfrin/codehawks-docs/25f69cb845c4890e65fe6efd7f62e66d0e249d69/.gitbook/assets/image (1) (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Cyfrin/codehawks-docs/25f69cb845c4890e65fe6efd7f62e66d0e249d69/.gitbook/assets/image (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (10).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Cyfrin/codehawks-docs/25f69cb845c4890e65fe6efd7f62e66d0e249d69/.gitbook/assets/image (10).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (11).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Cyfrin/codehawks-docs/25f69cb845c4890e65fe6efd7f62e66d0e249d69/.gitbook/assets/image (11).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (12).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Cyfrin/codehawks-docs/25f69cb845c4890e65fe6efd7f62e66d0e249d69/.gitbook/assets/image (12).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (13).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Cyfrin/codehawks-docs/25f69cb845c4890e65fe6efd7f62e66d0e249d69/.gitbook/assets/image (13).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (14).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Cyfrin/codehawks-docs/25f69cb845c4890e65fe6efd7f62e66d0e249d69/.gitbook/assets/image (14).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (15).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Cyfrin/codehawks-docs/25f69cb845c4890e65fe6efd7f62e66d0e249d69/.gitbook/assets/image (15).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (2) (1) (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Cyfrin/codehawks-docs/25f69cb845c4890e65fe6efd7f62e66d0e249d69/.gitbook/assets/image (2) (1) (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (2) (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Cyfrin/codehawks-docs/25f69cb845c4890e65fe6efd7f62e66d0e249d69/.gitbook/assets/image (2) (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (2).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Cyfrin/codehawks-docs/25f69cb845c4890e65fe6efd7f62e66d0e249d69/.gitbook/assets/image (2).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (3) (1) (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Cyfrin/codehawks-docs/25f69cb845c4890e65fe6efd7f62e66d0e249d69/.gitbook/assets/image (3) (1) (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (3) (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Cyfrin/codehawks-docs/25f69cb845c4890e65fe6efd7f62e66d0e249d69/.gitbook/assets/image (3) (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (3).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Cyfrin/codehawks-docs/25f69cb845c4890e65fe6efd7f62e66d0e249d69/.gitbook/assets/image (3).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (4) (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Cyfrin/codehawks-docs/25f69cb845c4890e65fe6efd7f62e66d0e249d69/.gitbook/assets/image (4) (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (4).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Cyfrin/codehawks-docs/25f69cb845c4890e65fe6efd7f62e66d0e249d69/.gitbook/assets/image (4).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (5) (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Cyfrin/codehawks-docs/25f69cb845c4890e65fe6efd7f62e66d0e249d69/.gitbook/assets/image (5) (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (5).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Cyfrin/codehawks-docs/25f69cb845c4890e65fe6efd7f62e66d0e249d69/.gitbook/assets/image (5).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (6) (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Cyfrin/codehawks-docs/25f69cb845c4890e65fe6efd7f62e66d0e249d69/.gitbook/assets/image (6) (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (6).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Cyfrin/codehawks-docs/25f69cb845c4890e65fe6efd7f62e66d0e249d69/.gitbook/assets/image (6).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (7) (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Cyfrin/codehawks-docs/25f69cb845c4890e65fe6efd7f62e66d0e249d69/.gitbook/assets/image (7) (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (7).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Cyfrin/codehawks-docs/25f69cb845c4890e65fe6efd7f62e66d0e249d69/.gitbook/assets/image (7).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (8) (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Cyfrin/codehawks-docs/25f69cb845c4890e65fe6efd7f62e66d0e249d69/.gitbook/assets/image (8) (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (8).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Cyfrin/codehawks-docs/25f69cb845c4890e65fe6efd7f62e66d0e249d69/.gitbook/assets/image (8).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (9) (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Cyfrin/codehawks-docs/25f69cb845c4890e65fe6efd7f62e66d0e249d69/.gitbook/assets/image (9) (1).png
--------------------------------------------------------------------------------
/.gitbook/assets/image (9).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Cyfrin/codehawks-docs/25f69cb845c4890e65fe6efd7f62e66d0e249d69/.gitbook/assets/image (9).png
--------------------------------------------------------------------------------
/.gitbook/assets/image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Cyfrin/codehawks-docs/25f69cb845c4890e65fe6efd7f62e66d0e249d69/.gitbook/assets/image.png
--------------------------------------------------------------------------------
/.gitbook/assets/readme(1).md:
--------------------------------------------------------------------------------
1 | # Protocol Name
2 |
3 |
8 |
9 |
10 | ## Contest Details **THESE WILL BE PREPENDED TO THE SUBMITTED README BY THE CYFRIN TEAM**
11 |
12 | - Total Prize Pool:
13 | - HM Awards:
14 | - Low Awards:
15 | - GAS, Informational, or QAs Awards:
16 | - Starts
17 | - Ends
18 |
19 | ## Stats **THESE WILL BE PREPENDED TO THE SUBMITTED README BY THE CYFRIN TEAM**
20 | - nSLOC:
21 | - Complexity Score:
22 | - Dollars per Complexity:
23 | - Dollars per nSLOC:
24 |
25 | ## About the Project
26 |
27 | This section should give auditors a feeling for what the protocol does, it's primary functions and the goals it hopes to achieve. Can include links to project websites or docs
28 |
29 | Example:
30 |
31 | ```
32 | About
33 |
34 | This project is meant to enable smart contract auditors (sellers) and smart contract protocols
35 | looking for audits (buyers) to connect using a credibly neutral option, with optional arbitration.
36 |
37 | [Documentation](www.docs.com)
38 | [Website](www.protocolwebsite.com)
39 | [Twitter](www.twitter.com/handle)
40 | [GitHub](www.GitHub.com/account)
41 | ```
42 |
43 | ## Actors
44 |
45 | Detail which roles are included within your protocol, for example 'owner', 'borrower', 'organizer' etc. Draw clear links and outline the powers each actor should have and expected limitations to those powers. Please clearly detail your expected centralization risks.
46 |
47 | Example:
48 |
49 | ```
50 | Actors:
51 | Buyer: The purchaser of services, in this scenario, a project purchasing an audit.
52 | Seller: The seller of services, in this scenario, an auditor willing to audit a project.
53 | Arbiter: An impartial, trusted actor who can resolve disputes between the Buyer and Seller.
54 | The Arbiter is only compensated the arbiterFee amount if a dispute occurs.
55 | ```
56 |
57 | ## Scope (contracts)
58 |
59 | This section should give auditors a clear understanding of what files and directories are included within the scope of the contest. You can itemize every applicable file, or list particular folders or directories, but please be specific and thorough. This will server as an auditors ultimate reference point for what to focus on. Please include a commit hash
60 |
61 | Example:
62 | ```
63 | All Contracts in `src` are in scope.
64 | ```
65 | ```js
66 | src/
67 | ├── Beedle.sol
68 | ├── Fees.sol
69 | ├── Lender.sol
70 | ├── Staking.sol
71 | ├── interfaces
72 | │ ├── IERC20.sol
73 | │ └── ISwapRouter.sol
74 | └── utils
75 | ├── Errors.sol
76 | ├── Ownable.sol
77 | └── Structs.sol
78 |
79 | ```
80 |
81 | ## Compatibilities
82 |
83 | Please outline specific compatibilities of the protocol ie. blockchains (All EVM Compatible, specific chains). Please also include specific tokens, referencing standard contracts/interfaces when necessary, that are expected to function with the protocol. Include all whitelisted, or blacklisted tokens which are or are not supported. If the protocol is expected to function with **any** chain compatible tokens, please specify this.
84 |
85 | Example:
86 |
87 | ```
88 | Compatibilities:
89 | Blockchains:
90 | - Ethereum/Any EVM
91 | Tokens:
92 | - ETH
93 | - WETH
94 | - Matic
95 | - [ERC720](www.tokenstandard.com)
96 | - [ERC721](www.tokenstandard.com)
97 | ```
98 |
99 | ## Setup
100 |
101 | Please outline specific steps/processes to be followed in order for an auditor to run the project off a local clone of the contest repo. Please again be detailed and thorough, including specific markdowned CLI commands and necessary .env adjustments.
102 |
103 | Please also include steps needed to run appropriate tests included in scope.
104 |
105 | Example:
106 |
107 | Build:
108 | ```bash
109 | forge init
110 |
111 | forge install OpenZeppelin/openzeppelin-contracts
112 |
113 | forge install vectorized/solady
114 |
115 | forge build
116 | ```
117 |
118 | Tests:
119 | ```bash
120 | Forge test
121 | ```
122 |
123 | ## Known Issues
124 |
125 | Please clearly detail **all** currently recognized issues or vulnerabilities within the scope submitted. Please be thorough and precise, following the end of the 48-hour Kick-Off period, these Known Issues will be immutable for the duration of the contest.
126 |
127 | Example:
128 |
129 | `Known Issues:
130 | - Addresses other than the zero address (for example 0xdead) could prevent disputes from being resolved -
131 | Before the buyer deploys a new Escrow, the buyer and seller should agree to the terms for the Escrow. If the
132 | buyer accidentally or maliciously deploys an Escrow with incorrect arbiter details, then the seller could refuse
133 | to provide their services. Given that the buyer is the actor deploying the new Escrow and locking the funds, it's
134 | in their best interest to deploy this correctly.
135 |
136 | - Large arbiter fee results in little/no seller payment - In this scenario, the seller can decide to not perform
137 | the audit. If this is the case, the only way the buyer can receive any of their funds back is by initiating the dispute
138 | process, in which the buyer loses a large portion of their deposited funds to the arbiter. Therefore, the buyer is
139 | disincentivized to deploy a new Escrow in such a way.
140 |
141 | - Tokens with callbacks allow malicious sellers to DOS dispute resolutions - Each supported token will be vetted
142 | to be supported. ERC777 should be discouraged.
143 |
144 | - Buyer never calls confirmReceipt - The terms of the Escrow are agreed upon by the buyer and seller before deploying
145 | it. The onus is on the seller to perform due diligence on the buyer and their off-chain identity/reputation before deciding
146 | to supply the buyer with their services.
147 |
148 | - Salt input when creating an Escrow can be front-run
149 |
150 | - arbiter is a trusted role
151 |
152 | - User error such as buyer calling confirmReceipt too soon
153 |
154 | - Non-tokenAddress funds locked`
155 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .svelte-kit
2 | .sveltepress
3 | node_modules
4 | .env
5 | .vercel
6 | dist
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 👋 Intro to Cyfrin Codehawks
2 |
3 | CodeHawks is a **leading competitive smart contract audit marketplace powered by** [**Cyfrin**](https://cyfrin.io). CodeHawks works to **protect DeFi, Protocols, their users, and funds** from smart contract exploits through private and public smart contract security auditing competitions, joined by industry-leading auditors world-wide.
4 |
5 | ### The Problem CodeHawks Solves
6 |
7 | Digital value exchange enabled by decentralized finance and smart contracts requires outstanding security and best practices to reach mainstream adoption.
8 |
9 | _Over $250B is locked in the DeFi ecosystem, and in the past six months alone, over $1B has been lost in more than 100 DeFi exploits._ \
10 | \
11 | Last year, 6% of the Total Value Locked (TVL) in DeFi was stolen, resulting in the loss of hundreds of millions of dollars in users and protocols funds and, inherently, faith in the entire ecosystem.
12 |
13 | Furthermore, finding, hiring, and working with expert and reliable auditors has been extremely rudimental until now. Protocols were forced to perform word-of-mouth research, with little to no possibility of ensuring the quality of their audits.
14 |
15 | **CodeHawks solves this** by bridging together top-notch Blockchain security experts and Protocols in an eco-system built to create security in web3.
16 |
17 | ### Why CodeHawks?
18 |
19 | [CodeHawks](https://codehawks.com), powered by [Cyfrin](https://cyfrin.io), brings together top-notch global auditors and a community of thousands of security researchers to ensure the highest security standards when securing your codebases.
20 |
21 | | Feature/Attribute | CodeHawks | Competitors |
22 | | --------------------------- | ---------------------------- | ------------------------------------ |
23 | | **Pricing** | Low platform fees | Higher platform fees |
24 | | **Process Transparency** | Full Transparency Throughout | Sometimes Opaque |
25 | | **Types of Audits Offered** | Competitive & Private | Typically One Type |
26 | | **Referral Program** | Generous 15% Referral Fee | Usually Lower or No Referral Program |
27 | | **Audit Speed** | Quick Turnaround | Often Slower |
28 | | **Post-Audit Support** | Long-term Code Safeguarding | Typically Limited to Initial Audit |
29 | | **Additional Services** | Education, long term support | Often Limited to Auditing |
30 | | **Customer Support** | 24/7 Dedicated Support | Limited Support Hours |
31 |
32 | ### How CodeHawks works
33 |
34 | There are three core components in every CodeHawks smart contract auditing competition:
35 |
36 | 1. **Sponsors (protocols)**: Organizations or entities that implement smart contracts.
37 | 2. **Judges**: World-leading experts who oversee the audit process and ensure its integrity.
38 | 3. **Hawks (auditors)**: Professionals who conduct the actual audit of the smart contracts
39 |
40 | ### For Sponsors
41 |
42 | Protocols approach Cyfrin CodeHawks with their audit requirements. They have the flexibility to choose between:
43 |
44 | * **Public Competitive Audits**: A dynamic audit process where multiple auditors compete to identify vulnerabilities.
45 | * **Private Competitive Audits**: A more traditional approach where a selected auditor or team reviews the smart contract.
46 |
47 | Learn more about all the [Cyfrin security solutions](https://cyfrin.io/pricing) and its ecosystem.
48 |
49 | ### For Hawks (Auditors)
50 |
51 | The Hawks, our Auditors, lie at the heart of the CodeHawks ecosystem.
52 |
53 | They:
54 |
55 | * Engage in competitive audits, showcasing their expertise.
56 | * Get [paid for their findings](hawks-auditors/payouts.md).
57 | * Build a network to find private auditing opportunities.
58 | * Are sometimes eligible to become [community judges](broken-reference).
59 |
60 | If you're interested in becoming a Hawk on CodeHawks, start by visiting our [Quickstart guide](hawks-auditors/quick-start.md)
61 |
62 | ### For Judges
63 |
64 | Judges are the team, community, and protocol members dedicated to reviewing Hawks submissions, deduplicating, validating, testing, and ensuring the highest quality standards when selecting them.
65 |
66 | They are responsible for ensuring our top-notch security reports by revising, testing, and verifying thousands of security researchers' submissions every year.
67 |
68 | To learn more about our [judging process](judging/the-judging-process.md) or [evaluation criteria](judging/disqualification-criteria.md) - visit the dedicated sections.
69 |
70 |
71 |
72 |
--------------------------------------------------------------------------------
/SUMMARY.md:
--------------------------------------------------------------------------------
1 | # Table of contents
2 |
3 | * [👋 Intro to Cyfrin Codehawks](README.md)
4 | * [✏️ Glossary](glossary.md)
5 | * [⁉️ FAQs](faqs.md)
6 |
7 | ## 🛡️ Hawks (auditors)
8 |
9 | * [What is a Competitive Audit?](hawks-auditors/what-is-an-auditing-competition.md)
10 | * [Quick Start](hawks-auditors/quick-start.md)
11 | * [The Kick-Off Period](hawks-auditors/the-kick-off-period.md)
12 | * [How to Present Your Findings](hawks-auditors/how-to-write-and-submit-a-finding.md)
13 | * [How to Evaluate a Finding Severity](hawks-auditors/how-to-evaluate-a-finding-severity.md)
14 | * [How to Determine a Finding Validity](hawks-auditors/how-to-determine-a-finding-validity.md)
15 | * [How to Write a PoC](hawks-auditors/how-to-create-and-submit-a-poc.md)
16 | * [Appeals](hawks-auditors/appeals.md)
17 | * [Payouts](hawks-auditors/payouts.md)
18 | * [How Does XP Work?](hawks-auditors/how-does-xp-work.md)
19 |
20 | ## 👩⚖️ Judging
21 |
22 | * [The Judging Process](judging/the-judging-process.md)
23 | * [How Community Judging Works](judging/how-community-judging-works.md)
24 | * [Community Judging Eligibility](judging/community-judging-eligibility.md)
25 | * [Disqualification Criteria](judging/disqualification-criteria.md)
26 | * [Payouts and Rewards](judging/payouts-and-rewards.md)
27 |
28 | ## 👩💻 Protocol teams (sponsors)
29 |
30 | * [The Auditing process](protocol-teams-sponsors/the-auditing-process.md)
31 | * [Case Studies](https://cyfrin.io/case-studies)
32 | * [Request an Audit](https://cyfrin.io/get-an-audit)
33 |
34 | ***
35 |
36 | * [🦅 First Flights](first-flights.md)
37 | * [🫂 Create and Submit a First Flight](create-and-submit-a-first-flight.md)
38 | * [🛠️ Tools](tools.md)
39 | * [Learn blockchain security](https://updraft.cyfrin.io)
40 | * [Twitter](https://twitter.com/CodeHawks)
41 | * [LinkedIn](https://www.linkedin.com/company/101332422)
42 | * [GitHub](https://github.com/cyfrin)
43 | * [Support](https://discord.gg/UFXqFACHWA)
44 |
--------------------------------------------------------------------------------
/create-and-submit-a-first-flight.md:
--------------------------------------------------------------------------------
1 | # 🫂 Create and Submit a First Flight
2 |
3 | Community First Flights are Cyfrin's most recent expansion to our First Flight initiative. Community First Flights presents the perfect opportunity for those wanting to contribute a fun code base or strengthen the developer side of their skill set!
4 |
5 | ### Submission Criteria
6 |
7 | The rules are simple:
8 |
9 | 1. Create a fun project with a theme! (Holidays are popular)
10 | 2. Ensure the in-scope contracts are \~ 100-200 nSLOC
11 | 3. The project should have a maximum complexity of 200
12 |
13 | In addition to the above, First Flights are meant to contain bugs! Make sure your project intentionally includes:
14 |
15 | * One or two easy-to-find bugs
16 | * One medium-difficulty bug
17 | * One hard-to-find bug
18 | * One High/Critical
19 | * One Low
20 |
21 | Be sure to write up an answer key detailing the intentional bugs you've placed in your code!
22 |
23 | The final piece required is to ensure your project has an appropriate README. Please use the template provided below and tell us about your protocol!
24 |
25 | {% file src=".gitbook/assets/README TEMPLATE.md" %}
26 | Community First Flight README Template
27 | {% endfile %}
28 |
29 | ### How to submit a First Flight
30 |
31 | Once your repo is ready fill out this [form](https://app.deform.cc/form/4f8e7158-eb8a-457c-b15a-c3267514ec12) and, ping @**equious.eth** on [Discord](https://discord.gg/cyfrin). He will arrange the sharing of your code base privately. From here, your submission will be vetted, and you'll be provided any necessary feedback or adjustments that require implementation.
32 |
33 | ### When will my First Flight start?
34 |
35 | Submissions will be accepted on a first-come, first-served basis. A few things to note:
36 |
37 | * A submission must be fully vetted and accepted before being 'in line'.
38 | * First Flights are held twice/month.
39 | * In order to run the contest, we require at least three days' notice before the next expected First Flight.
40 | * Code bases ready with less notice than this will be scheduled for the next available First Flight.
41 |
42 | Cyfrin retains the right to shift to a **lottery selection process** should the pending submissions grow too large.
43 |
--------------------------------------------------------------------------------
/faqs.md:
--------------------------------------------------------------------------------
1 | ---
2 | description: Find answers to the most frequently asked questions on CodeHawks.
3 | ---
4 |
5 | # ⁉️ FAQs
6 |
7 | ### **⚙️ General**
8 |
9 | ***
10 |
11 | What is Cyfrin CodeHawks?
14 |
15 | Codehawks is a smart contract competitive audits platform helping protect some of the world’s largest protocols, thousands of users, and billions of TVL through crowdsourced security pre and post-deployment security solutions.
16 |
17 | What is a competitive audit?
22 |
23 | Protocols and organizations host competitions to find vulnerabilities in their smart contracts. Auditors uncover vulnerabilities and bugs in a project’s codebase to earn a reward.
24 |
25 | Competitions incentivize security auditors to conduct more comprehensive audits by offering rewards based on the severity of the bugs they discover.
26 |
27 | How can I host a competition on CodeHawks?
32 |
33 | Fill out [this form](https://cyfrin.io/get-an-audit) to contact us. One of our experts will contact you within 48 hours to walk you through every step of the process and find the right security solution for your protocol or organization's needs.
34 |
35 | How is a contest prize pool determined?
40 |
41 | The total prize pool of a contest is calculated based on the number of lines of code in the codebase's scope, without counting comments and empty lines.
42 |
43 | How do I get rewarded?
48 |
49 | Rewards are paid out in USDC through the ZKsync chain. Once a judge deems a submission valid, a reward will be assigned and credited to the zkSync wallet address indicated by the user on their profile once the competition ends.
50 |
51 | **Note**: crediting the reward won't be possible without a ZKsync wallet connected to the user profile.
52 |
53 | Where can I find invoice information for my winnings?
58 |
59 | **Address:**
60 |
61 | 9066 CASCADA WAY #102\
62 | NAPLES, FL. 34114\
63 | UNITED STATES\
64 | \
65 | **Tax ID:**\
66 | 92-1600150\
67 | \
68 | **Company Name:**\
69 | Cyfrin Inc.
70 |
71 | How do I KYC to receive a reward?
76 |
77 | Specific competitions will need auditors to KYC to receive their rewards. Once the contest ends, if you're not KYC'd yet, you'll receive an in-platform notification and an email with all the steps you'll need to take to complete the KYC process and unlock your rewards.
78 |
79 | What is a first flight?
88 |
89 | CodeHawks First Flights is a Cyfrin flagship initiative. Smart contract auditing contests written to simulate real-world protocols, designed to introduce the next generation of developers to security audits.
90 |
91 | Do we have to wait until the start date to see the code?
96 |
97 | Yes, codebases are made public only once the contest has started. You can find the starting date and time for every contest in the related contest page on [codehawks.com](https://codehawks.com)
98 |
99 | #### How is nSLOC calculated?
100 |
101 | nSLOC stands for 'Normalized Source Code', which is a custom measurement used (among others) when evaluating the complexity of a codebase.
102 |
103 | To get the NSLOC count of a file:
104 |
105 | 1. For all functions, reduce any multiline function declarations to a single line.
106 | 2. Remove all comments
107 | 3. Remove all empty lines
108 | 4. Count the remaining lines
109 |
110 | Is "X" a valid submission?
119 |
120 | To determine if "X" is a valid submission, it must be evaluated against the criteria provided by CodeHawks. A valid submission typically represents a vulnerability in the codebase. The submission should fall into one of the categories: High, Medium, Low, Gas, or Informational. However, it's essential to note that if more than 85% of your findings are invalid, you will be disqualified from the competition. For instance, if you submit one valid finding and six invalid ones, only 14.3% of your submissions are valid, leading to disqualification.
121 |
122 | Additionally, any findings associated with the "[4naly3er](https://github.com/Picodes/4naly3er)" tool, run at the start of each competition, are ineligible for rewards. The submission format should also align with the latest format provided on the website.
123 |
124 | The guidelines used to evaluate the findings' validity can be found in the [how-to-determine-a-finding-validity.md](hawks-auditors/how-to-determine-a-finding-validity.md "mention")documentation.
125 |
126 | I’m unsure of the severity of my submission, what should I do?
131 |
132 | If you're unsure of the severity of your submission, consider the following steps based on the information provided by CodeHawks:
133 |
134 | 1. **Review the Categories:** Revisit the definitions of the severity categories provided by CodeHawks:
135 | * **High:** Funds are directly or nearly directly at risk.
136 | * **Medium:** Funds are indirectly at risk, or protocol functionality or availability is disrupted.
137 | * **Low, Gas, Informational:**
138 | * **Low:** Funds are not at risk, but a function might be incorrect, or the state might not be handled appropriately.
139 | * **Gas:** Refers to gas optimizations.
140 | * **Informational:** Pertains to code style, maturity, code smells, comment correctness, etc.
141 | 2. **Judge's Discretion:** Remember that determining the severity involves some subjectivity. The final categorization is up to the judges' discretion. If the protocol you're auditing has specific criteria that should be followed.
142 | 3. **Seek Feedback:** Before finalizing your submission, consider discussing it with peers or mentors on our [Discord](https://discord.gg/cyfrin) server who have experience in the field. They might provide insights that can help you gauge the severity of your findings.
143 | 4. **Provide Detailed Information:** When submitting, provide comprehensive details about the vulnerability. This includes a summary, vulnerability details, potential impact, tools used, and recommended mitigation. The more information you provide, the easier for the judges to assess the severity accurately.
144 | 5. **Stay Updated:** As CodeHawks evolves, the basis for findings and their categorizations might change. Always refer to the latest guidelines on the CodeHawks website to ensure you're up-to-date with their criteria.
145 |
146 | Lastly, even if you're unsure, submitting your findings is better. The judges will review it and assign the appropriate severity based on their assessment.
147 |
148 | For more information consult [how-to-evaluate-a-finding-severity.md](hawks-auditors/how-to-evaluate-a-finding-severity.md "mention").
149 |
150 | #### **What happens if I choose the wrong severity?**
151 |
152 | The severity of findings has an element of subjectivity. The judges will review your submission and may re-categorize it based on their assessment.
153 |
154 | There isn't a direct penalty mentioned for misclassifying the severity. However, consistently misclassifying or misrepresenting findings could impact your credibility in the competition.
155 |
156 | For more information consult [how-to-evaluate-a-finding-severity.md](hawks-auditors/how-to-evaluate-a-finding-severity.md "mention").
157 |
158 | What happens if one of my submissions is invalid?
163 |
164 | If "Y" is an invalid finding and you have many invalid findings, it can count against you. Specifically, if more than 85% of your findings are invalid, you will be disqualified from the competition. This system is designed to allow some leeway for invalid submissions but aims to prevent participants from spamming the system with numerous invalid findings.
165 |
166 | Refer to the [how-to-determine-a-finding-validity.md](hawks-auditors/how-to-determine-a-finding-validity.md "mention") to make sure your findings respect our validity guidelines.
167 |
168 | Who are the CodeHawks judges?
177 |
178 | Judging is conducted by a dedicated panel of members from the Cyfrin team and engineers from the sponsoring protocol. This approach ensures impartiality and minimizes potential bias and conflicts of interest.
179 |
180 | What is community judging?
185 |
186 | Community judging allows eligible CodeHawks auditors to earn rewards for judging other users' submissions. This drastically speeds up triage and turnaround times while giving auditors another chance to climb the leaderboard and showcase their skills.
187 |
188 | How long does judging take?
193 |
194 | The duration for judging varies based on the size of the codebase and the number of submissions received. Specific timelines for each contest will be announced on our [**Twitter page**](https://twitter.com/CodeHawks) and within the appropriate contest channel on our [Discord](https://discord.gg/cyfrin).
195 |
196 | Can I help Judge?
201 |
202 | Currently, we do not have a community judges initiative in place. However, it's on our roadmap for future implementation. Our primary concern is to ensure that any system we introduce maintains the highest standards of impartiality and transparency. We've observed conflicts of interest arising on other competitive platforms when community members were involved in judging.
203 |
204 | We aim to create a judging process everyone can trust and feel comfortable with.
205 |
206 | I don’t agree with the judgment, what can I do?
211 |
212 | The judging period of every contest is immediately followed by a 48-hour Appeals Period. This period allows auditors an opportunity to raise objections and voice concerns they have with the preliminary judgments. The Appeals Period will be clearly announced via [Twitter](https://twitter.com/CodeHawks) and [Discord](https://discord.gg/cyfrin)
213 |
214 | See the [Appeals](hawks-auditors/appeals.md) page for more information.
215 |
216 | What is a finding?
221 |
222 | A finding represents a vulnerability in the codebase. Findings are categorized into different levels of severity:
223 |
224 | 1. **High:** This category indicates that funds are directly or nearly at risk.
225 | 2. **Medium:** In this category, funds are indirectly at risk, or protocol functionality or availability is disrupted.
226 | 3. **Low, Gas, Informational:**
227 | * **Low:** Funds are not at risk, but a function might be incorrect, state might not be handled appropriately, etc.
228 | * **Gas:** Refers to gas optimizations.
229 | * **Informational:** Pertains to code style, maturity, code smells, comment correctness, and similar aspects.
230 |
231 | It's important to note that these categories involve some subjectivity, and the judges determine a finding's category. If a protocol has specific criteria, then that should be followed.
232 |
233 | Additionally, at the beginning of each competition, the "[4naly3er](https://github.com/Picodes/4naly3er)" tool will be run, and any findings associated with this tool are ineligible for rewards. The basis for findings may evolve as CodeHawks progresses.
234 |
235 | For more information on findings and how to evaluate their severity, consult the [how-to-evaluate-a-finding-severity.md](hawks-auditors/how-to-evaluate-a-finding-severity.md "mention")guide.
236 |
237 | nSLOC
10 |
11 | nSLOC stands for 'Normalized Source Lines of Code', a custom measurement we use (among other things) to evaluate the complexity of a codebase.
12 |
13 | To get the NSLOC count of a file:
14 |
15 | 1. For all functions, reduce any multiline function declarations to a single line.
16 | 2. Remove all comments
17 | 3. Remove all empty lines
18 | 4. Count the remaining lines
19 |
20 | PoC - Proof of Concept
25 |
26 | A proof of concept (PoC) is a demonstration or experiment that seeks to validate the feasibility, functionality, and potential of a particular idea, concept, or method. Typically used in the early stages of development, a PoC demonstrates that a concept or theory has practical potential for real-world application. It doesn't aim to represent a finished product or solution. Instead, verifying that a specific idea can be developed into a functional prototype or product is a foundational step.
27 |
28 | QAs - Quality Assurance
33 |
34 | QA reports are essential software development and testing documents that highlight the status, progress, and potential issues of a particular product or system under evaluation. Here's a brief overview of what a QA report might entail.
35 |
36 | Finding
41 |
42 | Any submission done by a Hawk (auditor) to a contest reporting a bug or potential exploitation vector in a smart contract or codebase
43 |
44 | Complexity
49 |
50 | The complexity of a code base or smart contract, calculated using [Solidity Core Metrics](https://github.com/Consensys/solidity-metrics), taking into consideration:
51 |
52 | * nSLOC
53 | * Number of contracts
54 |
55 | And other parameters
56 |
57 | Sponsor
62 |
63 | Any protocol's team or developers willing to make their smart contracts more secure and their users safe by sponsoring a [smart contract auditing competition](broken-reference) on Codehawks.com
64 |
65 | Hawks
70 |
71 | The unique community of auditors on [codehawks.com](https://codehawks.com)
72 |
73 | 1. Working test case
12 |
13 | This is the most direct way to demonstrate a vulnerability. It should be executable and should clearly show the flaw in action.
14 |
15 | 2. Line-by-line comments
20 |
21 | Each line of the test case should be accompanied by comments explaining what that specific line is meant to do. This helps understanding the flow and logic of the PoC.
22 |
23 | 3. Clear separation of actors
28 |
29 | Clearly define and separate the roles involved in the PoC. Common roles include:
30 |
31 | * Attacker: The entity exploiting the vulnerability.
32 | * Victim: The entity affected by the exploit.
33 | * Protocol: The system or platform in which the smart contract operates.
34 |
35 | 4. Detailed exploit scenario
40 |
41 | If writing a PoC in the form of a test case is challenging or too straightforward, then a detailed step-by-step exploit scenario can be provided. This should explain:
42 |
43 | * **Initial State**: Describe the initial state of the system.
44 | * **Step 1**: Describe the first action taken by the attacker.
45 | * **Step 2**: Describe the subsequent action and so on.
46 | * **Outcome**: Describe the result of the exploit.
47 | * **Implications**: Discuss potential consequences or implications of the exploit.
48 |
49 |
Impact | ||||
---|---|---|---|---|
High | Medium | Low | ||
High | H | H/M | M | |
Likelihood | Medium | H/M | M | M/L |
Low | M | M/L | L |