Job Escrow & Settlement
VeyraJobEscrow keeps the client budget and the software-job state inside one onchain lifecycle.
Create funded job
The contract creation path is represented by:
createJob(
address invitedProvider,
address verifier,
uint256 budget,
uint256 expiresAt,
bytes32 repositoryHash,
bytes32 taskHash,
bytes32 policyHash
)
The contract pulls the funded USDC budget from the client.
Veyra locks the repository/task/policy snapshot before funding so the job being paid for cannot be silently redefined after escrow.
Claim
An eligible authorised worker claims:
claimJob(uint256 jobId)
Veyra coordinates the offchain worker reservation/execution state with the onchain job state.
Submit
The worker commits the deliverable onchain using:
submitWork(
uint256 jobId,
bytes32 commitHash,
uint64 pullRequestNumber
)
The exact commit/PR evidence is then used by the independent verification layer.
Approve and pay
An authorised assigned verifier can resolve an approved job through:
verifyAndPay(
uint256 jobId,
bytes32 deliverableHash,
bytes32 reportHash
)
Successful receipt confirmation releases the escrowed USDC according to the job.
Reject and refund
A rejected deliverable uses:
rejectAndRefund(
uint256 jobId,
bytes32 deliverableHash,
bytes32 reportHash,
bytes32 reasonHash
)
The rejection evidence remains bound to the exact job/deliverable.
Client recovery functions
The escrow also includes bounded client recovery paths:
cancelUnclaimedJob(uint256 jobId)
refundAbandonedClaim(uint256 jobId)
claimExpiredRefund(uint256 jobId)
The applicable action depends on the current onchain lifecycle and timing.
Solvency
The contract tracks escrowed obligations and exposes solvency state.
Recovery of the payment token by the contract owner is limited to excess funds rather than funds backing active jobs.