An open API service indexing awesome lists of open source software.

https://github.com/passandscore/solidity-challenges

Solidity exploits & challenges.
https://github.com/passandscore/solidity-challenges

Last synced: 10 days ago
JSON representation

Solidity exploits & challenges.

Awesome Lists containing this project

README

          


Solidity Challenges Repository


GitHub stars

GitHub contributors

GitHub forks


## Welcome, Solidity Developers & Researchers! 🎉

Welcome to the Solidity Challenges Repository, a platform for Solidity developers and security researchers. This repository offers a wide range of challenges, from language-specific tasks to exploit-focused scenarios.

## 🦶 Choose Your Path

- **Exploits**: Identify vulnerabilities and exploit the contracts.
- **Solidity**: Test your knowledge with language-specific challenges.

## 🏆 Feature Challenges

| Type | Challenge | Author | Discussion |
| -------- | -------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------- |
| Exploit | [Airdrop](https://github.com/passandscore/solidity-challenges/blob/main/src/exploits/airdrop/README.md) | [PutraLaksmana](https://github.com/PutraLaksmana) | [View](https://github.com/passandscore/solidity-challenges/discussions/38) |
| Solidity | [Correct writeMyData](https://github.com/passandscore/solidity-challenges/blob/main/src/solidity/challenge-05/README.md) | [vicsnet](https://github.com/vicsnet) | [View](https://github.com/passandscore/solidity-challenges/discussions/categories/solidity) |

## 🚨 Exploit Challenges

| # | Challenge | Author |
| --- | ------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------- |
| 16 | [Weighted Voting](https://github.com/passandscore/solidity-challenges/blob/main/src/exploits/weighted-voting/README.md) | [ZCalz](https://github.com/ZCalz) |
| 15 | [Succession](https://github.com/passandscore/solidity-challenges/blob/main/src/exploits/succession/README.md) | [passandscore](https://github.com/passandscore) |
| 14 | [Airdrop](https://github.com/passandscore/solidity-challenges/blob/main/src/exploits/airdrop/README.md) | [PutraLaksmana](https://github.com/PutraLaksmana) |
| 13 | [Instigator](https://github.com/passandscore/solidity-challenges/blob/main/src/exploits/instigator/README.md) | [passandscore](https://github.com/passandscore) |
| 12 | [Private Treasure](https://github.com/passandscore/solidity-challenges/blob/main/src/exploits/private-treasure/README.md) | [passandscore](https://github.com/passandscore) |
| 11 | [Sideline](https://github.com/passandscore/solidity-challenges/blob/main/src/exploits/sideline/README.md) | [passandscore](https://github.com/passandscore) |
| 10 | [Combination Lock](https://github.com/passandscore/solidity-challenges/blob/main/src/exploits/combination-lock/README.md) | [passandscore](https://github.com/passandscore) |
| 9 | [Mimic](https://github.com/passandscore/solidity-challenges/blob/main/src/exploits/mimic/README.md) | [passandscore](https://github.com/passandscore) |
| 8 | [Lucky Spin](https://github.com/passandscore/solidity-challenges/blob/main/src/exploits/lucky-spin/README.md) | [passandscore](https://github.com/passandscore) |
| 7 | [False Start](https://github.com/passandscore/solidity-challenges/blob/main/src/exploits/false-start/README.md) | [passandscore](https://github.com/passandscore) |
| 6 | [ERC20 Vault Exploit](https://github.com/passandscore/solidity-challenges/blob/main/src/exploits/erc20-vault/README.md) | [IzuMan](https://github.com/IzuMan0x) |
| 5 | [Sherwood Bank](https://github.com/passandscore/solidity-challenges/blob/main/src/exploits/sherwood-bank/README.md) | [IzuMan](https://github.com/IzuMan0x) |
| 4 | [Steal](https://github.com/passandscore/solidity-challenges/blob/main/src/exploits/steal/README.md) | [X_Drained](https://x.com/X_Drained) |
| 3 | [Auction](https://github.com/passandscore/solidity-challenges/blob/main/src/exploits/auction/README.md) | scadamsuab |
| 2 | [Gridlock](https://github.com/passandscore/solidity-challenges/blob/main/src/exploits/gridlock/README.md) | [passandscore](https://github.com/passandscore) |
| 1 | [Etherstore](https://github.com/passandscore/solidity-challenges/blob/main/src/exploits/ether-store/README.md) | [passandscore](https://github.com/passandscore) |

## 🚨 Solidity Challenges

| # | Challenge | Author |
| --- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
| 6 | [Users reporting incorrect game count ](https://github.com/passandscore/solidity-challenges/blob/main/src/solidity/challenge-06/README.md) | [passandscore](https://github.com/passandscore) |
| 5 | [Correct writeMyData](https://github.com/passandscore/solidity-challenges/blob/main/src/solidity/challenge-05/README.md) | [vicsnet](https://github.com/vicsnet) |
| 4 | [Update userOperation ](https://github.com/passandscore/solidity-challenges/blob/main/src/solidity/challenge-04/README.md) | [passandscore](https://github.com/passandscore) |
| 3 | [Parse the given bytes to return both the function selector and data](https://github.com/passandscore/solidity-challenges/blob/main/src/solidity/challenge-03/README.md) | [passandscore](https://github.com/passandscore) |
| 2 | [Ensure secure randomness in this lottery contract](https://github.com/passandscore/solidity-challenges/blob/main/src/solidity/challenge-02/README.md) | [codyrhoten](https://github.com/codyrhoten) |
| 1 | [The test should revert when attempting to mint as an unauthorized user](https://github.com/passandscore/solidity-challenges/blob/main/src/solidity/challenge-01/README.md) | [passandscore](https://github.com/passandscore) |

## 🚀 Installation

1. Clone the repository.
2. Install [Foundry](https://book.getfoundry.sh/getting-started/installation).
3. Run `forge build` to set up the project.

## 🤔 Usage

Each challenge includes:

- A README file in `src///README.md`.
- Contracts in `src///`.
- A [Foundry test](https://book.getfoundry.sh/forge/tests) in `test///.t.sol`.

To solve a challenge:

1. Review the README file.
2. Uncover issues in the provided contracts.
3. Provide your solution in the test file.
4. Test your solution with `forge test --mp test///.t.sol`.

### Rules

- Follow the rules and constraints outlined in the challenge's README and test file.

## 📄 Contributor Guidelines

1. **Add an Exploit Challenge**:

- Create a new folder under `src/exploits/` and `test/exploits/` named ``.
- Add your challenge's smart contracts in `src/exploits//`.
- Create a `README.md` file in `src/exploits//` detailing the challenge and constraints.
- Write a corresponding Foundry test in `test/exploits//`.

2. **Add a Solidity Challenge**:

- Create a new folder under `src/solidity/` and `test/solidity/` named ``.
- Add your challenge's smart contracts in `src/solidity//`.
- Create a `README.md` file in `src/solidity//` detailing the challenge and constraints.
- Write a corresponding Foundry test in `test/solidity//`.

3. **Submit a Solution**:

- Drop your solutions in the discussion section of the challenge.

4. **Improve Existing Challenges**:

- Fork the repository and create a new branch.
- Make improvements or fixes to the existing challenges.
- Submit a pull request with details about the changes.

5. **Review and Discuss**:
- Participate in discussions and provide feedback on pull requests.
- Engage with the community to help refine challenges and solutions.

## 🧰 Troubleshooting

For help, visit the [Discussions](https://github.com/passandscore/solidity-challenges/discussions) section.

## 🚨 Disclaimer

This repository contains intentionally vulnerable code for educational purposes. **DO NOT USE IN PRODUCTION.**