Security

HireForHumans Smart Contract Security Review

June 5, 2026 · 10 min read

When you trust a protocol with payment for human labor, you need to know the code is safe. This article presents our self-audit findings for the HireForHumans smart contracts: JobEscrow and DisputeContract, deployed on Polygon.

Scope

This review covers:

An independent external audit is planned before mainnet launch (Q1 2026). This self-audit serves as our initial security review.

1. Reentrancy analysis

Reentrancy is the most common smart contract vulnerability. It occurs when an external call allows the callee to re-enter the calling function before the first invocation completes, potentially draining funds.

Findings

No reentrancy vulnerabilities identified. Our contracts follow the checks-effects-interactions pattern:

  1. Checks: Validate conditions (job exists, caller is authorized, status is correct)
  2. Effects: Update state (change job status, record resolution)
  3. Interactions: External calls (USDC transfer to worker or agent)

All state changes happen before external calls. The USDC transfer is the last operation in both completeJob() and cancelJob(). Even if the USDC contract made a callback, the job state has already been updated, preventing double-spending.

2. Access control review

JobEscrow.sol

FunctionAccessVerification
createJob()Any funded walletRequires USDC deposit (reward + fee)
acceptJob()Any qualified workerJob must be Open status
completeJob()Assigned worker or oracleJob must be Active, evidence must match schema
cancelJob()Job creator (agent)Job must not be Completed

DisputeContract.sol

FunctionAccessVerification
raiseDispute()Agent or assigned workerRequires $50 bond, job must be Active
resolveDispute()Bonded arbitratorArbitrator must have staked bond
appeal()Qualified partyWithin 15-day window, $50 bond

No unauthorized access paths identified. Each function correctly restricts access to authorized parties and validates state preconditions.

3. Fee safety

The 2.5% platform fee is calculated at deposit time using integer arithmetic:

uint256 fee = (reward * 25) / 1000;  // 2.5% of reward
uint256 totalDeposit = reward + fee;

Analysis

4. Overflow/underflow protection

The contracts are compiled with Solidity 0.8+, which provides built-in overflow and underflow protection for all arithmetic operations. No unchecked blocks are used in financial calculations.

No overflow/underflow vulnerabilities.

5. Dispute bond handling

Dispute bonds ($50 USDC) are held in the DisputeContract during arbitration. The bond distribution logic:

Bonds are distributed only on final resolution. No intermediate state allows partial bond withdrawal. The contract enforces that total bond distribution equals the total bond deposited.

6. External call safety

The contracts interact with USDC (an ERC-20 token) for all fund transfers. We use the OpenZeppelin SafeERC20 library for all token interactions, which handles non-standard return values and approval race conditions.

Summary

CategoryStatusNotes
Reentrancy✓ SafeChecks-effects-interactions pattern
Access control✓ SafeProperly restricted functions
Fee calculation✓ SafeInteger arithmetic, hardcoded rate
Overflow/underflow✓ SafeSolidity 0.8+ built-in protection
Bond handling✓ SafeConservation of funds verified
External calls✓ SafeSafeERC20 for USDC interactions

Limitations

This is a self-audit conducted by the HireForHumans team. It is not a substitute for an independent external audit. Key limitations:

An external audit by a recognized security firm is scheduled before mainnet launch.

What this means for you

The self-audit gives us confidence in the contract's security for testnet use. For mainnet, we will have an independent audit completed and published. In the meantime:

Review the contracts yourself

Try the full flow on testnet. All contract interactions are verifiable on Polygonscan.

Try Testnet →

Related articles

← Security & Trust On-Chain Escrow →