|
2 | 2 |
|
3 | 3 | Follow these high-level recommendations to build more secure smart contracts. |
4 | 4 |
|
5 | | -* [Design (before development)](#design-guidelines) |
6 | | - * [Documentation and specifications](#documentation-and-specifications) |
7 | | - * [On-chain vs off-chain computation](#on-chain-vs-off-chain-computation) |
8 | | - * [Upgradeability](#upgradeability) |
9 | | -* [Implementation (during development)](#implementation-guidelines) |
10 | | - * [Function composition](#function-composition) |
11 | | - * [Inheritance](#inheritance) |
12 | | - * [Events](#events) |
13 | | - * [Avoid known pitfalls](#avoid-known-pitfalls) |
14 | | - * [Dependencies](#dependencies) |
15 | | - * [Testing and verification](#testing-and-verification) |
16 | | - * [Solidity](#solidity) |
17 | | -* [Deploymnent (after development)](#deployment-guidelines) |
| 5 | +- [Development Guidelines](#development-guidelines) |
| 6 | + - [Design guidelines](#design-guidelines) |
| 7 | + - [Documentation and specifications](#documentation-and-specifications) |
| 8 | + - [On-chain vs off-chain computation](#on-chain-vs-off-chain-computation) |
| 9 | + - [Upgradeability](#upgradeability) |
| 10 | + - [Implementation guidelines](#implementation-guidelines) |
| 11 | + - [Function composition](#function-composition) |
| 12 | + - [Inheritance](#inheritance) |
| 13 | + - [Events](#events) |
| 14 | + - [Avoid known pitfalls](#avoid-known-pitfalls) |
| 15 | + - [Dependencies](#dependencies) |
| 16 | + - [Testing and verification](#testing-and-verification) |
| 17 | + - [Solidity](#solidity) |
| 18 | + - [Deployment guidelines](#deployment-guidelines) |
18 | 19 |
|
19 | 20 | ## Design guidelines |
20 | 21 |
|
@@ -76,13 +77,12 @@ The architecture of your codebase should make your code easy to review. Avoid ar |
76 | 77 | ### Testing and verification |
77 | 78 |
|
78 | 79 | - **Write thorough unit-tests.** An extensive test suite is crucial to build high-quality software. |
79 | | -- **Write [Slither](https://github.com/crytic/slither), [Echidna](https://github.com/crytic/echidna) and [Manticore](https://github.com/trailofbits/manticore) custom checks and properties.** Automated tools will help ensure your contract is secure. Review the rest of this guide to learn how to write efficient checks and properties. |
80 | | -- **Use [crytic.io](https://crytic.io/).** Crytic integrates with Github, provides access to private Slither detectors, and runs custom property checks from Echidna. |
| 80 | +- **Write [Slither](https://github.com/crytic/slither) and [Echidna](https://github.com/crytic/echidna) custom checks and properties.** Automated tools will help ensure your contract is secure. Review the rest of this guide to learn how to write efficient checks and properties. |
81 | 81 |
|
82 | 82 | ### Solidity |
83 | 83 |
|
84 | | -- **Favor Solidity 0.5 or 0.6.** In our opinion, Solidity 0.5 and 0.6 are more secure and have better built-in practices than 0.4. Solidity 0.7 is too young to be used in production and needs time to mature. |
85 | | -- **Use a stable release to compile; use the latest release to check for warnings.** Check that your code has no reported issues with the latest compiler version. However, Solidity has a fast release cycle and has a history of compiler bugs, so we do not recommend the latest version for deployment (see Slither’s [solc version recommendation](https://github.com/crytic/slither/wiki/Detector-Documentation#recommendation-39)). |
| 84 | +- **Favor Solidity versions outlined in our [Slither Recommendations](https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-versions-of-solidity)** In our opinion, older Solidity are more secure and have better built-in practices. Newer Solidity versions may be ttoo young to be used in production and require additional time to mature. |
| 85 | +- **Use a stable release to compile; use the latest release to check for warnings.** Check that your code has no reported issues with the latest compiler version. However, Solidity has a fast release cycle and has a history of compiler bugs, so we do not recommend the latest version for deployment (see Slither’s [solc version recommendation](https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-versions-of-solidity)). |
86 | 86 | - **Do not use inline assembly.** Assembly requires EVM expertise. Do not write EVM code if you have not _mastered_ the yellow paper. |
87 | 87 |
|
88 | 88 | ## Deployment guidelines |
|
0 commit comments