README.md

September 12, 2024 ยท View on GitHub

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

TypeChallengeAuthorDiscussion
ExploitAirdropPutraLaksmanaView
SolidityCorrect writeMyDatavicsnetView


๐Ÿšจ Exploit Challenges

#ChallengeAuthor
16Weighted VotingZCalz
15Successionpassandscore
14AirdropPutraLaksmana
13Instigatorpassandscore
12Private Treasurepassandscore
11Sidelinepassandscore
10Combination Lockpassandscore
9Mimicpassandscore
8Lucky Spinpassandscore
7False Startpassandscore
6ERC20 Vault ExploitIzuMan
5Sherwood BankIzuMan
4StealX_Drained
3Auctionscadamsuab
2Gridlockpassandscore
1Etherstorepassandscore


๐Ÿšจ Solidity Challenges

#ChallengeAuthor
6Users reporting incorrect game count passandscore
5Correct writeMyDatavicsnet
4Update userOperation passandscore
3Parse the given bytes to return both the function selector and datapassandscore
2Ensure secure randomness in this lottery contractcodyrhoten
1The test should revert when attempting to mint as an unauthorized userpassandscore


๐Ÿš€ Installation

  1. Clone the repository.
  2. Install Foundry.
  3. Run forge build to set up the project.

๐Ÿค” Usage

Each challenge includes:

  • A README file in src/<challenge-type>/<challenge-name>/README.md.
  • Contracts in src/<challenge-type>/<challenge-name>/.
  • A Foundry test in test/<challenge-type>/<challenge-name>/<ChallengeName>.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/<challenge-type>/<challenge-name>/<ChallengeName>.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 <challenge-name>.
    • Add your challenge's smart contracts in src/exploits/<challenge-name>/.
    • Create a README.md file in src/exploits/<challenge-name>/ detailing the challenge and constraints.
    • Write a corresponding Foundry test in test/exploits/<challenge-name>/.
  2. Add a Solidity Challenge:

    • Create a new folder under src/solidity/ and test/solidity/ named <challenge-name>.
    • Add your challenge's smart contracts in src/solidity/<challenge-name>/.
    • Create a README.md file in src/solidity/<challenge-name>/ detailing the challenge and constraints.
    • Write a corresponding Foundry test in test/solidity/<challenge-name>/.
  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 section.

๐Ÿšจ Disclaimer

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