Skip to content

Commit

Permalink
docs: document exploit
Browse files Browse the repository at this point in the history
  • Loading branch information
leovct committed Sep 30, 2024
1 parent 473518c commit 68eafec
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/EthernautCTF.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
| 19 | [AlienCode](../src/EthernautCTF/AlienCodex.sol) || [AlienCodeExploit](../test/EthernautCTF/AlienCodexExploit.t.sol.txt) | The challenge requires to use solidity version `^0.5.0` but unfortunately, the minimum version supported by [forge-std](https://github.com/foundry-rs/forge-std) is `0.6.2`. Thus, the solution of this challenge won't be part of this repository. |
| 20 | [Denial](../src/EthernautCTF/Denial.sol) || [DenialExploit](../test/EthernautCTF/DenialExploit.t.sol) | - Always set the amount of gas when using a low-level call. It will prevent the external contract to consume all the gas.<br>- Check the return value of low-level calls, especially when the address is controlled by someone else. |
| 21 | [Shop](../src/EthernautCTF/Shop.sol) || [ShopExploit](../test/EthernautCTF/ShopExploit.t.sol) | - When calling an external contract, always check the returned value before using it!<br>- This challenge is very similar to challenge 11. |
| 22 | Dex | | | |
| 22 | [Dex](../src/EthernautCTF/Dex.sol) | | [DexExploit](../test/EthernautCTF/DexExploit.t.sol) | The contract uses a division operation to compute the swap amount which can be exploited because of a precision loss. Indeed, Solidity does not support floating points. |
| 23 | DexTwo || | |
| 24 | PuzzleWallet || | |
| 25 | Motorbike || | |
Expand Down
File renamed without changes.

0 comments on commit 68eafec

Please sign in to comment.