Issue

Some open source projects are not getting enough traffic and not enough contributors to work on the issues. In fact a bunch of open source projects are getting archived and shut down due to lack of contributors. Companies also often hire developers to work on open source projects, and they reason they do this despite it being an open source project is to have a consistent development team that has a strong motivation to work on the project.

Solution

Create a platform to allow open source maintainers create bounties for their issues and add (perhaps) monetary rewards to completing these issues. Once a user has created a PR and it has been merged, the contract is completed and the funds are transferred. An additional benefit of this solution is that it is no longer limited to one platform, it can technically span Github and Gitlab and other git instances.

Implementation

Frontend: The frontend is composed of the following pages. First, we have a register/login page where the user connect to their Github account. Second, we have a dashboard for maintainers and contributor. Maintainers can browse their own Github issues and convert them into bounties. Contributors can browse for open issues and solve them and claim rewards. We also have onboarding pages that contain instructions of the workflow for both maintainers and contributors.

Backend: GIT3OUNTIES also makes use of a centralized backend in order to communicate with Github on events that occur in the repositories, such as opening an issue or merging a PR. The backend is written in Rust using the Axum web framework, and is backed by SurrealDB. GIT3OUNTIES is installable as a Github app, giving it access to select repositories and issues.

Smart Contract: In Git3ounties, each Github issue is associated with an ERC6551 NFT. We built a custom ERC6551 account implementation called GitbountiesImplementation.sol and an ERC721 contract called GitbountiesNFT.sol. The implementation contract implements the onERC721Received and onERC1155Received functions to reject any ERC721 OR ERC1155 tokens other than the Gitbounties NFT associated with the account. When an issue is created, an ERC721 GitbountiesNFT is minted by the issue maintainer and the backend wallet is approved to control the token. The issue maintainer are allowed to cancel the issue and get the bounties back by burning the NFT. The burn function inside the GitbountiesNFT.sol sends the NFT to its own address, upon receiving (onReceivingERC721), its balance are sent to the address that burn the NFT. When a pull request is detected closed, the backend wallet will automatically transfer the issue token to the user who solves the issue by calling transferToken function in GitbountiesNFT.sol, and then burn the NFT to dump the bounties to the user's wallet. Moreover, the issue maintainer can add or reduce bounties associated with the issue by calling the addEth function inside GitbountiesNFT.sol or invoking the executeCall function inside GitbountiesImplementation.sol to remove partial bounties from the NFT back to the maintainer's wallet. The contracts were written in Solidity 0.8.19 using Forge. Both contracts have been deployed and verified on XDC's Apothem Testnet.

Built With

Share this project:

Updates