Skip to content

Security considerations ​

This page separates safeguards already present from safeguards that remain imperative before production use.

Implemented safeguards ​

  • client-only and freelancer-only modifiers;
  • explicit status checks;
  • a 10% maximum platform fee;
  • zero-address validation for the platform wallet, freelancer, and token;
  • checks-effects-interactions ordering in withdraw.

Production hardening ​

Harden ERC-20 interactions ​

The contract relies on a minimal IERC20 interface and expects boolean returns from transfer and transferFrom.

Production code should strongly consider OpenZeppelin SafeERC20 because ERC-20 implementations are not perfectly uniform.

Add automated tests ​

The current repository tree does not expose a dedicated automated test suite. Tests should cover every state transition, role violation, deadline boundary, fee calculation, token failure, withdrawal path, and multi-token case.

Review arbitrary-token assumptions ​

Any non-zero token address is accepted. The contract does not verify code existence or guard against fee-on-transfer, rebasing, or other non-standard token behavior.

Resolve the Delivered-state deadlock ​

Once deliverWork succeeds, the freelancer depends on the client to approve. There is no timeout or arbitration route from Delivered.

Documentation grounded in the current ERC-20 escrow implementation.