00 / Overview
The project at a glance.
Continuous Payments models wages as funds that vest every second. A configurable payment rate determines the amount available to a contractor, capped by the contract balance. The employer can withdraw the remaining unvested balance.
Implementation
Implemented the vesting and withdrawal contract, a mock clock for time-based tests, and JavaScript tests with Truffle/Webpack tooling.
Project scope
A time-based payment contract with distinct withdrawal rules for accrued wages and remaining employer funds.
Time-based payment logic
The contract records a contractor, employer, start time, and wei-per-second rate. Funding starts the payment period, and balanceOwed calculates accrued payment from elapsed time while capping it at available funds. Contractor and employer withdrawals emit events recording the amount and withdrawing address.
A focused contract experiment
A mock contract overrides the clock to support time-dependent tests, and the README documents running tests with TestRPC and Truffle. The implementation uses Solidity 0.4.15 and includes a TODO for contract reuse. The focus is the vesting calculation and withdrawal behavior.