hackquest logo

GainJar

GainJar is a decentralized payroll streaming protocol that transforms salary from a monthly event into a continuous, real-time stream on the blockchain. Employees earn second by second and

Videos

Project image 1
Project image 2
Project image 3
Project image 4

Tech Stack

Next
Solidity

Description

GainJar reimagines payroll infrastructure for the modern, global workforce. Instead of receiving a lump-sum salary once a month, employees on GainJar earn their wages continuously streamed directly to their wallet every second via a smart contract on Arbitrum.

The protocol introduces two core stream types. The Infinite Stream is designed for full-time employees and long-term DAO contributors, where salary flows indefinitely based on an hourly or monthly rate and can be updated or paused by the employer at any time. The Finite Stream is designed for freelancers, consultants, and project-based contractors, where a fixed total amount is streamed over a predetermined duration and closes automatically upon completion.

At the core of GainJar is the Employer Vault System a secure USDC vault that funds all active streams. The protocol continuously monitors vault health across four status levels: Healthy, Warning, Critical, and Emergency, based on how many days of runway remain. This real-time classification ensures full transparency for both parties.

To protect employees from employer default, GainJar includes a permissionless liquidation mechanism. When a vault reaches Critical or Emergency status, any external party can trigger liquidation. Upon execution, all earned employee wages are paid out immediately, active streams are paused, and the liquidator receives a reward between $1 and $50 USDC as an incentive. Employees are always prioritized the protocol guarantees their payment before any reward is distributed.

GainJar is fully open source, deployed on Arbitrum Sepolia, and built with Solidity using the Foundry framework. It uses OpenZeppelin libraries for security, including ReentrancyGuard on all withdrawal functions, access control via Ownable, and integer overflow protection through Solidity 0.8.0.

Progress During Hackathon

During this hackathon, we designed and built GainJar from the ground up — from protocol architecture to a fully functional frontend.

On the smart contract side, we designed and implemented the full GainJar protocol in Solidity, including the dual stream type system (Infinite and Finite), the employer vault with deposit and withdrawal logic, the real-time vault health classification system across four status levels, and the permissionless liquidation mechanism with dynamic reward calculation. We wrote a comprehensive test suite using Foundry covering unit tests for all core functions including stream creation, withdrawal, vault health checks, and liquidation scenarios.

On the frontend side, we built a complete employer dashboard that allows vault deposits, stream creation for both stream types, employee list management, and real-time vault health monitoring. We also built an employee-facing dashboard where workers can view their active stream details, track earnings in real time, and execute full or partial withdrawals at any moment.

The protocol is deployed on Arbitrum Sepolia and has been tested end-to-end with live transactions. A full product demo video has been recorded demonstrating the complete employer and employee flow.

Fundraising Status

GainJar is not currently fundraising. This project was built independently during the hackathon as an open source protocol contribution to the DeFi and Web3 payroll infrastructure space. We are open to conversations with ecosystems, DAOs, or protocols interested in integrating or building on top of GainJar as a payroll primitive.

Team Leader
Rraihanmd
Project Link
Sector
DeFi