WorkChain.io payments are fully decentralized. The architecture around payments can be seen in the top part of the above diagram. Work Validators release funds when an employee clocks out or completes a task. Alternatively, time schedules can release funds continuously to salaried employees who don’t clock in. Both the security and operation of payments are guaranteed by the public blockchain. All rules around payments are governed by smart contracts. All financial transactions are pseudonymous and can’t be used to personally identify the parties involved. The decentralized part of the system is designed for privacy and conforms to all major data protection legislation, including GDPR.
WorkChain.io currently integrates with Humanity and WorkPuls. Together these two HR systems service more than one million employees. Because employee funds get released in small increments, this creates a large number of financial transactions compared to traditional monthly or bi-weekly pay cycles.
Larger transaction volumes mean higher transaction costs. This cost is partly mitigated by the blockchain which has much lower transaction fees when compared to banks. Even so, Ethereum transactions are still fairly expensive if you make a lot of them. The blockchain community is working on lowering these costs through new consensus algorithms like proof-of-stake. Some public blockchains like EOS have already implemented delegated proof of stake and promise to keep transactions free of charge to end users. As of today these technologies still need to mature and gain mass adoption before they become suitable for something as wide-reaching as payroll.
The best way to use today’s technology to mitigate the transaction costs associated with frequent payments is through the use of payment channels. Our implementation of payment channels is highly optimized for payroll transactions and we call the resulting system Payroll Channels.
Payroll Channels allow us to issue signed payment authorizations off-chain. These authorizations are between the employer and employee and therefore incur no transaction fees. The employee only pays one transaction fee at the point when they cash in the authorizations to receive their earnings. And because authorizations are processed cumulatively like this, the employee only pays for one transaction for the entire collected amount. The process is made transparent to end users by the custom wallet which collects authorizations and allows them to withdraw the total.
The payroll contract verifies the authorization signature and ensures that no authorizations with the same nonce have already been cashed. If the signature and nonce checkout then the authorization amount is paid out to the employee.
Payroll Channels are best explained using a check analogy. Imagine instead of issuing someone a check for just the latest shift they worked, you issue them a new check for all uncashed amounts to date and ask them to return all their uncashed checks so you can destroy them, thus eliminating double spending. This also reduces the number of checks that need to be processed by the bank and therefore reduces the bank fees. The same is true for blockchain transactions.
This is what our payroll authorizations look like:
In this example the employee works for six days (shifts) and gets paid $40 per shift. At the end of each shift the employeessued a signed authorization which allows the withdrawal of the accumulated pay to date. The employee can make the withdrawal after each shift and incur the transaction fee each time or wait until the end of the next shift or multiple shifts and withdraw the total accumulated earnings amount, paying only for a single transaction.
To prevent double spending the nonce is only incremented after a withdrawal. This guarantees that the employee can only ever cash one authorization per unique nonce. So once they have cashed the Nth authorization, they can’t submit authorization N-1 and double spend.
The interactions involved in a Payroll Channel are depicted in the following diagram.
All personal information about employers and employees is secured by the centralized part of WorkChain.io, the WorkChain API. The WorkChain API is a secure, centralized service operated by WorkChain Ltd that supports and makes use of decentralized payments much easier.
The information stored by the centralized WorkChain API includes the identities of the parties involved, their relationships, and their mapping to on-chain addresses (Employments). Other information stored by the centralized WorkChain API are invitations, work records and payment authorizations. Payment authorizations are a custom implementation of Payment Channels: the prefered way of making continuous micropayments fast and affordable on public blockchains like Ethereum. All payment authorizations are signed by digital signatures which guarantee non-repudiation.
There are three participant categories in the WorkChain.io Protocol that create the seamless end-to-end payroll process that happens in real-time:
Funds Providers — Employers and Lenders
They’re each involved in the work validation to payout flow in a particular way, as explained below.
Naturally, at the center of instant payroll are employees: the people who do the work and need to get paid. They must have a unique identity to which work records and payments can be linked. This requires them to create a workID, to which their hours, shifts or tasks are permanently linked.
Validators are systems that can provide information (proof) that someone has worked. This will primarily come in the form of the number of hours worked or attendance, as this is how the world typically works. However, with the increasing shift to objective and results-based work, validators will also be able to provide proof of work connected with an objective, task or result being completed.
Any type of time tracking or shift scheduling system can provide this time information, for example Humanity.com or WorkPuls.com.
For employees to get paid, there are two sources the money comes from: one, directly from employers; or, two, from lenders.
Option one is employers paying employees by running payroll through WorkChain.io directly. In this case, instead of paying traditional payroll processing fees and relying on banks for payments, they’ll simply stake tokens on the WorkChain.io platform to make cryptocurrency payouts. It will mean almost no cost to run payroll. In this scenario, onboarding employees to WorkChain.io will be mandatory.
If an employer isn’t using the WorkChain.io platform, this won’t prohibit employees getting paid instantly. When an employee does work for a non-registered employer, their pay will be advanced through lenders and later recouped when they get paid by their employer.
This will have higher cost for employees than if they are receiving money directly from their employees due to transaction fees. WorkChain.io will be the first lender on the platform and in future organizational and peer-to-peer lending will exist.