The Settlement Layer for On-Chain Agreements
Pacta is trustless infrastructure for creating, escrowing, and settling any agreement on Sui. Condition-based. Asset-agnostic. Fully composable.
Trustless lifecycle: agreements settle automatically when all conditions are met
Core Infrastructure
Agreement infrastructure, done right
Every design decision in Pacta serves one goal: trustless, automatic settlement that no single party can manipulate.
Trustless Settlement
Release is never gated by one party's permission. Each agreement defines a bitmask of conditions — settlement fires automatically when all are satisfied. No single party has unilateral release power.
Asset-Agnostic
A single agreement can hold SUI, USDC, NFTs, and any Sui object simultaneously. Assets are stored as dynamic fields — no generic type constraints limiting what you can escrow.
Composable by Design
The SettlementReceipt hot potato (zero-ability struct) chains settlement into downstream PTB logic atomically — settle and immediately route funds, trigger protocol callbacks, or stake proceeds in one transaction. Agreement objects also carry key + store for wrapping and embedding.
Neutral Parties
No payer/payee bias. On settlement, assets cross-deliver. On cancellation, assets self-refund.
Dispute Resolution
conclude_dispute() lets the arbiter split each asset independently with basis-point precision. Resolved agreements reach STATE_DISPUTE_RESOLVED — a distinct terminal state, never conflated with SETTLED.
Time-Locked Claims
Set unlock times for vesting schedules, delayed settlements, and staged releases.
Mutual Cancellation
Both parties must consent to cancel once assets are committed. No unilateral rug-pulls.
Settlement Hooks
Attach arbitrary callback objects via attach_hook<H>(). On settlement, extract them with or without the SettlementReceipt to trigger protocol-specific downstream logic.
Open Agreements
Set party_b = @0x0 to publish open-offer listings. Any address can fill the open slot via set_party_b() — enabling order-book, marketplace, and RFQ patterns natively.
Protocol Lifecycle
How Pacta works
A deterministic state machine that enforces conditions, holds arbitrary assets, and settles automatically.
Create Agreement
Define parties, arbiter, release conditions (bitmask), expiry, and optional time-lock. The agreement object is created and shared on-chain.
Deposit Assets
Both parties deposit coins (SUI, USDC, any token) and/or objects (NFTs, tickets, proofs) into the agreement. Multiple asset types per agreement.
Conditions Check
After every deposit and approval, the protocol automatically checks if all release conditions in the bitmask are satisfied.
Auto-Settlement
When all conditions are met, any executor (bot, AI agent, or party) triggers settlement. Assets cross-deliver trustlessly. settle_with_receipt() returns a SettlementReceipt hot potato — chain it into downstream PTB logic to route funds, notify oracles, or trigger protocol callbacks atomically.
Dispute Branch
Either party can raise a dispute. The arbiter callsconclude_dispute() — resolving each asset and coin type independently with basis-point precision, then settling or returning. Outcome: STATE_DISPUTE_RESOLVED.Permissionless Execution
Settlement can be triggered by anyone — bots, AI agents, or any third-party executor. No reliance on a specific party to "push" the transaction. Protocol liveness is guaranteed.Use Cases
One primitive, infinite agreements
The bitmask condition system lets you configure any settlement logic from a single Agreement struct.
OTC Trading
Execute large over-the-counter trades without slippage or front-running. Both parties lock assets, agreement settles atomically on-chain.
P2P Token Swaps
Both parties deposit tokens. Auto-settles with cross-delivery when both sides are in. No DEX, no pool, no fees.
Freelance & Bounties
Client deposits payment upfront. Freelancer delivers. Client approves to release. Arbiter available for disputes.
NFT Trades & Auctions
Trade NFTs for tokens or other NFTs. The agreement holds any Sui object with key + store — art, tickets, game items, domain names.
Vesting & Token Locks
Deposit tokens with a time-lock. Funds release automatically when unlock time passes. Ideal for team tokens, investor vesting, and grants.
DAO Treasury Ops
DAO funds a contributor or vendor. Both parties sign off on milestone completion before release. Fully transparent on-chain.
Subscription & Recurring
Service provider and client lock into time-gated agreements. Payment releases on schedule without manual intervention.
Cross-Protocol Escrow
Other protocols wrap Pacta agreements inside their own contracts. Settlement logic is inherited, not rebuilt. True composability.
Mutual Sign-Off
Both parties must approve for settlement. Ideal for milestone-based agreements, partnership deals, and joint ventures.
Arbiter-Only Resolution
No auto-settle. A trusted arbiter must resolve. Perfect for complex disputes, escrow services, and insurance claims.
Gaming & In-Game Items
Trade game items, skins, and in-game currencies securely. Supports any object type — swords, land plots, characters.
Real-World Asset Settlement
Tokenized real estate, invoices, or commodities settled through on-chain agreements with arbiter oversight for off-chain verification.
For Developers
Build on Pacta
Pacta v4 is built for protocol-to-protocol composability. The SettlementReceipt hot potato lets you chain settlement into downstream PTB logic atomically. Agreement objects carry key + store — wrap them, share them, or embed them in your own contracts.
/// v4: Open agreement — any taker can fill
let mut agr = create_agreement(
party_a: @maker,
party_b: @0x0, // open slot
release_conditions: 3, // A|B deposited
clock, ctx,
);
/// Attach a settlement hook
attach_hook(&mut agr,
NotifyHook { target: @oracle }, ctx
);
/// Taker fills the open slot
set_party_b(&mut agr, ctx);
/// Both deposit → conditions met
/// settle_with_receipt() returns hot potato
let receipt = settle_with_receipt(
&mut agr, clock, ctx
);
/// Chain into downstream PTB — atomically
oracle::on_settle(
extract_hook_with_receipt<NotifyHook>(
&mut agr, receipt, ctx),
&mut oracle_state, ctx
); // receipt consumed ✓Ecosystem
Built on Pacta
Projects and applications building on Pacta's universal agreement infrastructure. One primitive powering an entire ecosystem.
PactaSwap
Trustless OTC desk for large token trades on Sui. No slippage, no front-running, atomic settlement.
PactaPay
Freelance and contractor payment platform. Milestone-based releases with built-in dispute resolution.
PactaVault
Time-locked token distribution for teams, investors, and community grants. Fully transparent on-chain schedules.
PactaNFT
Peer-to-peer NFT trading with multi-asset bundles. Trade an NFT for tokens + another NFT in a single agreement.
PactaDAO
Treasury management for DAOs. Fund contributors with milestone-gated releases and multi-sig approval flows.
Your App
Pacta is open infrastructure. Wrap the Agreement primitive in your own contracts and ship your product.
Building on Pacta? Submit your project to be featured in the ecosystem.
Security by Design
Trustless from the ground up
Every attack vector in traditional escrow is eliminated by Pacta's architecture. There is no admin key. No pause function. No upgrade path that can compromise locked funds.
Condition-Gated Release
Funds are never released by a person. The bitmask condition system ensures settlement only fires when mathematically all conditions are true.
Anti-Rug Protection
Once both parties have deposited, neither can unilaterally cancel. The only exit paths are mutual cancellation, arbiter resolution, or expiry.
Self-Refund Routing
On cancellation, assets always route back to their original depositor. Cross-delivery only happens on settlement. The routing is hardcoded, not configurable.
Join the Community
Build the future of trustless agreements
Pacta is open infrastructure. Join developers and protocols already building on the universal agreement layer for Sui.