# Overview

An on-chain ETH payroll system where employers prefund a contract and workers claim their earnings at any time, no intermediaries, no scheduled pushes.

***

## What it is

StreamWage Payroll is a smart contract that replaces the traditional employer-to-employee payment flow. Instead of an employer manually sending payments on a schedule, they deposit ETH into a contract upfront. Workers then accrue pay continuously over time and withdraw whenever they choose.

The contract supports four payment timelines: hourly, monthly, custom interval, and operator-triggered grants, This gives employers flexibility in how different workers are compensated.

***

## The problem it solves

Traditional payroll relies on a trusted employer to send payments on time. That trust introduces delays, dependency on banking rails, and geographic friction. StreamWage removes that dependency: once a worker is registered and the treasury is funded, their earnings accrue automatically. No one can withhold or delay what is already on-chain.

*<mark style="color:blue;">Workers do not need permission to claim. As long as the treasury has funds, they can pull their earned balance at any time.</mark>*

***

## Core design principles

↓\
Pull-based claims

Workers initiate withdrawals. The contract never pushes funds unprompted.

⏱\
Continuous accrual

Earnings accumulate in real time, including partial intervals. No time is ever lost.

⬡\
Prefunded treasury

ETH is deposited upfront. Workers can trust the funds are already there.

◎\
Multi-worker

Each instance supports unlimited workers with independent rates and timelines.

***

## What's in the system

The system is made up of two contracts:

`StreamWagePayroll` : the core logic contract. Handles workers, accrual, claims, treasury management, term negotiation, and address migration.

`StreamWagePayrollFactory` : deploys isolated payroll instances using a beacon proxy pattern, so each customer gets their own contract with shared upgradeability.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://alameen.gitbook.io/streamwage/overview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
