Skip to main content

Payrolls

What is a Payroll?

A payroll is a treasury-specific funding mechanism that can stream funds into a claiming bucket at a customizable rate. Funds can be added to a payroll by anyone, and treasuries can have multiple payrolls running simultaneously. Claims from a payroll can be targeted to an individual recipient or a specific group of users.

All treasuries are granted the worker payroll by default, which can be used to pay workers for performing valuable platform optimization. Think of the worker payroll as a community fund to pay for treasury-wide housekeeping.

Contributing to a Payroll

Any user can submit funds to any payroll. To do so, simply call the addfunds() action on the telos.decide contract.

ACTION addfunds

Parameter NameParameter TypeExample
fromnamecraig.tcd
treasury_symbolsymbol4,VOTE
quantityasset100.0000 TLOS

Customizing Pay Rate

A treasury manager can adjust the pay rate and pay periods for any payroll within their treasury. Fine tuning these settings allows payrolls to predictably incentivize labor for the given purpose of the payroll.

ACTION editpayrate

Parameter NameParameter TypeExample
treasury_symbolsymbol4,VOTE
period_lengthuint32_t86400
per_periodasset50.0000 TLOS

Table Breakdown

Table: payrolls

Scope: treasury_symbol

Field NameField TypeDescription
payroll_namename
payroll_fundsasset
period_lengthuint32_tLength of a pay period in seconds.
per_periodassetFunds released into claimable_pay per period.
last_claim_timetime_point_secLast time funds were claimed.
claimable_payassetFunds currently claimable.
payeenameAccount name or Group eligible to claim funds.