EIPs Explained

ERC-7750 · Review · ERC · 2024-08-04

ERC-7750: Decentralized Employment System

Proposes a standard contract interface for on-chain employment: company registration, soulbound employee tokens, labor contracts with salary escrow, disputes and reviews.

What problem does it solve?

Employment records, contracts and payment guarantees normally live in private, centralized systems. The authors of ERC-7750 argue that putting the employment lifecycle on-chain would make records verifiable and tamper-resistant, and make salary payment conditional on contract terms rather than on trust.

The proposal defines one interface, IDecentralizedEmploymentSystem, so that tools built for one implementation work with others.

How it works

The interface groups functions by lifecycle stage:

Stage Functions Notes
Company registerCompany, getCompany Caller becomes the company owner
Employee mintEmployeeToken, getEmploymentHistory Employee is represented by a non-transferable (soulbound) token; details live off-chain at a metadataURI
Contract createContract, executeContract Salary, duration (in months), responsibilities and termination conditions; becomes active once both parties confirm
Payment depositSalary (payable), releaseSalary Company funds an escrow; salary is released per the schedule or at completion
Dispute raiseDispute, resolveDispute Either party can raise; an assigned moderator decides for or against the employee, which moves the escrow
Termination terminateContract Company ends the contract with a stated reason
Reviews submitReview, getReviews Both sides can leave a rating and comment per contract

Each step emits an event (CompanyRegistered, ContractCreated, SalaryDeposited, DisputeResolved, and so on). Employment history is the list of contract IDs attached to the employee token and is publicly readable.

Sample code

Typical flow from a company's point of view (ethers v6, against any implementation of the interface):

import { Contract, parseEther } from "ethers";

const des = new Contract(DES_ADDRESS, [
  "function registerCompany(string,string) returns (uint256)",
  "function createContract(uint256,uint256,uint256,uint256,string,string) returns (uint256)",
  "function executeContract(uint256)",
  "function depositSalary(uint256) payable",
  "function getEmploymentHistory(uint256) view returns (uint256[])",
], companySigner);

const companyId = await des.registerCompany.staticCall("Example Co", "Software");
await (await des.registerCompany("Example Co", "Software")).wait();

const salary = parseEther("1");
const contractId = await des.createContract.staticCall(
  companyId, employeeTokenId, salary, 6, "Backend development", "Per agreement",
);
await (await des.createContract(companyId, employeeTokenId, salary, 6,
  "Backend development", "Per agreement")).wait();

await (await des.executeContract(contractId)).wait();          // employee confirms too
await (await des.depositSalary(contractId, { value: salary })).wait();

Things to know

  • Status: Review. The interface may still change, and it leaves important details to implementers: how moderators are chosen, how payment schedules work, and whether salaries are paid in ETH or ERC-20 tokens.
  • Everything written to a public chain is permanent and visible to anyone. Contract terms, termination reasons and review comments stored on-chain cannot be deleted. Keep personal data off-chain and consider privacy and employment law before deploying anything like this; get legal review.
  • Soulbound tokens follow the same idea as ERC-5192: the token cannot be transferred, so the record stays tied to one address. Losing that key means losing control of the record.
  • The spec flags review fraud and moderator trust as open risks; only reviews tied to real, completed contracts should count.

#employment #soulbound #escrow #reputation #erc

Details

Authors
James Savechives (@jamesavechives) <[email protected]>
Status
Review
Type
Standards Track / ERC
Created
2024-08-04

Machine-readable: Markdown · JSON