# Pactum: Paid when the work is done

> A guarded state machine (Created→Funded→Completed + Disputed + deadline reclaim) with access control and CEI - 18 Foundry tests incl. fuzz cover the full lifecycle. Demo-mode tracker frontend.

Pactum is an escrow smart contract modelled as an explicit, guarded state machine that moves a job from Created through Funded to Completed, with dispute and deadline-reclaim paths. Its strength is the disciplined design: access control on every transition and the checks-effects-interactions pattern throughout, with 18 Foundry tests including fuzzing that exercise the full lifecycle. It is a from-scratch Solidity build with a demo-mode tracker frontend that you can download and run locally.

## About the app

Solidity state machines

## What to take away

- A guarded state machine (Created→Funded→Completed + Disputed + deadline reclaim) with access control and CEI - 18 Foundry tests incl. fuzz cover the full lifecycle. Demo-mode tracker frontend.
- Download: Pactum (ZIP)

## Tags

Free software, Pactum

## Read the full write-up

/downloads/pactum.zip

## Terms used in this piece

- https://dfieldsolutions.com/en/glossary/solidity.md
- https://dfieldsolutions.com/en/glossary/foundry.md
- https://dfieldsolutions.com/en/glossary/smart-contract.md
- https://dfieldsolutions.com/en/glossary/fuzz.md

## We build this for clients

https://dfieldsolutions.com/en/services/full-stack

## More from the lab

- https://dfieldsolutions.com/en/lab/sylex.md — Sylex: Make sense of the slashes
- https://dfieldsolutions.com/en/lab/kindra.md — Kindra: Miss a beat, not the rhythm
- https://dfieldsolutions.com/en/lab/voxara.md — Voxara: Argue better. Lose gracefully
- https://dfieldsolutions.com/en/lab/wraithward.md — Wraithward: Spot the bait before you bite

---

Source: https://dfieldsolutions.com/en/lab/pactum
DField Solutions — Torony köz 5-1.a, 2120 Dunakeszi, Hungary — +36 20 722 0002 — dezso@dfieldsolutions.com
Booking: see https://dfieldsolutions.com/en/contact
