Skip to content

MIT-Bitcoin-2024/lightning-bounty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

alt text

GitHub Lightning Bounties ⚡️

Welcome to the GitHub Lightning Bounties. Lightning Bounty is a groundbreaking project that revolutionizes code collaboration and incentivizes software developers using the power of Bitcoin. By integrating with GitHub Actions, Lightning Bounties automatically pays code contributors in Bitcoin for their valuable contributions to open-source projects.

alt text

Hackathon Details 🚀

Name: MIT Bitcoin Hackathon: Scaling Up
Dates: April 19th-21st, 2024
Venue: MIT / Online

About the Project 📝

We aim to integrate LLMs for analyzing incoming pull requests (PRs) on GitHub. This will cater to various aspects such as security analysis, code quality, and completeness checks. We recognize that LLM API calls have a cost associated, which can escalate with spam PRs. Our solution is a system that employs the Bitcoin Lightning Network to require a small payment for each PR review, thereby filtering spam and covering API costs.

We also believe in rewarding contributors. Hence, payments can be refunded if PRs are accepted, with potential bonuses for merged contributions.

Architecture Overview 🏗️

alt text

Stack and Tools 🛠️

  • GitHub Actions: Utilize Python and Node.js scripts.
  • LNBits / LND: Basic Lightning node setup.
  • Lime-Green: A Python package for LLM evaluations.
  • Bring Your Own Setup: Open to additional tools and libraries.

projects gif Team Members projects gif

Enrique Gamboa Will Sutton Pavel Kononov Alex Gill Mike Abramo
Enrique Gamboa Will Sutton Pavel Kononov Alex Gill Mike Abramo
GitHub GitHub GitHub GitHub GitHub

Key Features

  • Automatic Payments: Contributors receive Bitcoin payments automatically upon merging their pull requests.
  • Enhanced Collaboration: Encourages collaboration and fosters a sense of community among developers.
  • Secure Transactions: Built-in security measures ensure safe and secure Bitcoin transactions.
  • Anti-Spam Mechanism: Contributors are required to submit a small fee to a Lightning Network wallet, preventing spam and ensuring genuine contributions.

What's next for Lightning Bounties?

Customizable Bounty Payouts: Looking ahead, we aim to give project owners and managers greater control over the bounty payouts on the Lightning Bounty platform. This will allow them to customize the reward amounts based on factors like code quality, complexity, and overall impact of the contributions.

Broader Language Support: While we initially built Lightning Bounty with English and Spanish, we're eager to make our platform as globally accessible as possible. Open source development is a collaborative effort that knows no borders. Contributors from all corners of the world should feel empowered to participate regardless of their native tongue. By increasing language availability, we hope to lower barriers to entry and cultivate an even more diverse pool of talent.

Rewarding Code Contributions with NFTs: Recognizing the potential of non-fungible tokens (NFTs) to serve as digital badges of honor, we aim to integrate an NFT rewards system into the Lightning Bounty platform. This will allow open-source developers who contribute high-quality code to receive free, unique NFTs that they can showcase as proof of their valuable work. By tying these NFTs to specific code contributions, we can create a new level of recognition and ownership for developers within the open-source ecosystem.

Expanding Cryptocurrency Payment Options To further empower open-source developers and increase the accessibility of the Lightning Bounty platform, we plan to integrate support for a wider range of cryptocurrency payment options beyond just Bitcoin. This will include integrating Ethereum, Polygon, & Solana.

💥Other Goodies 💥

Hackathon Winner
Hackathon Winner
Video Preview Vimeo Logo

Presentation
Pitch Deck Pitch Deck
Pitch Deck
Blueprint PDF Blueprint

🧪 How to Test 👨‍🔬

  1. Fork the Repository and Clone it

    • Fork the repository on GitHub.
    • Clone the forked repository to your local machine.
  2. Modify the Code

    • Open the src/main.py file and make the desired changes to reflect your modifications.
  3. Generate a Lightning Invoice

    • Generate a lightning invoice for the payment.
    • Copy the invoice string into the reward.txt file.
  4. Commit and Submit a Pull Request

    • Add and commit your changes to the local repository.
    • Submit a pull request to the base repository.
  5. Pay the Invoice

    • A GitHub action will be triggered to request a "dust" payment from you (the contributor) to the base repository (the owner).
    • Choose the action that says "Please pay the invoice: lnbc10n1..." (not the one that says "Extracted values:...").
    • Wait for the payment confirmation.
    • Once the payment is confirmed, you'll receive a message saying "Thank you for your payment!"
  6. Request a Reviewer

    • Ask for a reviewer to review your pull request.
    • Choose either Enrique or Will for this test.
  7. Review and Analysis

    • After a few seconds, a new action will run.
    • It will first say "Payment has been received, sit tight, running openai query."
    • Approximately 30 seconds later, it will return with a summary of your changes and a security vulnerability analysis.
  8. Merging the Pull Request

    • We'll keep an eye out for your pull request and attempt to merge it for you. As a contributor, you don't have the power to merge it yourself.

Alternatively: If you prefer to replicate our work in your own repository:

  • Copy the contents of the .github/ directory into your repository.

  • Modify the main.py file accordingly.

  • Set up the following secrets in your repository settings:

    • OPENAI_API_KEY
    • PAY_INVOICE_KEY (admin key for LNBits)
    • WALLET_API_KEY (invoice/read key for LNBits)
    • WALLET_BASE_URL (URL for your LNBits instance)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages