Built on Sui

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.

Create
Deposit
Conditions
Settled

Trustless lifecycle: agreements settle automatically when all conditions are met

~390ms
Settlement Time
On Sui's parallel execution
5
Condition Types
Configurable bitmask system
Multi-Asset
Per Agreement
SUI + USDC + NFTs simultaneously
Open
Execution Model
Bots, AI agents, or anyone can settle

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.

01

Create Agreement

Define parties, arbiter, release conditions (bitmask), expiry, and optional time-lock. The agreement object is created and shared on-chain.

02

Deposit Assets

Both parties deposit coins (SUI, USDC, any token) and/or objects (NFTs, tickets, proofs) into the agreement. Multiple asset types per agreement.

03

Conditions Check

After every deposit and approval, the protocol automatically checks if all release conditions in the bitmask are satisfied.

04

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 calls conclude_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.

conditions: COND_A_DEPOSITED | COND_B_DEPOSITED = 3

P2P Token Swaps

Both parties deposit tokens. Auto-settles with cross-delivery when both sides are in. No DEX, no pool, no fees.

conditions: COND_A_DEPOSITED | COND_B_DEPOSITED = 3

Freelance & Bounties

Client deposits payment upfront. Freelancer delivers. Client approves to release. Arbiter available for disputes.

conditions: COND_A_DEPOSITED | COND_A_APPROVED = 5

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.

conditions: COND_A_DEPOSITED | COND_B_DEPOSITED = 3

Vesting & Token Locks

Deposit tokens with a time-lock. Funds release automatically when unlock time passes. Ideal for team tokens, investor vesting, and grants.

conditions: COND_A_DEPOSITED | COND_TIMELOCK = 17

DAO Treasury Ops

DAO funds a contributor or vendor. Both parties sign off on milestone completion before release. Fully transparent on-chain.

conditions: COND_A_DEPOSITED | COND_A_APPROVED | COND_B_APPROVED = 13

Subscription & Recurring

Service provider and client lock into time-gated agreements. Payment releases on schedule without manual intervention.

conditions: COND_A_DEPOSITED | COND_TIMELOCK = 17

Cross-Protocol Escrow

Other protocols wrap Pacta agreements inside their own contracts. Settlement logic is inherited, not rebuilt. True composability.

conditions: Custom (wrapped)

Mutual Sign-Off

Both parties must approve for settlement. Ideal for milestone-based agreements, partnership deals, and joint ventures.

conditions: COND_A_APPROVED | COND_B_APPROVED = 12

Arbiter-Only Resolution

No auto-settle. A trusted arbiter must resolve. Perfect for complex disputes, escrow services, and insurance claims.

conditions: release_conditions = 0 (manual)

Gaming & In-Game Items

Trade game items, skins, and in-game currencies securely. Supports any object type — swords, land plots, characters.

conditions: COND_A_DEPOSITED | COND_B_DEPOSITED = 3

Real-World Asset Settlement

Tokenized real estate, invoices, or commodities settled through on-chain agreements with arbiter oversight for off-chain verification.

conditions: COND_A_DEPOSITED | COND_B_DEPOSITED | COND_A_APPROVED = 7

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.

create_agreement() — returns Agreement for wrapping or sharing
deposit_coin<T>() / deposit_object<V>() — multi-asset escrow
settle_with_receipt() — returns SettlementReceipt (hot potato)
attach_hook<H>() / extract_hook_with_receipt<H>() — settlement hooks
set_party_b() — fill open agreements (listing / RFQ patterns)
conclude_dispute() — per-asset arbiter resolution, STATE_DISPUTE_RESOLVED
PactaRegistry — on-chain protocol stats (settled, cancelled, disputed)
pacta.move
/// 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 ✓
No Unilateral Release
Bitmask conditions only
No Rug-Pull Cancels
Mutual consent required
Permissionless Expiry
Anyone can trigger
Arbiter-Scoped
Cannot access funds directly

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.