An on-chain registry for recurring commitments — and a public, verifiable record of who keeps their word.
Pactum lets any two parties register a real-world commitment on Stellar — a refund promise, an uptime guarantee, a milestone check-in, a recurring report — and tracks whether it was fulfilled on time, late, or broken. Every commitment becomes part of a public, queryable compliance history for the addresses involved.
Escrow contracts handle one-time deals — money goes in, money comes out once conditions are met. But a lot of real commitments aren't one-time payments at all:
- A landlord promising to return a deposit within 30 days of move-out
- An API provider guaranteeing 99.9% uptime this quarter
- A freelancer committing to weekly milestone updates
- A DAO grantee promising monthly progress reports
There's currently no simple, general-purpose way to record these kinds of ongoing promises on-chain, or to see — trustlessly — whether someone has a track record of actually keeping them.
Pactum is a lightweight registry, not a payment or custody system. It doesn't hold funds. It records who promised what to whom, by when — and whether they delivered.
create_commitment(issuer, counterparty, terms, due_at)
│
▼
┌──────────────────┐
│ Registry │ on-chain source of truth
│ Contract │ (Soroban, Rust)
└────────┬──────────┘
│ events
▼
┌──────────────────┐
│ Indexer │ watches events, aggregates
│ (backend) │ per-address compliance history
└────────┬──────────┘
│
▼
┌──────────────────┐
│ REST API │ GET /reputation/GABC...
│ + JS SDK │ → { fulfilled: 14, late: 2, breached: 1 }
└──────────────────┘
- Create — either party (or both) registers a commitment: what's promised, to whom, and the due date.
- Attest — when the due date arrives, the commitment is marked fulfilled, either by mutual confirmation, a designated oracle, or the counterparty's sign-off.
- Dispute — if the parties disagree on whether it was met, the commitment is flagged as disputed rather than silently resolved either way.
- Aggregate — the backend indexes every commitment's outcome into a per-address compliance history — a real record built from timestamped, on-chain events instead of subjective star ratings.
pactum/
├── contracts/registry/ # Soroban smart contract (Rust)
├── backend/ # REST API + on-chain event indexer (TypeScript)
├── sdk/js/ # Lightweight JS/TS SDK for dApp integration
├── docs/ # Architecture, contract & API reference, integration guide
└── examples/ # Minimal integration demo
See docs/architecture.md for the full breakdown.
| Layer | Technology |
|---|---|
| Smart contract | Rust + Soroban SDK |
| Contract network | Stellar Testnet |
| Backend API | Node.js + TypeScript + Express |
| Indexer | Soroban RPC event listener |
| Database | PostgreSQL |
| SDK | TypeScript, published as @pactum/sdk |
| Testing | Cargo test (contract) · Jest (backend) |
| CI/CD | GitHub Actions |
| Method | Kind | Description |
|---|---|---|
create_commitment(issuer, counterparty, terms_hash, due_at) |
write | Register a new commitment between two addresses |
attest(commitment_id, outcome) |
write | Mark a commitment fulfilled, late, or breached |
dispute(commitment_id, reason) |
write | Flag a commitment as contested rather than resolved |
resolve_dispute(commitment_id, outcome) |
write | Designated arbitrator/oracle settles a disputed commitment |
get_commitment(commitment_id) |
read | Fetch a single commitment's details and status |
get_reputation(address) |
read | Aggregate fulfilled / late / breached counts for an address |
Full spec lives in docs/contract-reference.md as the contract develops.
The contract is currently deployed on the Stellar Testnet for testing and integration.
| Contract | Network | Contract ID | Explorer |
|---|---|---|---|
| Registry | Testnet | CBADTVTJ6IN332HIKZ7LWUYMYTLPZYCEBV3X2HS47VHR5UDBHQ3GAA7E |
Stellar Expert |
- Initialize Contract:
2b9cc1afa24a3bc9a8412e045cc8c23b8d2fc3e83899ae7e3b7b8ba2b1a40552 - Create Commitment:
5cfdc977deb9c5e16be8127611dcbcd7df6a4d67706dec082eee464af1ae34fc - Attest Commitment:
6e73137635796cd1786c8a6feec8365c92751f514669a3b9a907e27420088890
Prerequisites: Rust + Cargo, soroban-cli, Node.js 18+, PostgreSQL
# 1. Clone
git clone https://github.com/<your-username>/pactum.git
cd pactum
# 2. Build & test the contract
cd contracts && cargo test
# 3. Set up the backend
cd ../backend
npm install
cp .env.example .env # fill in DATABASE_URL, SOROBAN_RPC_URL, etc.
npm run migrate:latest
npm run dev- Core registry contract — create / attest / dispute / resolve
- Per-address reputation aggregation
- Oracle-based auto-attestation for measurable commitments (e.g. uptime feeds)
- Commitment templates (refund, SLA, recurring report, milestone check-in)
- Public reputation lookup API
- JS/TS SDK (
@pactum/sdk) - Marketplace integration example (check a counterparty's history before a deal)
- Rate limiting & spam-commitment protections
- Dashboard endpoint (commitments created/fulfilled over time)
Open an issue if you'd like to pick up any of these — contributions welcome.
See CONTRIBUTING.md for local setup, coding conventions, and how to submit a pull request.
Found a vulnerability? Please see SECURITY.md for responsible disclosure.
MIT — see LICENSE.