Skip to content

Commit

Permalink
Fix further links issues
Browse files Browse the repository at this point in the history
  • Loading branch information
montyly committed Feb 21, 2023
1 parent c43c2c0 commit 55db501
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions learn_evm/evm_opcodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ The gas information is a work in progress. If an asterisk is in the Gas column,
| [`0x1b`](#shl) | SHL | Shift Left | [EIP145](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-145.md) | 3 |
| [`0x1c`](#shr) | SHR | Logical Shift Right | [EIP145](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-145.md) | 3 |
| [`0x1d`](#sar) | SAR | Arithmetic Shift Right | [EIP145](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-145.md) | 3 |
| [`0x20`](#keccak256) | KECCAK256 | Compute Keccak-256 hash | - | 30* |
| [`0x20`](#sha3) | KECCAK256 | Compute Keccak-256 hash | - | 30* |
| `0x21` - `0x2f`| Unused | Unused |
| [`0x30`](#address) | ADDRESS | Get address of currently executing account | - | 2 |
| [`0x31`](#balance) | BALANCE | Get balance of the given account | - | 700 |
Expand Down Expand Up @@ -262,7 +262,7 @@ c = (a + b) % m
c = (a * b) % m

-----
### EXT
### EXP
**0x0a**

(a, b, m) => (c)
Expand Down
6 changes: 3 additions & 3 deletions program-analysis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ The broad areas that are frequently relevant for smart contracts include:
Component | Tools | Examples
--- | --- | --- |
State machine | Echidna, Manticore |
Access control | Slither, Echidna, Manticore | [Slither exercise 2](https://github.com/crytic/building-secure-contracts/blob/master/program-analysis/slither/exercise2.md), [Echidna exercise 2](https://github.com/crytic/building-secure-contracts/blob/master/program-analysis/echidna/Exercise-2.md)
Arithmetic operations | Manticore, Echidna | [Echidna exercise 1](https://github.com/crytic/building-secure-contracts/blob/master/program-analysis/echidna/Exercise-1.md), [Manticore exercises 1 - 3](https://github.com/crytic/building-secure-contracts/tree/master/program-analysis/manticore/exercises)
Inheritance correctness | Slither | [Slither exercise 1](https://github.com/crytic/building-secure-contracts/blob/master/program-analysis/slither/exercise1.md)
Access control | Slither, Echidna, Manticore | [Slither exercise 2](./slither/exercise2.md), [Echidna exercise 2](./echidna/exercises/Exercise-2.md)
Arithmetic operations | Manticore, Echidna | [Echidna exercise 1](./echidna/exercises/Exercise-1.md), [Manticore exercises 1 - 3](./manticore/exercises)
Inheritance correctness | Slither | [Slither exercise 1](./slither/exercise1.md)
External interactions | Manticore, Echidna |
Standard conformance | Slither, Echidna, Manticore | [`slither-erc`](https://github.com/crytic/slither/wiki/ERC-Conformance)

Expand Down
2 changes: 1 addition & 1 deletion program-analysis/echidna/exercises/Exercise-5.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ We recommend to first try without reading the following hints. The hints are in

- Remember that sometimes you have to supply the test contract with Ether. Read more in [the Echidna wiki](https://github.com/crytic/echidna/wiki/Config) and look at [the default config setup](https://github.com/crytic/echidna/blob/master/tests/solidity/basic/default.yaml).
- The invariant that we are looking for is "the balance of the receiver contract can not decrease"
- Read what is the [multi abi option](https://github.com/crytic/building-secure-contracts/blob/master/program-analysis/echidna/common-testing-approaches.md#external-testing)
- Read what is the [multi abi option](../basic/common-testing-approaches.md#external-testing)
- A template is provided in [contracts/naive-receiver/NaiveReceiverEchidna.sol](https://github.com/crytic/damn-vulnerable-defi-echidna/blob/hints/contracts/naive-receiver/NaiveReceiverEchidna.sol)
- A config file is provided in [naivereceiver.yaml](https://github.com/crytic/damn-vulnerable-defi-echidna/blob/hints/naivereceiver.yaml)

Expand Down
2 changes: 1 addition & 1 deletion program-analysis/echidna/exercises/Exercise-6.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Only the following contracts are relevant:
We recommend to first try without reading the following hints. The hints are in the [`hints` branch](https://github.com/crytic/damn-vulnerable-defi-echidna/tree/hints).

- The invariant that we are looking for is "Flash loan can always be made"
- Read what is the [multi abi option](https://github.com/crytic/building-secure-contracts/blob/master/program-analysis/echidna/common-testing-approaches.md#external-testing)
- Read what is the [multi abi option](../basic/common-testing-approaches.md#external-testing)
- The `receiveTokens` callback function must be implemented
- A template is provided in [contracts/unstoppable/UnstoppableEchidna.sol](https://github.com/crytic/damn-vulnerable-defi-echidna/blob/hints/contracts/unstoppable/UnstoppableEchidna.sol)
- A config file is provided in [unstoppable.yaml](https://github.com/crytic/damn-vulnerable-defi-echidna/blob/hints/unstoppable.yaml)
Expand Down
2 changes: 1 addition & 1 deletion program-analysis/echidna/exercises/Exercise-8.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Only the following contracts are relevant:
We recommend to first try without reading the following hints. The hints are in the [`hints` branch](https://github.com/crytic/damn-vulnerable-defi-echidna/tree/hints).

- The invariant that we are looking for is "an attacker cannot get almost whole amount of rewards"
- Read what is the [multi abi option](https://github.com/crytic/building-secure-contracts/blob/master/program-analysis/echidna/common-testing-approaches.md#external-testing)
- Read what is the [multi abi option](../basic/common-testing-approaches.md#external-testing)
- A config file is provided in [the-rewarder.yaml](https://github.com/crytic/damn-vulnerable-defi-echidna/blob/solutions/the-rewarder.yaml)

## Solution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ As `f()` contains two paths, a DSE will construct two differents path predicates
- Path 1: `a == 65`
- Path 2: `Not (a == 65)`

Each path predicate is a mathematical formula that can be given to a so-called [SMT solver](https://github.com/crytic/building-secure-contracts/blob/master/program-analysis/manticore/symbolic-execution-introduction.md), which will try to solve the equation. For `Path 1`, the solver will say that the path can be explored with `a = 65`. For `Path 2`, the solver can give `a` any value other than 65, for example `a = 0`.
Each path predicate is a mathematical formula that can be given to a so-called `SMT solver`, which will try to solve the equation. For `Path 1`, the solver will say that the path can be explored with `a = 65`. For `Path 2`, the solver can give `a` any value other than 65, for example `a = 0`.

### Verifying properties
Manticore allows a full control over all the execution of each path. As a result, it allows to add arbirtray contraints to almost anything. This control allows for the creation of properties on the contract.
Expand Down

0 comments on commit 55db501

Please sign in to comment.