← Back to home

paypr

Streamline open source contributions with automatic PYUSD payments for merged pull requests.

Problem Statement

Paypr is a trustless blockchain automation system that automatically pays developers with PYUSD when their GitHub pull requests get merged, without needing any manual intervention, payment processing, or trust in third parties.Think of it like this: You maintain an open source project and want to pay contributors for quality code, but manually sending payments is tedious, expensive, and error-prone. With Paypr, you deposit PYUSD funds once, and the system automatically pays any developer whose pull request gets merged guaranteed by smart contracts and blockchain technology.Here's how it works in simple terms:For Project Maintainers:Register your GitHub repository (like "facebook/react") with a bounty amount (e.g., 1 PYUSD per PR)Deposit PYUSD funds to your repository's smart contract walletSet up a GitHub webhook pointing to PayprEvery time you merge a PR, the contributor automatically gets paidFor Developers:Register your GitHub username with your wallet address onceStart contributing to any Paypr-enabled repositoryWhen maintainers merge your PRs, you instantly receive PYUSD paymentsTrack all your earnings on the real-time analytics dashboardThe magic happens automatically:GitHub sends a webhook when a PR gets mergedPaypr backend validates the merge and calls the smart contractSmart contract transfers PYUSD from repository funds to developer walletThe Graph Protocol indexes everything for transparent analyticsIf something goes wrong, funds stay safe in the smart contractThe magic is that this all happens without anyone being able to cheat - payments are guaranteed by mathematics, smart contracts, and blockchain technology.What makes this special:Completely trustless - No company or intermediary can steal repository funds or block paymentsUltra-fast - Payments happen within minutes of PR merge, not weeks of manual processingReal USD value - Uses PYUSD (PayPal USD) stablecoin, so no crypto volatility concernsFull transparency - All payments, earnings, and repository funds are visible on The Graph analyticsGitHub native - Works seamlessly with existing GitHub workflows via webhooksBattle-tested stack - Built on proven technologies: Arbitrum, The Graph, and PYUSDZero maintenance - Once set up, runs completely automatically with no ongoing management neededThis transforms open source development by creating immediate financial incentives for quality contributions, while removing all the friction and trust issues of manual payment systems.Repository maintainers can focus on code review instead of payment processing, and developers get fair compensation without having to chase down payments or trust project treasuries.

Solution

Technology StackSmart Contract Layer: I wrote the core contract in Solidity and deployed on Arbitrum Sepolia for its reliable PYUSD support and low gas fees. The testnet environment was stable and well-documented, making development smoother.Backend Infrastructure: Built a Node.js server that listens for GitHub webhooks. When someone merges a PR, GitHub pings my server, I validate everything, then trigger the smart contract to send payment. Deployed on Railway for quick hosting with Git integration since I didn't want to mess with Docker during crunch time.Frontend Application: Next.js felt like the right choice for rapid development. Added Apollo Client to handle all the blockchain data queries. Spent way too much time on the gradient backgrounds and glass effects, but it looks clean.Blockchain Analytics: The Graph was a lifesaver here. Instead of building my own event indexing system, I just deployed a subgraph and got real-time GraphQL APIs for free. Their AssemblyScript mapping took some getting used to though.How It All Connects: The flow is pretty straightforward: someone merges a PR, GitHub fires a webhook to my backend, I check if the repo and developer are registered, call the smart contract, PYUSD moves automatically, The Graph picks up the event, and the frontend updates.I split data storage between what needs to be permanent (payments on blockchain via The Graph) and what can be temporary (registration data in memory). It's not enterprise-grade, but it works perfectly for the hackathon.Web3 Tech That Saved Me ;-)Arbitrum Sepolia provided reliable PYUSD support with low gas fees, making it perfect for testing payment flows without worrying about transaction costs.The Graph eliminated so much backend complexity. I was originally planning to write my own event listener and database, but their subgraph handled everything. The GraphQL integration with Apollo was seamless.The Messy Parts: String Encoding Hell - The Graph kept returning garbage characters instead of readable repo names and usernames. Spent hours debugging before writing a hacky decode function that just shows friendly placeholders like "Repository Name" when it can't parse the data.Dual Registration Dance - I register everything twice: once in my backend memory for fast API responses, and once on-chain for payment validation. It's redundant but necessary because the contract needs on-chain proof while my UI needs snappy responses.Security Without Paranoia - Added webhook signature verification so random people can't trigger fake payments, but kept it simple with HMAC. The smart contract only accepts calls from my backend wallet anyway. Speed Over PerfectionI made deliberate shortcuts to ship fast. In-memory storage instead of a real database. Manual deployments instead of CI/CD. Hardcoded network configs. Console.log debugging everywhere. These would be problems in production but were perfect for proving the concept works.The development loop was tight: frontend hot reload, backend auto-restart, ngrok for instant webhook testing. I could test end-to-end flows in minutes.What Actually Matters: I chose Arbitrum because of its reliable PYUSD support and low fees. The Graph because writing event indexing from scratch would have killed my timeline. In-memory storage because registration data isn't as critical as payment data, and the blockchain is my source of truth anyway.The end result surprised me - I actually built something that processes real money automatically when code gets merged. No manual approvals, no waiting, no "oops I forgot to pay." Just working software that makes payments as automatic as CI/CD.

Hackathon

ETHGlobal New Delhi

2025

Contributors