This repository offers a suite of smart contracts designed to facilitate multi-token reward distribution across various DeFi scenarios. Developed using Foundry, these contracts are open-source and intended as a public good to benefit the broader blockchain community.
Important: These contracts have not undergone formal security audits. They are provided "as-is" without any warranties or guarantees. The author assumes no responsibility for any issues, losses, or damages arising from the use of this code. Users are advised to conduct their own thorough testing and audits before deploying these contracts in a production environment.
- MasterChefRewarder: Integrates with MasterChef to provide multi-token rewards for liquidity providers.
- ChefIncentivesRewarder: Extends ChefIncentivesController, rewarding users holding aTokens or LP tokens.
- StandaloneRewarder: Enables direct token staking and rewards without external dependencies.
- StandaloneRewarderModern: A modernized version of StandaloneRewarder that uses solidity 0.8 with custom errors, modern libraries like SafeERC20, Ownable2Step, and removal of SafeMath.
Each directory includes a README.md file with detailed information on the contract's purpose, implementation instructions, and usage examples.
Ensure Foundry is installed. If not, follow the instructions at Foundry's official site.
-
Clone the repository:
git clone https://github.com/gas-limit/MultiRewardsChef.git cd MultiRewardsChef
-
Install dependencies:
forge install
Compile the contracts:
forge build
Execute the test suite:
forge test
Contributions are welcome. To contribute:
- Fork the repository.
- Create a new branch:
git checkout -b feature-name
- Commit your changes:
git commit -m "Description of changes"
- Push the branch:
git push origin feature-name
- Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
This project is released as a public good to support and enhance the DeFi ecosystem. For questions or support, please open an issue on GitHub.